HTInstance class

The Dart implementation of the instance in Hetu. HTInstance carries all decl from its super classes. HTInstance inherits all its super classes' HTTypeIDs.

Mixed-in types

Constructors

HTInstance(HTClass klass, HTInterpreter interpreter, {List<HTType> typeArgs = const [], Map<String, dynamic>? jsonObject})
Create a default HTInstance instance.

Properties

classId String
no setter
hashCode int
The hash code for this object.
no setteroverride
index int
final
interpreter HTInterpreter
latefinalinherited
namespace HTInstanceNamespace
The HTNamespace for this instance. Variables will start from the lowest class, searching through all super classes.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
valueType HTNominalType
final

Methods

contains(String varName) bool
override
getTypeString() String
invoke(String funcName, {List positionalArgs = const [], Map<String, dynamic> namedArgs = const {}, List<HTType> typeArgs = const []}) → dynamic
Call a member function of this HTInstance.
memberGet(String varName, {String? from, String? cast, bool throws = true}) → dynamic
HTInstance overrided HTEntity's memberGet, with a new named parameter cast. If cast is provided, then the instance will only search that cast's corresponed HTInstanceNamespace.
override
memberSet(String varName, dynamic varValue, {String? from, String? cast, bool throws = true}) → void
HTInstance overrided HTEntity's memberSet, with a new named parameter cast. If cast is provided, then the instance will only search that cast's corresponed HTInstanceNamespace.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
subGet(dynamic varName, {String? from}) → dynamic
Fetch a member by the varName, in the form of
inherited
subSet(dynamic varName, dynamic varValue, {String? from}) → void
Assign a value to a member by the varName, in the form of
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

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