Record Class ColumnInfo

java.lang.Object
java.lang.Record
org.geysermc.databaseutils.processor.info.ColumnInfo
Record Components:
maxLength - Returns the max length as provided by Length (either directly or from a TypeCodec), or -1 if no limit is provided

public record ColumnInfo(Name name, TypeElement type, VariableElement variable, int maxLength) extends Record
  • Constructor Details

    • ColumnInfo

      public ColumnInfo(Name name, TypeElement type, VariableElement variable, int maxLength)
      Creates an instance of a ColumnInfo record class.
      Parameters:
      name - the value for the name record component
      type - the value for the type record component
      variable - the value for the variable record component
      maxLength - the value for the maxLength record component
  • Method Details

    • asType

      public TypeMirror asType()
    • typeName

      public Name typeName()
    • 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.
    • name

      public Name name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • type

      public TypeElement type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • variable

      public VariableElement variable()
      Returns the value of the variable record component.
      Returns:
      the value of the variable record component
    • maxLength

      public int maxLength()
      Returns the value of the maxLength record component.
      Returns:
      the value of the maxLength record component