DeclaredVariables class

An object used to provide access to the values of variables that have been defined on the command line using the -D option.

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

Constructors

DeclaredVariables()
Initialize a newly created set of declared variables in which there are no variables.
DeclaredVariables.fromMap(Map<String, String> variableMap)
Initialize a newly created set of declared variables to define variables whose names are the keys in the give variableMap and whose values are the corresponding values from the map.

Properties

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
variableNames Iterable<String>
Return the names of the variables for which a value has been defined.
read-only

Methods

addAll(DeclaredVariables other) → void
Add all variables of other to this object.
define(String name, String value) → void
Define a variable with the given name to have the given value.
get(String name) String
Return the raw string value of the variable with the given name, or null of the variable is not defined.
getBool(TypeProvider typeProvider, String name) DartObject
Return the value of the variable with the given name interpreted as a 'boolean' value. If the variable is not defined (or name is null), a DartObject representing "unknown" is returned. If the value cannot be parsed as a boolean, a DartObject representing 'null' is returned. The typeProvider is the type provider used to find the type 'bool'.
@Deprecated("Clients don't need this functionality")
getInt(TypeProvider typeProvider, String name) DartObject
Return the value of the variable with the given name interpreted as an integer value. If the variable is not defined (or name is null), a DartObject representing "unknown" is returned. If the value cannot be parsed as an integer, a DartObject representing 'null' is returned.
@Deprecated("Clients don't need this functionality")
getString(TypeProvider typeProvider, String name) DartObject
Return the value of the variable with the given name interpreted as a String value, or null if the variable is not defined. Return the value of the variable with the given name interpreted as a String value. If the variable is not defined (or name is null), a DartObject representing "unknown" is returned. The typeProvider is the type provider used to find the type 'String'.
@Deprecated("Clients don't need this functionality")
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