EntityDeclaration class abstract

An abstract base class that defines a reflective entity in the system, providing a common identifier useful for debugging, logging, or inspection.

This class is intended to be extended by other reflection-related types such as FieldDeclaration, MethodDeclaration, TypeDeclaration, etc.

Example

class ReflectedField extends ReflectedEntity {
  @override
  final String debugIdentifier;

  ReflectedField(this.getDebugIdentifier());
}

final field = ReflectedField('User.name');
print(field.getDebugIdentifier()); // User.name
Inheritance
Implementers

Constructors

EntityDeclaration()
An abstract base class that defines a reflective entity in the system, providing a common identifier useful for debugging, logging, or inspection.
const

Properties

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

Methods

getDartType() → DartType?
The analyzer DartType of the entity for enhanced type operations.
getDebugIdentifier() String
The debug identifier for the entity.
getElement() → Element?
The analyzer element associated with this declaration.
getIsPublic() bool
Checks if this declaration is a public declaration.
inherited
getIsSynthetic() bool
Checks if a declaration is a synthetic declaration.
inherited
getName() String
Gets the name of the declared element.
inherited
getType() Type
Gets the runtime type of the declared element.
inherited
hasAnalyzerSupport() bool
Returns true if this declaration has analyzer information available.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, Object>
Returns a JSON representation of this entity.
inherited
toString() String
A string representation of this object.
override

Operators

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