Class KotlinDataClassComponent
java.lang.Object
tech.ydb.yoj.databind.schema.reflect.KotlinDataClassComponent
- All Implemented Interfaces:
ReflectField
Represents a Kotlin data class component for the purposes of YOJ data-binding.
-
Constructor Summary
ConstructorsConstructorDescriptionKotlinDataClassComponent(Reflector reflector, String name, kotlin.reflect.KProperty1<?, ?> property) -
Method Summary
Modifier and TypeMethodDescriptiongetName()ReflectType<?>Class<?>getType()Returns this field's value type for the purposes of data-binding.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface tech.ydb.yoj.databind.schema.reflect.ReflectField
getChildren
-
Constructor Details
-
KotlinDataClassComponent
-
-
Method Details
-
getValue
- Specified by:
getValuein interfaceReflectField- 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().
-
getName
- Specified by:
getNamein interfaceReflectField- 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
"."
-
getGenericType
- Specified by:
getGenericTypein interfaceReflectField- Returns:
- full generic field type
- See Also:
-
getType
- Specified by:
getTypein interfaceReflectField- Returns:
- raw field type
- See Also:
-
getValueType
Description copied from interface:ReflectFieldReturns 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.- Specified by:
getValueTypein interfaceReflectField- Returns:
- field's value type for the purposes of data-binding
-
getColumn
- Specified by:
getColumnin interfaceReflectField- 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.
-
getReflectType
- Specified by:
getReflectTypein interfaceReflectField- Returns:
- basic reflection information for
raw field type
-
toString
-