MirrorSystem class - dart:mirrors library (original) (raw)

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.

Constructors

MirrorSystem()

Properties

dynamicTypeTypeMirror

A mirror on the dynamic type.

no setter

hashCodeint

The hash code for this object.

no setterinherited

isolateIsolateMirror

A mirror on the isolate associated with this MirrorSystem.

no setter

librariesMap<Uri, LibraryMirror>

All libraries known to the mirror system, indexed by their URI.

no setter

neverTypeTypeMirror

A mirror on the Never type.

no setter

runtimeTypeType

A representation of the runtime type of the object.

no setterinherited

voidTypeTypeMirror

A mirror on the void type.

no setter

Methods

findLibrary(Symbol libraryName)→ LibraryMirror

Returns the unique library named libraryName if it exists.

noSuchMethod(Invocation invocation)→ dynamic

Invoked when a nonexistent method or property is accessed.

inherited

toString()→ String

A string representation of this object.

inherited

Operators

operator ==(Object other)→ bool

The equality operator.

inherited

Static Methods

getName(Symbol symbol)→ String

Returns the name of symbol.

getSymbol(String name, [LibraryMirror? library])→ Symbol

Returns a symbol for name.