dart / 2 / dart-mirrors / classmirror-class.html

ClassMirror class

A ClassMirror reflects a Dart language class.

Implemented types
Implementers

Constructors

ClassMirror()

Properties

declarations → Map<Symbol, DeclarationMirror>
read-only
Returns an immutable map of the declarations actually given in the class declaration.
hashCode → int
read-only, inherited
The hash code for this object.
hasReflectedType → bool
read-only, inherited
Returns true if this mirror reflects dynamic, a non-generic class or typedef, or an instantiated generic class or typedef in the current isolate. Otherwise, returns false.
instanceMembers → Map<Symbol, MethodMirror>
read-only
Returns a map of the methods, getters and setters of an instance of the class.
isAbstract → bool
read-only
Is the reflectee abstract?
isEnum → bool
read-only
Is the reflectee an enum?
isOriginalDeclaration → bool
read-only, inherited
Is this the original declaration of this type?
isPrivate → bool
read-only, inherited
Whether this declaration is library private.
isTopLevel → bool
read-only, inherited
Whether this declaration is top-level.
location → SourceLocation?
read-only, inherited
The source location of this Dart language entity, or null if the entity is synthetic.
metadata → List<InstanceMirror>
read-only, inherited
A list of the metadata associated with this declaration.
mixin → ClassMirror
read-only
The mixin of this class.
originalDeclaration → TypeMirror
read-only, inherited
A mirror on the original declaration of this type.
owner → DeclarationMirror?
read-only, inherited
A mirror on the owner of this Dart language entity.
qualifiedName → Symbol
read-only, inherited
The fully-qualified name for this Dart language entity.
reflectedType → Type
read-only, inherited
If hasReflectedType returns true, returns the corresponding Type. Otherwise, an UnsupportedError is thrown.
runtimeType → Type
read-only, inherited
A representation of the runtime type of the object.
simpleName → Symbol
read-only, inherited
The simple name for this Dart language entity.
staticMembers → Map<Symbol, MethodMirror>
read-only
Returns a map of the static methods, getters and setters of the class.
superclass → ClassMirror?
read-only
A mirror on the superclass on the reflectee.
superinterfaces → List<ClassMirror>
read-only
A list of mirrors on the superinterfaces of the reflectee.
typeArguments → List<TypeMirror>
read-only, inherited
An immutable list with mirrors for all type arguments for this type.
typeVariables → List<TypeVariableMirror>
read-only, inherited
An immutable list with mirrors for all type variables for this type.

Methods

delegate(Invocation invocation) → dynamic
inherited
Performs invocation on the reflectee of this ObjectMirror.
getField(Symbol fieldName) → InstanceMirror
inherited
Invokes a getter and returns a mirror on the result.
invoke(Symbol memberName, List positionalArguments, [Map<Symbol, dynamic> namedArguments = const <Symbol, dynamic>{}]) → InstanceMirror
inherited
Invokes the named function and returns a mirror on the result.
isAssignableTo(TypeMirror other) → bool
inherited
Checks the assignability relationship, denoted by <=> in the language specification.
isSubclassOf(ClassMirror other) → bool
Returns whether the class denoted by the receiver is a subclass of the class denoted by the argument.
isSubtypeOf(TypeMirror other) → bool
inherited
Checks the subtype relationship, denoted by <: in the language specification.
newInstance(Symbol constructorName, List positionalArguments, [Map<Symbol, dynamic> namedArguments = const <Symbol, dynamic>{}]) → InstanceMirror
Invokes the named constructor and returns a mirror on the result.
noSuchMethod(Invocation invocation) → dynamic
inherited
Invoked when a non-existent method or property is accessed.
setField(Symbol fieldName, dynamic value) → InstanceMirror
inherited
Invokes a setter and returns a mirror on the result.
toString() → String
inherited
A string representation of this object.

Operators

operator ==(Object other) → bool
override
Whether this mirror is equal to other.

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-mirrors/ClassMirror-class.html