FieldReflection<O, T> class

A class field reflection.

Inheritance
Implemented types

Constructors

FieldReflection(ClassReflection<O> classReflection, Type declaringType, TypeReflection type, String name, bool nullable, FieldReflectionGetterAccessor<O, T> getterAccessor, FieldReflectionSetterAccessor<O, T>? setterAccessor, O? object, bool isStatic, bool isFinal, [List<Object>? annotations])

Properties

annotations → List<Object>
The field annotations.
no setteroverride
className → String
Returns the class name of this element.
no setterinherited
classReflection → ClassReflection<O>
The ClassReflection of this element.
finalinherited
declaringType → Type
The Type that declared this element.
finalinherited
defaultValue → Object?
The default value of the field.
no setteroverride
getterAccessor → FieldReflectionGetterAccessor<O, T>
A Function that returns the field getter.
final
hasDefaultValue → bool
Returns true if defaultValue is NOT null.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
hasJsonFieldHidden → bool
no setter
hasJsonFieldVisible → bool
no setter
hasJsonNameAlias → bool
Returns true if this field/parameter has a JsonFieldAlias with a valid name.
no setteroverride
hasSetter → bool
no setter
isEntityField → bool
Returns true if this Field can be an entity field. Usually an entity field can be used in a JSON, toJson and fromJson.
no setter
isFinal → bool
Returns true if this field is final.
final
isJsonFieldHidden → bool
Returns true if this field has a JsonField annotation with JsonField.isHidden.
no setter
isJsonFieldVisible → bool
Returns true if this field has a JsonField annotation with JsonField.isVisible.
no setter
isStatic → bool
Returns true if this element is static.
finalinherited
jsonAnnotations → List<JsonAnnotation>
Returns the JsonAnnotation of this field.
no setteroverride
jsonFieldAliasAnnotations → List<JsonFieldAlias>
Returns the JsonFieldAlias of this field.
no setteroverride
jsonFieldAnnotations → List<JsonField>
Returns the JsonField of this field.
no setter
jsonName → String
Returns the JsonFieldAlias alias name or the declared name of this field/parameter.
no setteroverride
name → String
Returns name of this field.
final
nullable → bool
Returns true if this field is nullable.
final
object → O?
Returns the associated object (O) of this field. Returns null for static fields.
final
required → bool
Returns true if this field is NOT nullable.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
setterAccessor → FieldReflectionSetterAccessor<O, T>?
A Function that returns the field setter.
final
type → TypeReflection
Returns Type of this field.
final

Methods

get() → T
Returns this field value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveName(bool jsonName) → String
Resolves to name or to jsonName.
override
set(T? v) → void
Sets this field value.
toString() → String
A string representation of this object.
override
withObject(O object) → FieldReflection<O, T>
Returns a new instance that references object.

Operators

operator ==(Object other) → bool
The equality operator.
inherited