Package dev.drtheo.autojson.schema.baked
Record Class BakedClassAutoSchema.FieldType<T,E>
java.lang.Object
java.lang.Record
dev.drtheo.autojson.schema.baked.BakedClassAutoSchema.FieldType<T,E>
- Enclosing class:
- BakedClassAutoSchema<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClassAdapter<E,E[]> adapter()Returns the value of theadapterrecord component.final booleanIndicates whether some other object is "equal to" this one.static <T,E> BakedClassAutoSchema.FieldType<T, E> from(SchemaHolder holder, Field field) final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.longoffset()Returns the value of theoffsetrecord component.schema()Returns the value of theschemarecord component.voidfinal StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
FieldType
public FieldType(Type type, ClassAdapter<E, E[]> adapter, String name, long offset, Lazy<Schema<E>> schema) Creates an instance of aFieldTyperecord class.- Parameters:
type- the value for thetyperecord componentadapter- the value for theadapterrecord componentname- the value for thenamerecord componentoffset- the value for theoffsetrecord componentschema- the value for theschemarecord component
-
-
Method Details
-
from
-
get
-
set
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
adapter
Returns the value of theadapterrecord component.- Returns:
- the value of the
adapterrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
offset
public long offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
schema
Returns the value of theschemarecord component.- Returns:
- the value of the
schemarecord component
-