StaticFieldReflection<O, T> class

A class static-field reflection. Extends FieldReflection.

Inheritance

Constructors

StaticFieldReflection(ClassReflection<O> classReflection, Type declaringType, TypeReflection type, String name, bool nullable, StaticFieldReflectionGetterAccessor<T> getterAccessor, StaticFieldReflectionSetterAccessor<T>? setterAccessor, bool isFinal, [List<Object>? annotations])

Properties

annotations List<Object>
The field annotations.
no setterinherited
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 setterinherited
getterAccessor StaticFieldReflectionGetterAccessor<T>
A Function that returns the field getter.
final
hasDefaultValue bool
Returns true if defaultValue is NOT null.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasJsonFieldHidden bool
no setterinherited
hasJsonFieldVisible bool
no setterinherited
hasJsonNameAlias bool
Returns true if this field/parameter has a JsonFieldAlias with a valid name.
no setterinherited
hasSetter bool
no setteroverride
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 setterinherited
isFinal bool
Returns true if this field is final.
finalinherited
isJsonFieldHidden bool
Returns true if this field has a JsonField annotation with JsonField.isHidden.
no setterinherited
isJsonFieldVisible bool
Returns true if this field has a JsonField annotation with JsonField.isVisible.
no setterinherited
isStatic bool
Returns true if this element is static.
no setteroverride
jsonAnnotations List<JsonAnnotation>
Returns the JsonAnnotation of this field.
no setterinherited
jsonFieldAliasAnnotations List<JsonFieldAlias>
Returns the JsonFieldAlias of this field.
no setterinherited
jsonFieldAnnotations List<JsonField>
Returns the JsonField of this field.
no setterinherited
jsonName String
Returns the JsonFieldAlias alias name or the declared name of this field/parameter.
no setterinherited
name String
Returns name of this field.
finalinherited
nullable bool
Returns true if this field is nullable.
finalinherited
required bool
Returns true if this field is NOT nullable.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setterAccessor StaticFieldReflectionSetterAccessor<T>?
A Function that returns the field setter.
final
type TypeReflection
Returns Type of this field.
finalinherited

Methods

get() → T
Returns this field value.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveName(bool jsonName) String
Resolves to name or to jsonName.
inherited
set(T v) → void
Sets this field value. See setNullable.
override
setNullable(T? v) → void
Sets this field value, allowing a nullable value. Throws an ArgumentError if v can't be null. See set.
override
toString() String
A string representation of this object.
override

Operators

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