Record Class ElementServiceImplementationRecord
java.lang.Object
java.lang.Record
dev.getelements.elements.sdk.record.ElementServiceImplementationRecord
- Record Components:
type- the implementation typeexpose- true if the implementation itself is exposed
A record for the
ElementServiceImplementation annotation.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ElementServiceImplementationRecordA singleton constant defaultElementServiceImplementation. -
Constructor Summary
ConstructorsConstructorDescriptionElementServiceImplementationRecord(Class<?> type, boolean expose) Creates an instance of aElementServiceImplementationRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanexpose()Returns the value of theexposerecord component.from(ElementService elementService) Generates anElementServiceImplementationRecordfrom aElementServiceImplementation.from(ElementServiceImplementation elementServiceImplementation) Generates anElementServiceImplementationRecordfrom aElementServiceImplementation.Generates theElementServiceImplementationRecordfrom the suppliedClassbearing theElementServiceImplementationannotation.final inthashCode()Returns a hash code value for this object.booleanChecks if this is theElementServiceImplementation.DefaultImplementationimplementation.final StringtoString()Returns a string representation of this record class.Class<?> type()Returns the value of thetyperecord component.
-
Field Details
-
DEFAULT
A singleton constant defaultElementServiceImplementation.
-
-
Constructor Details
-
Method Details
-
isDefault
public boolean isDefault()Checks if this is theElementServiceImplementation.DefaultImplementationimplementation.- Returns:
- boolean true if
-
from
Generates anElementServiceImplementationRecordfrom aElementServiceImplementation.- Parameters:
elementService- theElementService- Returns:
- the
ElementServiceImplementationRecord
-
from
Generates theElementServiceImplementationRecordfrom the suppliedClassbearing theElementServiceImplementationannotation.- Parameters:
aClass- theClass- Returns:
- the
ElementServiceExportRecord
-
from
public static ElementServiceImplementationRecord from(ElementServiceImplementation elementServiceImplementation) Generates anElementServiceImplementationRecordfrom aElementServiceImplementation.- Parameters:
elementServiceImplementation- theElementServiceImplementation- Returns:
- the
ElementServiceImplementationRecord
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
expose
public boolean expose()Returns the value of theexposerecord component.- Returns:
- the value of the
exposerecord component
-