Package org.jibx.binding.classes
Class MarshalUnmarshalBuilder
java.lang.Object
org.jibx.binding.classes.BindingMethod
org.jibx.binding.classes.MethodBuilder
org.jibx.binding.classes.ExceptionMethodBuilder
org.jibx.binding.classes.ContextMethodBuilder
org.jibx.binding.classes.MarshalUnmarshalBuilder
- Direct Known Subclasses:
MarshalBuilder
,UnmarshalBuilder
Builder for marshal and unmarshal methods. Adds exception accumulation with
actual handling provided by the subclass.
- Author:
- Dennis M. Sosnoski
-
Field Summary
Fields inherited from class org.jibx.binding.classes.MethodBuilder
EXCEPTION_CONSTRUCTOR_SIGNATURE1, EXCEPTION_CONSTRUCTOR_SIGNATURE2, FRAMEWORK_EXCEPTION_CLASS, m_exceptions, m_generator, m_hashCode, m_instructionBuilder, m_item, m_method, m_targetBranches, m_valueMap, s_argNameLists, SYNTHETIC_ACCESS_FLAG
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
MarshalUnmarshalBuilder
(String name, Type ret, Type[] args, ClassFile mf, int access, int obj, String type, int ctx, String ctype) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionabstract InstructionHandle
Add exception handler code.protected void
Process accumulated exceptions.Methods inherited from class org.jibx.binding.classes.ContextMethodBuilder
getFullName, isStaticMethod, loadContext, loadContext, loadObject, loadObject, setObjectSlot, storeObject
Methods inherited from class org.jibx.binding.classes.ExceptionMethodBuilder
defineSlot, freeSlot, getSlot
Methods inherited from class org.jibx.binding.classes.MethodBuilder
addException, addLocal, addMethod, addMethodExceptions, appendAASTORE, appendACONST_NULL, appendALOAD, appendARRAYLENGTH, appendASTORE, appendCall, appendCallInit, appendCallInterface, appendCallStatic, appendCallVirtual, appendCreateArray, appendCreateCast, appendCreateCast, appendCreateNew, appendDCMPG, appendDUP, appendDUP_X1, appendDUP2, appendFCMPG, appendGet, appendGetField, appendGetStatic, appendIASTORE, appendICONST_0, appendICONST_1, appendIF_ICMPNE, appendIFEQ, appendIFGE, appendIFLT, appendIFNE, appendIFNONNULL, appendIFNULL, appendIncrementLocal, appendInstanceOf, appendISUB, appendIXOR, appendLCMP, appendLoadConstant, appendLoadConstant, appendLoadConstant, appendLoadLocal, appendPOP, appendPOP2, appendPut, appendPutField, appendPutStatic, appendReturn, appendReturn, appendStoreLocal, appendSWAP, appendSWAP1For2, appendTargetACONST_NULL, appendTargetCreateNew, appendTargetLoadConstant, appendTargetLoadConstant, appendTargetNOP, appendThrow, appendUnconditionalBranch, codeComplete, createLocal, getAccessFlags, getFirstInstruction, getItem, getKeyValue, getLastInstruction, getMethod, getName, getSignature, hashCode, initStackState, initStackState, initStackState, internalAppendCreateNew, isStackTopLong, setAccessFlags, setKeyValue, setTarget, targetNext, targetNext
Methods inherited from class org.jibx.binding.classes.BindingMethod
computeMethodHash, equals, getClassFile, makeAccessible
-
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 builtret
- method return typeargs
- types of argumentsmf
- method generation class file informationaccess
- flags for method accessobj
- variable slot for current objecttype
- marshalled or unmarshalled class namectx
- variable slot for marshalling/unmarshalling contextctype
- 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 thegenExceptionHandler()
method to build the handler body.- Overrides:
handleExceptions
in classExceptionMethodBuilder
-