Dart API Referencedart:mirrorsMirrorSystem

MirrorSystem abstract class

A MirrorSystem is the main interface used to reflect on a set of associated libraries.

At runtime each running isolate has a distinct MirrorSystem.

It is also possible to have a MirrorSystem which represents a set of libraries which are not running -- perhaps at compile-time. In this case, all available reflective functionality would be supported, but runtime functionality (such as invoking a function or inspecting the contents of a variable) would fail dynamically.

abstract class MirrorSystem {
  /**
   * An immutable map from from library names to mirrors for all
   * libraries known to this mirror system.
   */
  Map<String, LibraryMirror> get libraries;

  /**
   * A mirror on the isolate associated with this [MirrorSystem].
   * This may be null if this mirror system is not running.
   */
  IsolateMirror get isolate;

  /**
   * A mirror on the [:Dynamic:] type.
   */
  TypeMirror get dynamicType;

  /**
   * A mirror on the [:void:] type.
   */
  TypeMirror get voidType;
}

Properties

final TypeMirror dynamicType #

A mirror on the Dynamic type.

TypeMirror get dynamicType;

final IsolateMirror isolate #

A mirror on the isolate associated with this MirrorSystem. This may be null if this mirror system is not running.

IsolateMirror get isolate;

final Map<String, LibraryMirror> libraries #

An immutable map from from library names to mirrors for all libraries known to this mirror system.

Map<String, LibraryMirror> get libraries;

final TypeMirror voidType #

A mirror on the void type.

TypeMirror get voidType;