Class ASMBoxpiler

java.lang.Object
ortus.boxlang.compiler.Boxpiler
ortus.boxlang.compiler.asmboxpiler.ASMBoxpiler
All Implemented Interfaces:
IBoxpiler

public class ASMBoxpiler extends Boxpiler
  • Field Details

    • DEBUG

      public static final boolean DEBUG
  • Constructor Details

    • ASMBoxpiler

      public ASMBoxpiler()
      Private constructor
  • Method Details

    • getName

      public Key getName()
      Description copied from interface: IBoxpiler
      Gets the unique name identifier for this Boxpiler implementation. This is used by the runtime to distinguish between different compiler implementations (e.g., ASM-based compiler vs. Java source compiler).
      Returns:
      A Key representing the compiler's unique name
    • printTranspiledCode

      public void printTranspiledCode(ParsingResult result, ClassInfo classInfo, PrintStream target)
      Description copied from interface: IBoxpiler
      Prints the transpiled Java source code for debugging purposes. This method is useful for inspecting the generated Java code that results from compiling BoxLang source, particularly for troubleshooting compilation issues.
      Parameters:
      result - The parsing result containing the AST
      classInfo - The class information containing the transpiled code
      target - The PrintStream to write the transpiled code to (e.g., System.out)
    • compileClassInfo

      public List<byte[]> compileClassInfo(String classPoolName, String FQN)
      Description copied from interface: IBoxpiler
      Compiles a class from the class pool into bytecode without loading it. This method retrieves a previously parsed class from the specified class pool and generates its bytecode for storage or transmission.
      Parameters:
      classPoolName - The name of the class pool containing the class
      FQN - The fully qualified name of the class to compile
      Returns:
      A list of byte arrays representing the compiled class and any inner classes