reflectable.reflectable library

Classes

ApiReflectCapability
Abstract superclass of all capabilities concerned with the request for reflective support for a certain part of the mirror class APIs, as opposed to the second order capabilities which are used to associate these API based capabilities with a certain set of potential reflectees.
ClassMirror
A ClassMirror reflects a Dart language class.
ClosureMirror
A ClosureMirror reflects a closure. [...]
CombinatorMirror
A mirror on a show/hide combinator declared on a library dependency.
Comment
Class used for encoding comments as metadata annotations.
DeclarationMirror
A DeclarationMirror reflects some entity declared in a Dart program.
DeclarationsCapability
Gives support for: declarations, instanceMembers, staticMembers, callMethod, parameters, and defaultValue. [...]
FunctionTypeMirror
A FunctionTypeMirror represents the type of a function in the Dart language.
GlobalQuantifyCapability
Gives reflection support in reflector for every class in the program whose qualified name matches the given classNamePattern considered as a regular expression. [...]
GlobalQuantifyMetaCapability
Gives reflection support in reflector for every class in the program whose metadata includes instances of metadataType or a subtype thereof. [...]
ImportAttachedCapability
Abstract superclass for all capabilities which are used to specify that a given reflector must be considered to be applied as metadata to a set of targets. Note that in order to work correctly, this kind of capability can only be used as metadata on an import of 'package:reflectable/reflectable.dart'.
InstanceInvokeCapability
Gives support for reflective invocation of instance members (methods, getters, and setters) matching namePattern interpreted as a regular expression.
InstanceInvokeMetaCapability
Gives support for reflective invocation of instance members (methods, getters, and setters) annotated with instances of metadataType or a subtype thereof.
InstanceMirror
An InstanceMirror reflects an instance of a Dart language object.
InvokingCapability
Gives all the capabilities of InstanceInvokeCapability, StaticInvokeCapability, and NewInstanceCapability.
InvokingMetaCapability
Gives the capabilities of all the capabilities requested by InstanceInvokeMetaCapability, StaticInvokeMetaCapability, and NewInstanceMetaCapability.
LibraryCapability
Gives support for library-mirrors. [...]
LibraryDependenciesCapability
Gives support for: sourceLibrary, targetLibrary, prefix, and combinators.
LibraryDependencyMirror
A mirror on an import or export declaration.
LibraryMirror
A LibraryMirror reflects a Dart language library, providing access to the variables, functions, and classes of the library.
MetadataCapability
Gives support for reflective access to metadata associated with a declaration reflected by a given declaration mirror.
MetadataQuantifiedCapability
Abstract superclass of all capability classes recognizing a particular instance used as metadata as a criterion for providing the annotated declaration with reflection support. Note that there are no constraints on the type of metadata, i.e., it could be metadata which is already used for other purposes related to other packages, but which happens to occur in just the right locations.
MethodMirror
A MethodMirror reflects a Dart language function, method, constructor, getter, or setter.
Mirror
The base class for all mirrors.
NamePatternCapability
Abstract superclass of all capability classes using a regular expression to match names of behaviors (such as methods and constructors).
NewInstanceCapability
Gives support for reflective invocation of constructors (of all kinds) matching namePattern interpreted as a regular expression. [...]
NewInstanceMetaCapability
Gives support for reflective invocation of constructors (of all kinds) annotated by instances of metadataType or a subtype thereof.
ObjectMirror
An ObjectMirror is a common superinterface of InstanceMirror, ClassMirror, and LibraryMirror that represents their shared functionality. [...]
ParameterMirror
A ParameterMirror reflects a Dart formal parameter declaration.
Reflectable
Reflectable is used as metadata, marking classes for reflection. [...]
ReflectableInterface
ReflectCapability
A ReflectCapability of a reflectable mirror specifies the kinds of reflective operations that are supported for instances of the associated classes. [...]
ReflecteeQuantifyCapability
Abstract superclass for all capability classes supporting quantification over the set of potential reflectees. [...]
SourceLocation
A SourceLocation describes the span of an entity in Dart source code.
StaticInvokeCapability
Gives support for reflective invocation of static members (static methods, getters, and setters) matching namePattern interpreted as a regular expression.
StaticInvokeMetaCapability
Gives support for reflective invocation of static members (static methods, getters, and setters) that are annotated with instances of metadataType or a subtype thereof.
StringInvocation
Used to describe the invocation when a no-such-method situation arises. We need to use this variant of the standard Invocation class, because we have no access to the Symbol for the memberName.
SuperclassQuantifyCapability
Gives support for reflection on all superclasses of covered classes up to upperBound [...]
TopLevelInvokeCapability
Gives support for reflective invocation of top-level members (top-level methods, getters, and setters) matching namePattern interpreted as a regular expression.
TopLevelInvokeMetaCapability
Gives support for reflective invocation of top-level members (top-level methods, getters, and setters) that are annotated with instances of metadataType.
TypeAnnotationQuantifyCapability
Gives support for reflecting on the classes used as type annotations of covered methods, parameters and fields. If transitive is true the support also extends to annotations of their methods, parameters and fields etc.
TypeCapability
Gives support for invocation of the method reflectType on reflectors, and for invocation of the method type on instances of InstanceMirror and ParameterMirror as well as the method returnType on instances of MethodMirror. [...]
TypedefMirror
A TypedefMirror represents a typedef in a Dart language program.
TypeMirror
A TypeMirror reflects a Dart language class, typedef, function type or type variable.
TypeRelationsCapability
Gives support for: typeVariables, typeArguments, originalDeclaration, isSubtypeOf, isAssignableTo, superclass, superinterfaces, mixin, isSubclassOf, upperBound, and referent.
TypeValue<E>
Used to obtain values of type Type. [...]
TypeVariableMirror
A TypeVariableMirror represents a type parameter of a generic type.
TypingCapability
Gives the capabilities of TypeCapability, metadataCapability, typeRelationsCapability, declarationsCapability, uriCapability, and libraryDependenciesCapability.
UriCapability
Gives support for the mirror method uri on LibraryMirrors.
VariableMirror
A VariableMirror reflects a Dart language variable declaration.

Constants

admitSubtypeCapability → const _AdmitSubtypeCapability
Gives support for calling .reflect on subtypes of covered instances. [...]
const _AdmitSubtypeCapability()
correspondingSetterQuantifyCapability → const _CorrespondingSetterQuantifyCapability
Quantifying capability instance specifying that the reflection support for any given explicitly declared getter must also be given to its corresponding explicitly declared setter, if any.
const _CorrespondingSetterQuantifyCapability()
declarationsCapability → const DeclarationsCapability
Shorthand for const DeclarationsCapability().
delegateCapability → const _DelegateCapability
Capability instance giving support for the delegate method on instance mirrors when it leads to invocation of a method where instance invocation is supported. Also implies support for translation of Symbols of covered members to their corresponding Strings.
const _DelegateCapability()
instanceInvokeCapability → const InstanceInvokeCapability
Short hand for InstanceInvokeCapability(""), meaning the capability to reflect over all instance members.
invokingCapability → const InvokingCapability
Short hand for InvokingCapability(""), meaning the capability to reflect over all top-level and static members.
const InvokingCapability("")
libraryCapability → const LibraryCapability
Shorthand for const LibraryCapability().
libraryDependenciesCapability → const LibraryDependenciesCapability
Shorthand for const LibraryDependenciesCapability().
metadataCapability → const MetadataCapability
Shorthand for const MetadataCapability().
newInstanceCapability → const NewInstanceCapability
Short hand for const NewInstanceCapability(""), meaning the capability to reflect over all constructors.
reflectedTypeCapability → const _ReflectedTypeCapability
Gives support for the method reflectedType on VariableMirror and ParameterMirror, and for the method reflectedReturnType on MethodMirror.
const _ReflectedTypeCapability()
staticInvokeCapability → const StaticInvokeCapability
Short hand for StaticInvokeCapability(""), meaning the capability to reflect over all static members.
subtypeQuantifyCapability → const _SubtypeQuantifyCapability
Quantifying capability instance specifying that the reflection support covers all subclasses of annotated classes and classes matching global quantifiers. [...]
const _SubtypeQuantifyCapability()
superclassQuantifyCapability → const SuperclassQuantifyCapability
Gives support for reflection on all superclasses of covered classes. [...]
topLevelInvokeCapability → const TopLevelInvokeCapability
Short hand for TopLevelInvokeCapability(""), meaning the capability to reflect over all top-level members.
typeAnnotationDeepQuantifyCapability → const TypeAnnotationQuantifyCapability
Gives support for reflecting on the full closure of type annotations of covered methods/parameters. [...]
const TypeAnnotationQuantifyCapability(transitive: true)
typeAnnotationQuantifyCapability → const TypeAnnotationQuantifyCapability
Gives support for reflecting on the classes used as type annotations of covered methods, parameters and fields. [...]
typeCapability → const TypeCapability
Shorthand for const TypeCapability().
const TypeCapability()
typeRelationsCapability → const TypeRelationsCapability
Shorthand for const TypeRelationsCapability().
typingCapability → const TypingCapability
Shorthand for const TypingCapability().
uriCapability → const UriCapability
Shorthand for const UriCapability().
const UriCapability()

Functions

reflectableNoSuchConstructorError(Object receiver, String constructorName, List positionalArguments, Map<Symbol, dynamic> namedArguments, [ List<Symbol> existingArgumentNames = null ]) → dynamic
reflectableNoSuchGetterError(Object receiver, String memberName, List positionalArguments, Map<Symbol, dynamic> namedArguments, [ List<Symbol> existingArgumentNames = null ]) → dynamic
reflectableNoSuchInvokableError(Object receiver, String memberName, List positionalArguments, Map<Symbol, dynamic> namedArguments, StringInvocationKind kind, [ List<Symbol> existingArgumentNames = null ]) → dynamic
reflectableNoSuchMethodError(Object receiver, String memberName, List positionalArguments, Map<Symbol, dynamic> namedArguments, [ List<Symbol> existingArgumentNames = null ]) → dynamic
reflectableNoSuchSetterError(Object receiver, String memberName, List positionalArguments, Map<Symbol, dynamic> namedArguments, [ List<Symbol> existingArgumentNames = null ]) → dynamic

Enums

StringInvocationKind

Exceptions / Errors

NoSuchCapabilityError
Thrown when reflection is invoked without sufficient capabilities.
ReflectableNoSuchMethodError
Thrown when a method is invoked via a reflectable, but the reflectable doesn't have the capabilities to invoke it.