Record Class ComponentInventory.Component
java.lang.Object
java.lang.Record
com.darkcollective.relix.semantic.internal.ComponentInventory.Component
- Record Components:
name- what it calls itself — a library's name, a solver's, a connector's type token, a driver's classkind- what sort of thing it is:engine,facade,function-library,connector,solver,driverversion- its version, orunknownwhere the runtime cannot say — a provider on the class path often carries no version at all, and naming it is the answer that matters
- Enclosing interface:
ComponentInventory
public static record ComponentInventory.Component(String name, String kind, String version)
extends Record
One installed thing.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.name()Returns the value of thenamerecord component.static ComponentInventory.ComponentThe component a class belongs to, versioned as well as the runtime allows.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Field Details
-
UNKNOWN
The version reported when nothing in the runtime knows one.- See Also:
-
-
Constructor Details
-
Method Details
-
of
The component a class belongs to, versioned as well as the runtime allows.Tries the module descriptor first and the package's implementation version second, because the two are populated by different packagings — a modular image has the first, an ordinary jar the second, and a plain class path neither. Reporting
UNKNOWNis the honest third case.- Parameters:
name- the component's namekind- the component's kindowner- a class belonging to it- Returns:
- the component
-
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
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-