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 id) bool
override
define(String id, dynamic value, {bool override = false}) → void
inherited
getTypeString() String
help() 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 id, {String? from, bool isRecursive = false, bool ignoreUndefined = true, String? cast}) → dynamic
Get the value of a member from this HTInstace via memberGet operator '.' for symbol searching, use the same name method on HTInstanceNamespace instead. HTInstance overrided HTObject'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 id, dynamic value, {String? from, bool defineIfAbsent = false, String? cast, bool throws = true}) → void
Set the value of a member from this HTInstace via memberGet operator '.' for symbol searching, use the same name method on HTInstanceNamespace instead. HTInstance overrided HTObject'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 id, {String? from}) → dynamic
Fetch a member by the id, in the form of
inherited
subSet(dynamic id, dynamic value, {String? from}) → void
Assign a value to a member by the id, 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