AnnotationFieldDeclaration class abstract final

Represents a field of an annotation.

This interface provides access to:

  • The field's name
  • The field's type
  • The value of the field

Example

final annotation = ...;
final fields = annotation.getFields();
print(fields.map((f) => f.getName())); // ["value"]
Inheritance
Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

equalizedProperties() → List<Object?>
Mixin-style contract for value-based equality, hashCode, and toString.
inherited
getAnnotations() → List<AnnotationDeclaration>
Returns all annotations applied to this declaration in source code.
inherited
getAnnotationValue() → dynamic
Returns the value of the field.
getDebugIdentifier() → String
Returns the stable debug identifier for this entity.
inherited
getDefaultValue() → dynamic
Returns the default value of the field.
getIsAbstract() → bool
Indicates whether this member is declared as abstract.
inherited
getIsConst() → bool
Indicates whether this field is declared with the const modifier.
inherited
getIsFinal() → bool
Indicates whether this field is declared with the final modifier.
inherited
getIsLate() → bool
Indicates whether this field is declared with the late modifier.
inherited
getIsPublic() → bool
Indicates whether this declaration is publicly visible.
inherited
getIsStatic() → bool
Indicates whether this field is declared as static.
inherited
getIsSynthetic() → bool
Indicates whether this declaration is synthetic.
inherited
getIsTopLevel() → bool
Indicates whether this field is declared at the top level.
inherited
getLinkDeclaration() → LinkDeclaration
Returns the LinkDeclaration describing this field’s declared type.
inherited
getName() → String
Returns the simple (unqualified) name of this declaration.
inherited
getParentClass() → LinkDeclaration?
Returns a link to the class that declares this member.
inherited
getPosition() → int
Returns the position of the field in the source code.
getSourceLocation() → Uri?
Returns the URI pointing to the source location where this declaration is defined.
inherited
getType() → Type
Returns the Dart Type represented by this declaration.
inherited
getUserProvidedValue() → dynamic
Returns the user provided value of the field.
getValue(dynamic instance) → dynamic
Returns the runtime value of this field from the given instance.
inherited
hasDefaultValue() → bool
Returns true if the field has a default value.
hasUserProvidedValue() → bool
Returns true if the field has a user provided value.
isFunction() → bool
Indicates whether this field’s declared type is a function type.
inherited
isNullable() → bool
Indicates whether this field’s declared type is nullable.
inherited
isRecord() → bool
Indicates whether this field’s type is a Dart record type.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize(BinaryBuilder builder) → void
Serializes this declaration to binary format.
inherited
setValue(dynamic instance, dynamic value) → void
Sets the runtime value of this field on the given instance.
inherited
toJson() → Map<String, Object>
Serializes this declaration into a JSON-compatible map.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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