HTDeclarationNamespace<T> class
A semantic namespace that holds symbol for resolving.
- Inheritance
-
- Object
- HTDeclaration
- HTDeclarationNamespace
- Mixed-in types
- Implementers
Constructors
- HTDeclarationNamespace({String? id, String? classId, HTDeclarationNamespace? closure, HTSource? source, String? documentation, required HTLexicon lexicon, bool isPrivate = false})
Properties
- classId → String?
-
Wether this declaration is a class member.
finalinherited
- closure → HTDeclarationNamespace?
-
finalinherited
- declType → HTType?
-
no setterinherited
- displayName → String
-
no setterinherited
- documentation → String?
-
finalinherited
-
exports
→ Set<
String> -
final
- fullName → String
-
The full closure path of this namespace
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
finalinherited
- idRange → SourceRange
-
finalinherited
-
importedSymbols
→ Map<
String, T> -
final
-
importedSymbolsPath
→ Map<
String, String> -
final
-
imports
→ Map<
String, UnresolvedImport> -
final
- 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.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → HTSource?
-
finalinherited
- sourceRange → SourceRange
-
finalinherited
-
symbols
→ Map<
String, T> -
final
- value ↔ dynamic
-
getter/setter pairinherited
- valueType → HTType?
-
no setterinherited
- willExportAll ↔ bool
-
getter/setter pair
Methods
-
clone(
) → HTDeclarationNamespace< T> -
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 -
override
-
declareExport(
String id) → void -
declareImport(
UnresolvedImport decl) → void -
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
override
-
defineImport(
String key, T decl, String from) → void -
delete(
String id, {bool throws = true}) → void -
import(
HTDeclarationNamespace other, {bool clone = false, bool export = false, Set< String> showList = const {}, bool idOnly = false}) → void -
memberGet(
String id, {String? from, bool isRecursive = false, bool ignoreUndefined = false, bool isPrivate = false}) → dynamic -
Fetch a value from this namespace,
Return declaration rather than actual values.
If not found and
isRecursiveis true, will continue search in super namespaces. IfisRecursiveis true, means this is not a 'memberget operator' search.override -
memberSet(
String id, dynamic value, {String? from, bool defineIfAbsent = false}) → void -
Assign a value to a member by the
id, in the form ofinherited -
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 ofinherited -
subSet(
dynamic id, dynamic value, {String? from}) → void -
Assign a value to a member by the
id, in the form ofinherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited