Record Class ManagedDependency

java.lang.Object
java.lang.Record
org.j7m.middleware.application.api.ManagedDependency
Record Components:
type - required erased dependency type
name - exact binding name, empty for unnamed
qualifiers - exact custom qualifier identities, at most16
provider - whether the edge requests a lazy ManagedProvider
attributes - immutable adapter metadata, at most32 entries

public record ManagedDependency(Class<?> type, String name, List<ManagedQualifier> qualifiers, boolean provider, Map<String,String> attributes) extends Record
Finite declared dependency edge in a generated component graph. Attributes are bounded adapter metadata, not diagnostic text. Configuration/routing adapters must explicitly support them; an unsupported attribute must not be silently ignored.
  • Constructor Details

    • ManagedDependency

      public ManagedDependency(Class<?> type, String name, List<ManagedQualifier> qualifiers, boolean provider, Map<String,String> attributes)
      Validates an immutable bounded edge.
      Parameters:
      type - nonnull dependency contract
      name - nonnull exact name, at most256 characters
      qualifiers - nonnull qualifier list
      provider - lazy resolution flag
      attributes - nonnull bounded adapter metadata
      Throws:
      IllegalArgumentException - for invalid names, qualifiers or metadata bounds
    • ManagedDependency

      public ManagedDependency(Class<?> type, String name, List<ManagedQualifier> qualifiers, boolean provider)
      Creates an edge without adapter metadata.
      Parameters:
      type - required dependency contract
      name - exact binding name
      qualifiers - exact qualifier identities
      provider - lazy resolution flag
  • Method Details

    • toString

      public String toString()
      Specified by:
      toString in class Record
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • type

      public Class<?> type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • qualifiers

      public List<ManagedQualifier> qualifiers()
      Returns the value of the qualifiers record component.
      Returns:
      the value of the qualifiers record component
    • provider

      public boolean provider()
      Returns the value of the provider record component.
      Returns:
      the value of the provider record component
    • attributes

      public Map<String,String> attributes()
      Returns the value of the attributes record component.
      Returns:
      the value of the attributes record component