HTNamespace class

A namespace that will return the actual value of the declaration.

Inheritance
Implementers

Constructors

HTNamespace({required HTLexicon lexicon, String? id, String? classId, HTNamespace? closure, HTSource? source, bool isTopLevel = false})

Properties

classId String?
finalinherited
closure HTNamespace?
no setteroverride
displayName String
no setterinherited
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
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
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 setteroverride
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.
override
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}) → void
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
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 = false, bool throws = true}) → dynamic
Fetch a value from this namespace, Return declaration rather than actual values. If not found and isRecursive is true, will continue search in super namespaces. If isRecursive is true, means this is not a 'memberget operator' search.
override
memberSet(String varName, dynamic varValue, {String? from, bool isRecursive = false, bool throws = true}) bool
Fetch a declaration from this namespace, if not found and isRecursive is true, will continue search in super namespaces, then assign the value to that declaration. If isRecursive is true, means this is not a 'memberset operator' search.
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