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

public abstract class Closure extends Function
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:
  • Field Details

    • defaultName

      public static final Key defaultName
  • Constructor Details

    • Closure

      protected Closure(IBoxContext declaringContext)
      Constructor
  • Method Details

    • getDeclaringContext

      public IBoxContext 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

      public IClassRunnable 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