Class Closure

java.lang.Object
com.strobel.compilerservices.Closure

public final class Closure extends Object
Represents the runtime state of a dynamically generated method.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final Object[]
    Represents the non-trivial constants and locally executable expressions that are referenced by a dynamically generated method.
    final Object[]
    Represents the hoisted local variables from the parent context.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Closure(Object[] constants, Object[] locals)
    Creates an object to hold state of a dynamically generated method.
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • constants

      public final Object[] constants
      Represents the non-trivial constants and locally executable expressions that are referenced by a dynamically generated method.
    • locals

      public final Object[] locals
      Represents the hoisted local variables from the parent context.
  • Constructor Details

    • Closure

      public Closure(Object[] constants, Object[] locals)
      Creates an object to hold state of a dynamically generated method.
      Parameters:
      constants - The constant values used by the method.
      locals - The hoisted local variables from the parent context.