built_mirrors library

Classes

Annotation
Class used to make annotations listed on ClassMirror
ClassMirror
reflects a Dart language class.
DeclarationMirror
reflects attributes declared in a Dart program.
FunctionMirror
reflects functions declared in a Dart program.
Mirror
Base class for mirrors
Reflectable
Annotation needed to generate ClassMirror for every class
SerializedName
Annotation class to describe properties of a class member.

Constants

reflectable → const Reflectable
Annotation needed to generate ClassMirror for every class

Properties

classMirrors Map<Type, ClassMirror?>
returns the map of Type-ClassMirror
no setter
functionMirrors Map<Function, FunctionMirror>
returns the map of Function-FunctionMirror combination
no setter
getClassMirrorFromGenericInstance GetClassMirrorFromGenericInstance
getter/setter pair

Functions

initClassMirrors(Map<Type, ClassMirror> classMirrors) → void
adds to a map containing a Map with Type as keys and ClassMirrors as values
initFunctionMirrors(Map<Function, FunctionMirror> classMirrors) → void
adds to a map containing a Map<Function, FunctionMirror> as values
reflect(dynamic instance) ClassMirror?
Returns the ClassMirror corresponding to the runtime type of the instance
reflectFunction(Function function) FunctionMirror?
Returns the FunctionMirror corresponding to the function
reflectType(Type type) ClassMirror?
Returns the ClassMirror corresponding to the type

Typedefs

FunctionCall = dynamic Function([List? positionalParams, Map<String, dynamic>? namedParams])
GetClassMirrorFromGenericInstance = ClassMirror? Function(dynamic instance)