Record Class PropertyResolutionContext

java.lang.Object
java.lang.Record
ru.yojo.codegen.mapper.PropertyResolutionContext
Record Components:
schemaName - name of the containing schema
variableProperties - target field container to populate
currentSchema - full schema map where this property is defined
schemas - global map of all known schemas
propertyName - field name in YAML
propertiesMap - raw field definition from YAML
processContext - current generation context
innerSchemas - accumulator for discovered inner schemas

public record PropertyResolutionContext(String schemaName, VariableProperties variableProperties, Map<String,Object> currentSchema, Map<String,Object> schemas, String propertyName, Map<String,Object> propertiesMap, ProcessContext processContext, Map<String,Object> innerSchemas) extends Record
Context object that bundles parameters passed to PropertyTypeHandler methods.

Reduces method parameter count and simplifies the handler interface.

  • Constructor Details

  • 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. 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.
    • schemaName

      public String schemaName()
      Returns the value of the schemaName record component.
      Returns:
      the value of the schemaName record component
    • variableProperties

      public VariableProperties variableProperties()
      Returns the value of the variableProperties record component.
      Returns:
      the value of the variableProperties record component
    • currentSchema

      public Map<String,Object> currentSchema()
      Returns the value of the currentSchema record component.
      Returns:
      the value of the currentSchema record component
    • schemas

      public Map<String,Object> schemas()
      Returns the value of the schemas record component.
      Returns:
      the value of the schemas record component
    • propertyName

      public String propertyName()
      Returns the value of the propertyName record component.
      Returns:
      the value of the propertyName record component
    • propertiesMap

      public Map<String,Object> propertiesMap()
      Returns the value of the propertiesMap record component.
      Returns:
      the value of the propertiesMap record component
    • processContext

      public ProcessContext processContext()
      Returns the value of the processContext record component.
      Returns:
      the value of the processContext record component
    • innerSchemas

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