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 be null; 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 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • componentType

      public String componentType()
      Returns the value of the componentType record component.
      Returns:
      the value of the componentType record component
    • simpleInstanceName

      public String simpleInstanceName()
      Returns the value of the simpleInstanceName record component.
      Returns:
      the value of the simpleInstanceName record component
    • hierarchicalInstanceName

      public String hierarchicalInstanceName()
      Returns the value of the hierarchicalInstanceName record component.
      Returns:
      the value of the hierarchicalInstanceName record component
    • implementationClass

      public String implementationClass()
      Returns the value of the implementationClass record component.
      Returns:
      the value of the implementationClass record component
    • singleton

      public boolean singleton()
      Returns the value of the singleton record component.
      Returns:
      the value of the singleton record component
    • exportServices

      public Collection<String> exportServices()
      Returns the value of the exportServices record component.
      Returns:
      the value of the exportServices record component
    • published

      public boolean published()
      Returns the value of the published record component.
      Returns:
      the value of the published record component