ClassMetadata class

Represents metadata about a class.

Inheritance

Constructors

ClassMetadata({required TypeMetadata typeMetadata, List annotations = const [], List<MethodMetadata>? methods, List<GetterMetadata>? getters, List<SetterMetadata>? setters, List<ConstructorMetadata>? constructors, AbstractProxy createProxy(Object target, ProxyHandler handler, ClassMetadata metadata)?})
factory

Properties

annotations List
List of annotations applied to this element.
finalinherited
constructors List<ConstructorMetadata>?
Constructors metadata (if available).
no setter
createProxy AbstractProxy Function(Object target, ProxyHandler handler, ClassMetadata metadata)?
Factory function to create a proxy instance for this class. Returns an AbstractProxy that wraps the target object with the given handler.
final
getters List<GetterMetadata>?
All getters defined in this class.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasMappedConstructors bool
Checks if constructors were mapped for this class.
no setter
hasMappedGetters bool
Checks if getters were mapped for this class.
no setter
hasMappedMethods bool
Checks if methods were mapped for this class.
no setter
hasMappedSetters bool
Checks if setters were mapped for this class.
no setter
methods List<MethodMetadata>?
All methods defined in this class.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setters List<SetterMetadata>?
All setters defined in this class.
no setter
typeMetadata TypeMetadata
Type information for this element.
finalinherited

Methods

allAnnotationsOf<A>() List<A>
Returns all annotations of type A.
inherited
constructorsAnnotatedWith<A>() List<ConstructorMetadata>
Returns constructors annotated with A.
firstAnnotationOf<A>() → A?
Returns the first annotation of type A, if it exists.
inherited
getConstructorByName(String name) ConstructorMetadata?
Gets a constructor by name (O(1) lookup).
getGetterByName(String name) GetterMetadata?
Gets a getter by name (O(1) lookup).
getMethodByName(String name) MethodMetadata?
Gets a method by name (O(1) lookup).
getSetterByName(String name) SetterMetadata?
Gets a setter by name (O(1) lookup).
gettersAnnotatedWith<A>() List<GetterMetadata>
Returns getters annotated with A.
hasAnnotation<A>() bool
Checks if this element has an annotation of type A.
inherited
methodsAnnotatedWith<A>() List<MethodMetadata>
Returns methods annotated with A.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
settersAnnotatedWith<A>() List<SetterMetadata>
Returns setters annotated with A.
toString() String
A string representation of this object.
inherited

Operators

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