Package ortus.boxlang.runtime.types
Class Closure
java.lang.Object
ortus.boxlang.runtime.types.Function
ortus.boxlang.runtime.types.Closure
- All Implemented Interfaces:
Serializable,IBoxRunnable,IFunctionRunnable,IType
- Direct Known Subclasses:
FunctionalMemberAccessArgs,Phase2Closure$closure1
Represents a closure, which is a function, but has less data than a UDF and also retains a reference to the declaring context.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ortus.boxlang.runtime.types.Function
Function.Access -
Field Summary
FieldsFields inherited from class ortus.boxlang.runtime.types.Function
$bx, ARGUMENT_COLLECTION, interceptorService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the context in which this closure was declared.Detects of this Function is executing in the context of a classbooleanDetects of this Function is executing in the context of a classMethods inherited from class ortus.boxlang.runtime.types.Function
_invoke, asString, canOutput, createArgumentsScope, createArgumentsScope, createArgumentsScope, ensureReturnType, generateFunctionContext, generateFunctionContext, getAccess, getAnnotations, getArguments, getBoxMeta, getDefaultOutput, getDocumentation, getEnclosingClass, getMetaData, getModifiers, getName, getReturnType, getRunnableAST, getRunnableCompiledOn, getRunnableCompileVersion, hasModifier, implementsSignature, invoke, requiresStrictArguments, signatureAsStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ortus.boxlang.runtime.runnables.IBoxRunnable
getImports, getRunnablePath, getSourceTypeMethods inherited from interface ortus.boxlang.runtime.types.IType
computeHashCode
-
Field Details
-
defaultName
-
-
Constructor Details
-
Closure
Constructor
-
-
Method Details
-
getDeclaringContext
Get the context in which this closure was declared.- Returns:
- the context.
-
isInClass
public boolean isInClass()Detects of this Function is executing in the context of a class- Returns:
- true if there is an IClassRunnable at the top of the template stack
-
getThisClass
Detects of this Function is executing in the context of a class- Returns:
- the IClassRunnable this context is executing in, or null if not in a class
-