Package io.quarkus.sbom
Record Class LicenseInfo
java.lang.Object
java.lang.Record
io.quarkus.sbom.LicenseInfo
- Record Components:
name- the license name (e.g., "Apache-2.0", "MIT"), never nullurl- URL pointing to the license text, or null
License information for a software component.
Holds a license name (e.g., an SPDX expression such as "Apache-2.0") and an
optional URL pointing to the license text.
-
Constructor Summary
ConstructorsConstructorDescriptionLicenseInfo(String name) Creates a LicenseInfo with the given name and no URL.LicenseInfo(String name, String url) Creates a LicenseInfo with the given name and URL. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static LicenseInfofinal inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.toString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
LicenseInfo
Creates a LicenseInfo with the given name and URL.- Parameters:
name- the license nameurl- the license URL, or null
-
LicenseInfo
Creates a LicenseInfo with the given name and no URL.- Parameters:
name- the license name
-
-
Method Details
-
forName
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-