DartObject class abstract
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
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasKnownValue → bool
-
Return
trueif the value of the object being represented is known.no setter - isNull → bool
-
Return
trueif the object being represented represents the value 'null'.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → DartType?
-
Return a representation of the type of the object being represented.
no setter
- variable → VariableElement?
-
If this object is the value of a constant variable, the variable.
no setter
Methods
-
getField(
String name) → DartObject? -
Return a representation of the value of the field with the given
name. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBoolValue(
) → bool? -
Return a boolean corresponding to the value of the object being
represented, or
nullif -
toDoubleValue(
) → double? -
Return a double corresponding to the value of the object being represented,
or
nullif -
toFunctionValue(
) → ExecutableElement? -
Return an element corresponding to the value of the object being
represented, or
nullif -
toIntValue(
) → int? -
Return an integer corresponding to the value of the object being
represented, or
nullif -
toListValue(
) → List< DartObject> ? -
Return a list corresponding to the value of the object being represented,
or
nullif -
toMapValue(
) → Map< DartObject?, DartObject?> ? -
Return a map corresponding to the value of the object being represented, or
nullif -
toSetValue(
) → Set< DartObject> ? -
Return a set corresponding to the value of the object being represented,
or
nullif -
toString(
) → String -
A string representation of this object.
inherited
-
toStringValue(
) → String? -
Return a string corresponding to the value of the object being represented,
or
nullif -
toSymbolValue(
) → String? -
Return a string corresponding to the value of the object being represented,
or
nullif -
toTypeValue(
) → DartType? -
Return the representation of the type corresponding to the value of the
object being represented, or
nullif
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited