Record Class ConfigurationBuilderOfFieldDefinition

java.lang.Object
java.lang.Record
io.micronaut.inject.configuration.builder.ConfigurationBuilderOfFieldDefinition
Record Components:
fieldElement - The field element used as the basis for the configuration builder.
elements - The list of configuration builder element definitions associated with the field.
All Implemented Interfaces:
ConfigurationBuilderDefinition

@Internal public record ConfigurationBuilderOfFieldDefinition(FieldElement fieldElement, List<ConfigurationBuilderPropertyDefinition> elements) extends Record implements ConfigurationBuilderDefinition
A record implementation of the ConfigurationBuilderDefinition interface, representing the definition of configuration builder elements based on a field. This class is utilized for associating configuration elements with a field element.

It encapsulates a FieldElement to represent the field and a list of ConfigurationBuilderPropertyDefinition that define individual configuration elements related to the builder.

Since:
4.10
Author:
Denis Stepanov
  • Constructor Details

    • ConfigurationBuilderOfFieldDefinition

      public ConfigurationBuilderOfFieldDefinition(FieldElement fieldElement, List<ConfigurationBuilderPropertyDefinition> elements)
      Creates an instance of a ConfigurationBuilderOfFieldDefinition record class.
      Parameters:
      fieldElement - the value for the fieldElement record component
      elements - the value for the elements record component
  • Method Details

    • builderElement

      public MemberElement builderElement()
      Specified by:
      builderElement in interface ConfigurationBuilderDefinition
      Returns:
      The builder element
    • builderType

      public ClassElement builderType()
      Specified by:
      builderType in interface ConfigurationBuilderDefinition
      Returns:
      The builder type
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • fieldElement

      public FieldElement fieldElement()
      Returns the value of the fieldElement record component.
      Returns:
      the value of the fieldElement record component
    • elements

      Returns the value of the elements record component.
      Specified by:
      elements in interface ConfigurationBuilderDefinition
      Returns:
      the value of the elements record component