HTInstanceNamespace class

A implementation of HTNamespace for HTInstance. For interpreter searching for symbols within instance methods. HTInstanceNamespace is a linked list node, it holds its super classes' HTInstanceNamespace's referrences.

Inheritance

Constructors

HTInstanceNamespace({required HTLexicon lexicon, required String id, required HTInstance instance, HTInstanceNamespace? runtimeInstanceNamespace, String? classId, HTNamespace? closure})

Properties

classId String?
finalinherited
closure HTNamespace?
no setterinherited
displayName String
no setterinherited
documentation String?
finalinherited
exports Set<String>
finalinherited
fullName String
The full closure path of this namespace
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String?
finalinherited
idRange SourceRange
finalinherited
importedSymbols Map<String, HTDeclaration>
finalinherited
imports Map<String, UnresolvedImportStatement>
finalinherited
instance HTInstance
final
isConst bool
Wether this declaration is a const value.
finalinherited
isExternal bool
Wether this declaration is from outside of the script.
finalinherited
isMember bool
Wether this declaration is a member of a class or struct.
no setterinherited
isMutable bool
Wether this declaration's value can be assigned to another value.
finalinherited
isPrivate bool
Wether this declaration is only accessible from the same namespace.
no setterinherited
isResolved bool
no setterinherited
isStatic bool
Wether this declaration is static in a class.
finalinherited
isTopLevel bool
Wether this declaration is defined on top level of a source.
finalinherited
lexicon HTLexicon
finalinherited
next HTInstanceNamespace?
The namespace of the child class The namespace of the super class
latefinal
runtimeInstanceNamespace HTInstanceNamespace
The namespace of the runtime instance.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source HTSource?
finalinherited
sourceRange SourceRange
finalinherited
symbols Map<String, HTDeclaration>
finalinherited
value ↔ dynamic
getter/setter pairinherited
valueType HTType?
no setterinherited
willExportAll bool
getter/setter pairinherited

Methods

clone() HTDeclarationNamespace<HTDeclaration>
Create a copy of this declaration, mainly used on class member inheritance and function arguments passing.
inherited
contains(String varName, {bool isPrivate = false, String? from, bool recursive = false}) bool
inherited
declareExport(String id) → void
inherited
declareImport(UnresolvedImportStatement decl) → void
inherited
define(String varName, HTDeclaration decl, {bool override = false, bool throws = true}) bool
define a declaration in this namespace, the defined id could be different from declaration's id
inherited
defineImport(String key, HTDeclaration decl) → void
inherited
delete(String varName, {bool throws = true}) → void
inherited
help(String varName) String?
inherited
import(HTDeclarationNamespace other, {bool clone = false, bool export = false, Set<String> showList = const {}, bool idOnly = false}) → void
inherited
memberGet(String varName, {bool isPrivate = false, String? from, bool isRecursive = true, bool throws = true}) → dynamic
HTInstanceNamespace overrided HTNamespace's memberGet, with a new named parameter isRecursive. If isRecursive is false, then it won't continue to try fetching variable from enclosed namespace.
override
memberSet(String varName, dynamic varValue, {String? from, bool isRecursive = true, bool throws = true}) bool
HTInstanceNamespace overrided HTNamespace's memberSet, with a new named parameter isRecursive. If isRecursive is false, then it won't continue to try assigning variable from enclosed namespace.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve() → void
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
toString() String
A string representation of this object.
inherited

Operators

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