Record Class ValidMeta

java.lang.Object
java.lang.Record
ru.tinkoff.kora.validation.annotation.processor.ValidMeta

public record ValidMeta(ValidMeta.Type source, ValidMeta.Validator validator, TypeElement sourceElement, List<ValidMeta.Field> fields) extends Record
  • Field Details

    • VALID_TYPE

      public static final com.squareup.javapoet.ClassName VALID_TYPE
    • VALIDATED_BY_TYPE

      public static final com.squareup.javapoet.ClassName VALIDATED_BY_TYPE
    • CONTEXT_TYPE

      public static final com.squareup.javapoet.ClassName CONTEXT_TYPE
    • VALIDATOR_TYPE

      public static final com.squareup.javapoet.ClassName VALIDATOR_TYPE
    • VIOLATION_TYPE

      public static final com.squareup.javapoet.ClassName VIOLATION_TYPE
    • EXCEPTION_TYPE

      public static final com.squareup.javapoet.ClassName EXCEPTION_TYPE
  • Constructor Details

    • ValidMeta

      public ValidMeta(ValidMeta.Type source, TypeElement sourceElement, List<ValidMeta.Field> fields)
    • ValidMeta

      public ValidMeta(ValidMeta.Type source, ValidMeta.Validator validator, TypeElement sourceElement, List<ValidMeta.Field> fields)
      Creates an instance of a ValidMeta record class.
      Parameters:
      source - the value for the source record component
      validator - the value for the validator record component
      sourceElement - the value for the sourceElement record component
      fields - the value for the fields record component
  • 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.
    • source

      public ValidMeta.Type source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • validator

      public ValidMeta.Validator validator()
      Returns the value of the validator record component.
      Returns:
      the value of the validator record component
    • sourceElement

      public TypeElement sourceElement()
      Returns the value of the sourceElement record component.
      Returns:
      the value of the sourceElement record component
    • fields

      public List<ValidMeta.Field> fields()
      Returns the value of the fields record component.
      Returns:
      the value of the fields record component