Class MarshalBuilder


public class MarshalBuilder extends MarshalUnmarshalBuilder
Marshalling method builder. Tracks the creation of a marshalling method, including special handling of exceptions that may be generated by object accesses during the marshalling process.
Author:
Dennis M. Sosnoski
  • Field Details

    • MARSHALCONTEXT_CLASS

      private static final String MARSHALCONTEXT_CLASS
      See Also:
    • MARSHAL_EXCEPTION_TEXT

      protected static final String MARSHAL_EXCEPTION_TEXT
      See Also:
    • MARSHALCONTEXT_TYPE

      private static final Type MARSHALCONTEXT_TYPE
  • Constructor Details

    • MarshalBuilder

      public MarshalBuilder(String name, ClassFile cf, ClassFile mf)
      Constructor. This sets up for constructing a marshalling method with public access and wrapped exception handling. If the method is being generated directly to the class being marshalled it's built as a virtual method; otherwise, it's done as a static method.
      Parameters:
      name - method name to be built
      cf - owning class file information
      mf - method generation class file information
  • Method Details

    • genExceptionHandler

      public InstructionHandle genExceptionHandler()
      Add exception handler code. The implementation of this abstract base class method provides handling specific to a marshalling method.
      Specified by:
      genExceptionHandler in class MarshalUnmarshalBuilder
      Returns:
      handle for first instruction in handler