Interface ReflectField
- All Known Implementing Classes:
KotlinDataClassComponent,PojoField,RecordField
public interface ReflectField
Basic reflection information about a field of a type with a
schema,
or more generally, its read-only property.-
Method Summary
Modifier and TypeMethodDescriptiondefault Collection<ReflectField>getName()ReflectType<?>Class<?>getType()Returns this field's value type for the purposes of data-binding.
-
Method Details
-
getName
String getName()- Returns:
- field name as it appears in code (or the closest thing to it). Can only contain valid Java identifier
characters, e.g. cannot have a
"."
-
getColumn
- Returns:
@Columnannotation, if this field is annotated;nullotherwise. Precisely what means "field is annotated" is implementation-dependent: it might mean that the property getter method is annotated, for example.
-
getGenericType
Type getGenericType()- Returns:
- full generic field type
- See Also:
-
getType
Class<?> getType()- Returns:
- raw field type
- See Also:
-
getReflectType
ReflectType<?> getReflectType()- Returns:
- basic reflection information for
raw field type
-
getValue
- Parameters:
containingObject- object which contains this field- Returns:
- value of this field for
containingObject; might benull.
This method will throw when invoked on acontainingObjectthat is notinstanceofgetType().
-
getChildren
- Returns:
- subfields of this field, if any; might be empty
-
getValueType
FieldValueType getValueType()Returns this field's value type for the purposes of data-binding. The type returned is very vague, e.g., all POJOs and Java records will have type ofCOMPOSITEmeaning they will be mapped into multiple columns by default; all fixed-size integral values will have type ofINTEGER; and so on.@Columnannotation can influence whether a multi-field type such as a POJO is mapped to one column or multiple columns, see its JavaDoc for more information.- Returns:
- field's value type for the purposes of data-binding
-