Class MarshalUnmarshalBuilder

Direct Known Subclasses:
MarshalBuilder, UnmarshalBuilder

public abstract class MarshalUnmarshalBuilder extends ContextMethodBuilder
Builder for marshal and unmarshal methods. Adds exception accumulation with actual handling provided by the subclass.
Author:
Dennis M. Sosnoski
  • Constructor Details

    • MarshalUnmarshalBuilder

      protected MarshalUnmarshalBuilder(String name, Type ret, Type[] args, ClassFile mf, int access, int obj, String type, int ctx, String ctype)
      Constructor. This sets up for constructing the marshal or unmarshal method.
      Parameters:
      name - method name to be built
      ret - method return type
      args - types of arguments
      mf - method generation class file information
      access - flags for method access
      obj - variable slot for current object
      type - marshalled or unmarshalled class name
      ctx - variable slot for marshalling/unmarshalling context
      ctype - context type as defined in method
  • Method Details

    • genExceptionHandler

      public abstract InstructionHandle genExceptionHandler()
      Add exception handler code. This method must be implemented by each subclass to provide the appropriate handling code.
      Returns:
      handle for first instruction in handler
    • handleExceptions

      protected void handleExceptions()
      Process accumulated exceptions. Sets up an exception handler framework and then calls the genExceptionHandler() method to build the handler body.
      Overrides:
      handleExceptions in class ExceptionMethodBuilder