Record Class ComponentInstanceDeclaration
java.lang.Object
java.lang.Record
de.aristaflow.adept2.model.common.ComponentInstanceDeclaration
- Record Components:
componentType- The component type of the instance.simpleInstanceName- The simple name of the instance.hierarchicalInstanceName- The hierarchical name of the instance.implementationClass- The name of the class implementing the instance, the configured one or else that of the injected object.singleton- Whether the instance is a singleton; otherwise the registry creates a new object for every request.exportServices- The names of the services exporting the instance, which are none if the instance is not exported. This must not benull; the declaration holds an unmodifiable copy.published- Whether the instance is published at the global registry.
public record ComponentInstanceDeclaration(String componentType, String simpleInstanceName, String hierarchicalInstanceName, String implementationClass, boolean singleton, Collection<String> exportServices, boolean published)
extends Record
The declaration of a component instance as the registry has read it from its own configuration:
the component type and the names of the instance, its implementation, whether it is a singleton,
the services exporting it and whether it is published. The configuration of the instance holds
the export and the publication only as long as the instance has no configuration file of its own,
so that a configuration validator learns them from the declaration.
-
Constructor Summary
ConstructorsConstructorDescriptionComponentInstanceDeclaration(String componentType, String simpleInstanceName, String hierarchicalInstanceName, String implementationClass, boolean singleton, Collection<String> exportServices, boolean published) Creates a new declaration of a component instance, which holds an unmodifiable copy of the designated export services. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomponentTyperecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexportServicesrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thehierarchicalInstanceNamerecord component.Returns the value of theimplementationClassrecord component.booleanReturns the value of thepublishedrecord component.Returns the value of thesimpleInstanceNamerecord component.booleanReturns the value of thesingletonrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ComponentInstanceDeclaration
public ComponentInstanceDeclaration(String componentType, String simpleInstanceName, String hierarchicalInstanceName, String implementationClass, boolean singleton, Collection<String> exportServices, boolean published) Creates a new declaration of a component instance, which holds an unmodifiable copy of the designated export services.
-
-
Method Details
-
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 '=='. -
componentType
Returns the value of thecomponentTyperecord component.- Returns:
- the value of the
componentTyperecord component
-
simpleInstanceName
Returns the value of thesimpleInstanceNamerecord component.- Returns:
- the value of the
simpleInstanceNamerecord component
-
hierarchicalInstanceName
Returns the value of thehierarchicalInstanceNamerecord component.- Returns:
- the value of the
hierarchicalInstanceNamerecord component
-
implementationClass
Returns the value of theimplementationClassrecord component.- Returns:
- the value of the
implementationClassrecord component
-
singleton
public boolean singleton()Returns the value of thesingletonrecord component.- Returns:
- the value of the
singletonrecord component
-
exportServices
Returns the value of theexportServicesrecord component.- Returns:
- the value of the
exportServicesrecord component
-
published
public boolean published()Returns the value of thepublishedrecord component.- Returns:
- the value of the
publishedrecord component
-