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 ElementServiceImplementationRecord
A singleton constant defaultElementServiceImplementation
. -
Constructor Summary
ConstructorsConstructorDescriptionElementServiceImplementationRecord
(Class<?> type, boolean expose) Creates an instance of aElementServiceImplementationRecord
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.boolean
expose()
Returns the value of theexpose
record component.from
(ElementService elementService) Generates anElementServiceImplementationRecord
from aElementServiceImplementation
.from
(ElementServiceImplementation elementServiceImplementation) Generates anElementServiceImplementationRecord
from aElementServiceImplementation
.Generates theElementServiceImplementationRecord
from the suppliedClass
bearing theElementServiceImplementation
annotation.final int
hashCode()
Returns a hash code value for this object.boolean
Checks if this is theElementServiceImplementation.DefaultImplementation
implementation.final String
toString()
Returns a string representation of this record class.Class
<?> type()
Returns the value of thetype
record component.
-
Field Details
-
DEFAULT
A singleton constant defaultElementServiceImplementation
.
-
-
Constructor Details
-
Method Details
-
isDefault
public boolean isDefault()Checks if this is theElementServiceImplementation.DefaultImplementation
implementation.- Returns:
- boolean true if
-
from
Generates anElementServiceImplementationRecord
from aElementServiceImplementation
.- Parameters:
elementService
- theElementService
- Returns:
- the
ElementServiceImplementationRecord
-
from
Generates theElementServiceImplementationRecord
from the suppliedClass
bearing theElementServiceImplementation
annotation.- Parameters:
aClass
- theClass
- Returns:
- the
ElementServiceExportRecord
-
from
public static ElementServiceImplementationRecord from(ElementServiceImplementation elementServiceImplementation) Generates anElementServiceImplementationRecord
from 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 thetype
record component.- Returns:
- the value of the
type
record component
-
expose
public boolean expose()Returns the value of theexpose
record component.- Returns:
- the value of the
expose
record component
-