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, String? documentation, bool isPrivate = false, bool isTopLevel = false})

Properties

classId String?
Wether this declaration is a class member.
finalinherited
closure HTNamespace?
no setteroverride
declType HTType?
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, dynamic>
finalinherited
importedSymbolsPath Map<String, String>
finalinherited
imports Map<String, UnresolvedImport>
finalinherited
isConst bool
Wether this declaration is a const value.
finalinherited
isExternal bool
Wether this declaration is from outside of the script.
finalinherited
isField bool
Wether this declaration is a member of a class or struct.
finalinherited
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
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
TODO: remove lexicon, save private symbols into separate maps when defined instead.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source HTSource?
finalinherited
sourceRange SourceRange
finalinherited
symbols Map<String, dynamic>
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 id, {bool isPrivate = false, String? from, bool recursive = false}) bool
inherited
declareExport(String id) → void
inherited
declareImport(UnresolvedImport decl) → void
inherited
define(String id, dynamic 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, dynamic decl, String from) → void
inherited
delete(String id, {bool throws = true}) → void
inherited
help({bool displayNamespaceName = true}) String
import(HTDeclarationNamespace other, {bool clone = false, bool export = false, Set<String> showList = const {}, bool idOnly = false}) → void
inherited
memberGet(String id, {String? from, bool isRecursive = false, bool isPrivate = false, bool ignoreUndefined = false, bool asDeclaration = false}) → 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 id, dynamic value, {String? from, bool defineIfAbsent = false, bool isRecursive = false, bool ignoreUndefined = false}) 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 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
toString() String
A string representation of this object.
inherited

Operators

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