ThrowingReflector class

A Reflector implementation that throws exceptions on all attempts to perform reflection.

Use this in contexts where you know you won't need any reflective capabilities.

Inheritance

Constructors

ThrowingReflector({String errorMessage: defaultErrorMessage})
const

Properties

errorMessage String
The error message to give the end user when an UnsupportedError is thrown.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

getName(Symbol symbol) String
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
reflectClass(Type clazz) ReflectedClass
override
reflectFunction(Function function) ReflectedFunction
override
reflectFutureOf(Type type) ReflectedType
inherited
reflectInstance(Object object) ReflectedInstance
override
reflectType(Type type) ReflectedType
override
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Constants

defaultErrorMessage → const String
'You attempted to perform a reflective action, but you are using `ThrowingReflector`, ' 'a class which disables reflection. Consider using the `MirrorsReflector` ' 'class if you ne…