Record Class ElementRecord
java.lang.Object
java.lang.Record
dev.getelements.elements.sdk.record.ElementRecord
- Record Components:
type- theElementTypedefinition- theElementDefinitionRecordhousing the definition of the Elementservices- a list ofElementServiceRecordhousing all services in the Elementattributes- the actual loadedAttributesfor the ElementdefaultAttributes- the default attributes of theElementclassLoader- theClassLoaderused to load theElement
public record ElementRecord(ElementType type, ElementDefinitionRecord definition, List<ElementServiceRecord> services, List<ElementEventProducerRecord> producedEvents, List<ElementEventConsumerRecord<?>> consumedEvents, Attributes attributes, List<ElementDefaultAttributeRecord> defaultAttributes, ClassLoader classLoader)
extends Record
A Record type encapsulating all of the metadata for a particular
Element. This is derived from various
sources, which are mostly reflections of the annotation.-
Constructor Summary
ConstructorsConstructorDescriptionElementRecord(ElementType type, ElementDefinitionRecord definition, List<ElementServiceRecord> services, List<ElementEventProducerRecord> producedEvents, List<ElementEventConsumerRecord<?>> consumedEvents, Attributes attributes, List<ElementDefaultAttributeRecord> defaultAttributes, ClassLoader classLoader) Creates an instance of aElementRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.Returns the value of theclassLoaderrecord component.Returns the value of theconsumedEventsrecord component.Returns the value of thedefaultAttributesrecord component.Returns the value of thedefinitionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theproducedEventsrecord component.services()Returns the value of theservicesrecord component.final StringtoString()Returns a string representation of this record class.tryParseServiceKey(String serviceKeyString) Parses the string representing theElementServiceKey.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ElementRecord
public ElementRecord(ElementType type, ElementDefinitionRecord definition, List<ElementServiceRecord> services, List<ElementEventProducerRecord> producedEvents, List<ElementEventConsumerRecord<?>> consumedEvents, Attributes attributes, List<ElementDefaultAttributeRecord> defaultAttributes, ClassLoader classLoader) Creates an instance of aElementRecordrecord class.- Parameters:
type- the value for thetyperecord componentdefinition- the value for thedefinitionrecord componentservices- the value for theservicesrecord componentproducedEvents- the value for theproducedEventsrecord componentconsumedEvents- the value for theconsumedEventsrecord componentattributes- the value for theattributesrecord componentdefaultAttributes- the value for thedefaultAttributesrecord componentclassLoader- the value for theclassLoaderrecord component
-
-
Method Details
-
tryParseServiceKey
Parses the string representing theElementServiceKey.- Parameters:
serviceKeyString- theStringrepresenting theElementServiceKey- Returns:
- the
ElementServiceKey
-
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
definition
Returns the value of thedefinitionrecord component.- Returns:
- the value of the
definitionrecord component
-
services
Returns the value of theservicesrecord component.- Returns:
- the value of the
servicesrecord component
-
producedEvents
Returns the value of theproducedEventsrecord component.- Returns:
- the value of the
producedEventsrecord component
-
consumedEvents
Returns the value of theconsumedEventsrecord component.- Returns:
- the value of the
consumedEventsrecord component
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-
defaultAttributes
Returns the value of thedefaultAttributesrecord component.- Returns:
- the value of the
defaultAttributesrecord component
-
classLoader
Returns the value of theclassLoaderrecord component.- Returns:
- the value of the
classLoaderrecord component
-