Package io.deeplumen.ucp.typed
Record Class CapabilityRef
java.lang.Object
java.lang.Record
io.deeplumen.ucp.typed.CapabilityRef
Optional typed view for capability references carried in some generated schemas as
Object.
This type does not replace any generated field types. It exists purely to make it easier to read/write these values without losing forward-compatibility.
Typical JSON shape:
{"name":"dev.ucp.shopping.checkout","version":"2026-01-11"}
This view can:
- Parse from
Map,JsonNode, or an existingCapabilityRef - Convert back into a
Map<String, Object>for assigning intoList<Object>
-
Constructor Summary
ConstructorsConstructorDescriptionCapabilityRef(String name, String version, String extendsName) Creates an instance of aCapabilityRefrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theextendsNamerecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.static CapabilityReftoMap()Converts this capability reference into aMapsuitable for assigning into generated fields likeList<Object>.final StringtoString()Returns a string representation of this record class.static Optional<CapabilityRef>version()Returns the value of theversionrecord component.
-
Constructor Details
-
CapabilityRef
Creates an instance of aCapabilityRefrecord class.- Parameters:
name- the value for thenamerecord componentversion- the value for theversionrecord componentextendsName- the value for theextendsNamerecord component
-
-
Method Details
-
of
-
tryFrom
-
toMap
Converts this capability reference into aMapsuitable for assigning into generated fields likeList<Object>. -
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
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
extendsName
Returns the value of theextendsNamerecord component.- Returns:
- the value of the
extendsNamerecord component
-