HTClass class

The Dart implementation of the class declaration in Hetu.

Inheritance
Mixed-in types

Constructors

HTClass(HTInterpreter interpreter, {String? id, String? classId, HTNamespace? closure, HTSource? source, String? documentation, List<HTGenericTypeParameter> genericTypeParameters = const [], HTType? superType, Iterable<HTType> withTypes = const [], Iterable<HTType> implementsTypes = const [], bool isPrivate = false, bool isExternal = false, bool isAbstract = false, bool isEnum = false, HTClass? superClass, bool hasUserDefinedConstructor = false})
Create a default HTClass instance.

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
externalClass HTExternalClass?
getter/setter pair
genericTypeParameters List<HTGenericTypeParameter>
finalinherited
hashCode int
The hash code for this object.
no setterinherited
hasUserDefinedConstructor bool
final
id String?
finalinherited
idRange SourceRange
finalinherited
implementsTypes Iterable<HTType>
Implemented classes of this class. Implements only inherits methods declaration, and the child must re-define all implements methods, and the re-definition must be of the same function signature.
finalinherited
instanceIndex int
no setter
interpreter HTInterpreter
latefinalinherited
isAbstract bool
finalinherited
isConst bool
Wether this declaration is a const value.
finalinherited
isEnum bool
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
isNested bool
no setterinherited
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
name String
no setterinherited
namespace HTClassNamespace
The HTNamespace for this class, for searching for static variables.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source HTSource?
finalinherited
sourceRange SourceRange
finalinherited
superClass HTClass?
Super class of this class. If a class is not extends from any super class, then it is extended of class Object
getter/setter pair
superType HTType?
no setterinherited
value ↔ dynamic
getter/setter pairinherited
valueType HTType?
Mixined class of this class. Those mixined class can not have any constructors. Implemented classes of this class. Implements only inherits methods declaration, and the child must re-define all implements methods, and the re-definition must be of the same function signature.
getter/setter pairoverride-getter
withTypes Iterable<HTType>
Mixined class of this class. Those mixined class can not have any constructors.
finalinherited

Methods

clone() HTClass
Create a copy of this declaration, mainly used on class member inheritance and function arguments passing.
override
contains(String id) bool
Create a HTInstance of this HTClass, will not call constructors
override
define(String id, dynamic value, {bool override = false}) → void
inherited
help() String
invoke(String funcName, {List positionalArgs = const [], Map<String, dynamic> namedArgs = const {}}) → dynamic
Call a static function of this HTClass.
memberGet(String id, {String? from, bool isRecursive = false, bool ignoreUndefined = true}) → dynamic
Get the value of a static member from this HTClass via memberGet operator '.' for symbol searching, use the same name method on HTClassNamespace instead.
override
memberSet(String id, dynamic value, {String? from, bool defineIfAbsent = false}) → void
Set the value of a static member of this HTClass via memberGet operator '.' for symbol searching, use the same name method on HTClassNamespace instead.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve() → void
override
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