DartObject class

A representation of the value of a compile-time constant expression.

Note that, unlike the mirrors system, the object being represented does not exist. This interface allows static analysis tools to determine something about the state of the object that would exist if the code that creates the object were executed, but none of the code being analyzed is actually executed.

Clients may not extend, implement or mix-in this class.

Constructors

DartObject()

Properties

hasKnownValue → bool
Return true if the value of the object being represented is known. [...]
read-only
isNull → bool
Return true if the object being represented represents the value 'null'.
read-only
type ParameterizedType
Return a representation of the type of the object being represented. [...]
read-only
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

getField(String name) DartObject
Return a representation of the value of the field with the given name. [...]
toBoolValue() → bool
Return a boolean corresponding to the value of the object being represented, or null if [...]
toDoubleValue() → double
Return a double corresponding to the value of the object being represented, or null if [...]
toIntValue() → int
Return an integer corresponding to the value of the object being represented, or null if [...]
toListValue() → List<DartObject>
Return a list corresponding to the value of the object being represented, or null if [...]
toMapValue() → Map<DartObject, DartObject>
Return a map corresponding to the value of the object being represented, or null if [...]
toSetValue() → Set<DartObject>
Return a set corresponding to the value of the object being represented, or null if [...]
toStringValue() → String
Return a string corresponding to the value of the object being represented, or null if [...]
toSymbolValue() → String
Return a string corresponding to the value of the object being represented, or null if [...]
toTypeValue() DartType
Return the representation of the type corresponding to the value of the object being represented, or null if [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited