HTFunction class

Bytecode implementation of TypedFunctionDeclaration.

Inheritance
Mixed-in types

Constructors

HTFunction(String file, String module, HTInterpreter interpreter, {required String internalName, String? id, String? classId, String? explicityNamespaceId, HTDeclarationNamespace? closure, HTSource? source, String? documentation, bool isPrivate = false, bool isExternal = false, bool isStatic = false, bool isConst = false, bool isTopLevel = false, bool isField = false, FunctionCategory category = FunctionCategory.normal, String? externalTypeId, List<HTGenericTypeParameter> genericTypeParameters = const [], bool hasParamDecls = true, Map<String, HTAbstractParameter> paramDecls = const {}, required HTFunctionType? declType, bool isAsync = false, bool isAbstract = false, bool isVariadic = false, int minArity = 0, int maxArity = 0, Function? externalFunc, int? ip, int? line, int? column, RedirectingConstructor? redirectingConstructor, HTClass? klass, HTNamespace? namespace})
Create a standard HTFunction.

Properties

category → FunctionCategory
finalinherited
classId → String?
Wether this declaration is a class member.
finalinherited
closure → HTDeclarationNamespace?
finalinherited
column ↔ int?
latefinalinherited
declType → HTFunctionType
no setterinherited
displayName → String
no setterinherited
documentation → String?
finalinherited
explicityNamespaceId → String?
Wether this declaration is within a explicity namespace declaration.
finalinherited
externalFunc ↔ Function?
getter/setter pair
externalTypeId → String?
finalinherited
file ↔ String
latefinalinherited
genericTypeParameters → List<HTGenericTypeParameter>
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
hasParamDecls → bool
Wether to check params when called A function like:
finalinherited
id → String?
finalinherited
idRange → SourceRange
finalinherited
instance ↔ dynamic
getter/setter pair
internalName → String
finalinherited
interpreter ↔ HTInterpreter
latefinalinherited
ip ↔ int?
latefinalinherited
isAbstract → bool
finalinherited
isAsync → bool
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
isVariadic → bool
finalinherited
klass ↔ HTClass?
getter/setter pair
line ↔ int?
latefinalinherited
maxArity → int
finalinherited
minArity → int
finalinherited
module ↔ String
latefinalinherited
namespace ↔ HTNamespace?
getter/setter pair
paramDecls → Map<String, HTAbstractParameter>
Holds declarations of all parameters.
finalinherited
redirectingConstructor → RedirectingConstructor?
final
returnType → HTType?
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
source → HTSource?
finalinherited
sourceRange → SourceRange
finalinherited
value ↔ dynamic
getter/setter pairinherited-setteroverride-getter
valueType → HTFunctionType
no setteroverride

Methods

apply(HTStruct struct, {List positionalArgs = const [], Map<String, dynamic> namedArgs = const {}}) → dynamic
bind(HTStruct struct) → HTFunction
call({bool useCallingNamespace = true, bool createInstance = true, List positionalArgs = const [], Map<String, dynamic> namedArgs = const {}}) → dynamic
clone() → HTFunction
Create a copy of this declaration, mainly used on class member inheritance and function arguments passing.
override
contains(String id) → bool
inherited
define(String id, dynamic value, {bool override = false}) → void
inherited
help() → String
memberGet(String id, {String? from, bool isRecursive = false, bool ignoreUndefined = false}) → dynamic
Fetch a member by the id, in the form of
override
memberSet(String id, dynamic value, {String? from, bool defineIfAbsent = false}) → void
Assign a value to a member by the id, in the form of
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve({bool resolveType = true}) → void
override
resolveExternal() → void
resolve free external function & external struct method.
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