VMClassContext<T> class

A runtime context, for classes, of the VM.

Implements the object instance reference of a running class.

Inheritance
Available Extensions

Constructors

VMClassContext(ASTClass<T> clazz, {VMContext? parent, VMTypeResolver? typeResolver})

Properties

block ASTBlock
The runtime block of this context.
finalinherited
clazz ASTClass<T>
The class of this context.
getter/setter pair
externalFunctionMapper ApolloExternalFunctionMapper?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
parent VMContext?
The parent context.
finalinherited
root VMContext?
The root context.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
typeResolver VMTypeResolver
The type resolver. If not defined for this instance will get from parent.
no setterinherited

Methods

declareVariable(ASTTypedVariable variable) bool
Declares a variable of type and name without a initial value.
inherited
declareVariableWithValue(ASTType type, String name, ASTValue? value) bool
Declares a variable of type and name with an optional value in this context.
inherited
getClassInstance() ASTValue<T>?
An object instance of clazz.
override
getField(String name) ASTVariable?
Returns an ASTVariable of field name.
inherited
getFunction(String name, ASTFunctionSignature parametersSignature) ASTFunctionDeclaration?
Returns a function of name and parametersSignature
inherited
getMappedExternalFunction<R>(String fName, [ASTFunctionSignature? parametersSignature]) ASTExternalFunction<R>?
Returns an ASTExternalFunction of fName and parametersSignature.
inherited
getVariable(String name, bool allowClassFields) FutureOr<ASTVariable?>
Returns an ASTVariable of name in this context.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setClassInstance(ASTValue<T> obj) → void
Defines the current object instance of this context.
setVariable(String name, ASTValue value, bool allowField) bool
Sets an already declared variable of name with value in this context.
inherited
toString() String
A string representation of this object.
inherited

Operators

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