HTFunction class

Bytecode implementation of TypedFunctionDeclaration.

Inheritance
Mixed-in types

Constructors

HTFunction(String fileName, String moduleName, HTInterpreter interpreter, {required String internalName, String? id, String? classId, HTDeclarationNamespace? closure, HTSource? source, bool isExternal = false, bool isStatic = false, bool isConst = false, bool isTopLevel = 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 isField = false, bool isAbstract = false, bool isVariadic = false, int minArity = 0, int maxArity = 0, HTDeclarationNamespace? namespace, Function? externalFunc, int? definitionIp, int? definitionLine, int? definitionColumn, RedirectingConstructor? redirectingConstructor, HTClass? klass})
Create a standard HTFunction.

Properties

category FunctionCategory
finalinherited
classId String?
finalinherited
closure HTDeclarationNamespace?
finalinherited
declType HTFunctionType
finalinherited
definitionColumn int?
latefinalinherited
definitionIp int?
latefinalinherited
definitionLine int?
latefinalinherited
displayName String
no setterinherited
externalFunc Function?
getter/setter pair
externalTypeId String?
finalinherited
fileName 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 HTEntity?
getter/setter pairinherited
internalName String
finalinherited
interpreter HTInterpreter
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
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
isVariadic bool
finalinherited
klass HTClass?
getter/setter pair
maxArity int
finalinherited
minArity int
finalinherited
moduleName String
latefinalinherited
namespace HTDeclarationNamespace?
getter/setter pairinherited
paramDecls Map<String, HTAbstractParameter>
no setterinherited
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
Print function signature to String with function id and parameter id.
getter/setter pairinherited-setteroverride-getter
valueType HTFunctionType
no setteroverride

Methods

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