| java.lang.Object org.jibx.binding.classes.BindingMethod org.jibx.binding.classes.MethodBuilder org.jibx.binding.classes.ExceptionMethodBuilder org.jibx.binding.classes.ContextMethodBuilder
All known Subclasses: org.jibx.binding.classes.MarshalUnmarshalBuilder,
ContextMethodBuilder | public class ContextMethodBuilder extends ExceptionMethodBuilder (Code) | | Builder for binding methods with a context and current object. Tracks the
current object reference and the context object reference positions in the
local variables table.
author: Dennis M. Sosnoski version: 1.0 |
Constructor Summary | |
public | ContextMethodBuilder(String name, Type ret, Type[] args, ClassFile cf, int access, int obj, String type, int ctx, String ctype) Constructor with types specified. | public | ContextMethodBuilder(String name, String sig, ClassFile cf, int access, int obj, String type, int ctx, String ctype) Constructor from signature. | public | ContextMethodBuilder(String name, String sig, ClassFile cf, int obj, String type, int ctx, String ctype) Constructor from signature for public, final method. |
Method Summary | |
public boolean | isStaticMethod() Check if method is static. | public void | loadContext() Append instruction to load context to stack. | public void | loadContext(String type) Append instruction(s) to load context to stack as specified type. | public void | loadObject() Append instruction to load object to stack. | public void | loadObject(String type) Append instruction(s) to load object to stack as specified type. | public void | setObjectSlot(int slot) Set current object slot. | public void | storeObject() Append instruction to store object from stack. |
ContextMethodBuilder | public ContextMethodBuilder(String name, Type ret, Type[] args, ClassFile cf, int access, int obj, String type, int ctx, String ctype) throws JiBXException(Code) | | Constructor with types specified. This sets up for constructing a
binding method that uses a current object and a marshalling or
unmarshalling context.
Parameters: name - method name to be built Parameters: ret - method return type Parameters: args - types of arguments Parameters: cf - owning class file information Parameters: access - flags for method access Parameters: obj - variable slot for current object (negative value if to bedefined later) Parameters: type - current object type as defined in method Parameters: ctx - variable slot for marshalling/unmarshalling context Parameters: ctype - context type as defined in method throws: JiBXException - on error in initializing method construction |
ContextMethodBuilder | public ContextMethodBuilder(String name, String sig, ClassFile cf, int access, int obj, String type, int ctx, String ctype) throws JiBXException(Code) | | Constructor from signature.
Parameters: name - method name to be built Parameters: sig - method signature Parameters: cf - owning class file information Parameters: access - flags for method access Parameters: obj - variable slot for current object (negative value if to bedefined later) Parameters: type - current object type Parameters: ctx - variable slot for marshalling/unmarshalling context Parameters: ctype - context type as defined in method throws: JiBXException - on error in initializing method construction |
ContextMethodBuilder | public ContextMethodBuilder(String name, String sig, ClassFile cf, int obj, String type, int ctx, String ctype) throws JiBXException(Code) | | Constructor from signature for public, final method.
Parameters: name - method name to be built Parameters: sig - method signature Parameters: cf - owning class file information Parameters: obj - variable slot for current object (negative value if to bedefined later) Parameters: type - current object type Parameters: ctx - variable slot for marshalling/unmarshalling context Parameters: ctype - context type as defined in method throws: JiBXException - on error in initializing method construction |
isStaticMethod | public boolean isStaticMethod()(Code) | | Check if method is static.
true if static, false if not |
loadContext | public void loadContext()(Code) | | Append instruction to load context to stack.
|
loadContext | public void loadContext(String type)(Code) | | Append instruction(s) to load context to stack as specified type.
Parameters: type - loaded type expected on stack |
loadObject | public void loadObject()(Code) | | Append instruction to load object to stack.
|
loadObject | public void loadObject(String type)(Code) | | Append instruction(s) to load object to stack as specified type.
Parameters: type - loaded type expected on stack |
setObjectSlot | public void setObjectSlot(int slot)(Code) | | Set current object slot. Sets the local variable position of the current
object, as required when the object is actually created within the
method.
Parameters: slot - local variable slot for current object |
storeObject | public void storeObject()(Code) | | Append instruction to store object from stack.
|
Methods inherited from org.jibx.binding.classes.MethodBuilder | public void addException(String name)(Code)(Java Doc) public int addLocal(String name, Type type)(Code)(Java Doc) public ClassItem addMethod() throws JiBXException(Code)(Java Doc) public void addMethodExceptions(ClassItem method)(Code)(Java Doc) public void appendAASTORE()(Code)(Java Doc) public void appendACONST_NULL()(Code)(Java Doc) public void appendALOAD(String type)(Code)(Java Doc) public void appendARRAYLENGTH()(Code)(Java Doc) public void appendASTORE(String type)(Code)(Java Doc) public void appendCall(ClassItem item)(Code)(Java Doc) public void appendCallInit(String name, String signature)(Code)(Java Doc) public void appendCallInterface(String method, String signature)(Code)(Java Doc) public void appendCallStatic(String method, String signature)(Code)(Java Doc) public void appendCallVirtual(String method, String signature)(Code)(Java Doc) public void appendCreateArray(String type)(Code)(Java Doc) public void appendCreateCast(String from, String to)(Code)(Java Doc) public void appendCreateCast(String to)(Code)(Java Doc) public void appendCreateNew(String name)(Code)(Java Doc) public void appendDCMPG()(Code)(Java Doc) public void appendDUP()(Code)(Java Doc) public void appendDUP2()(Code)(Java Doc) public void appendDUP_X1()(Code)(Java Doc) public void appendFCMPG()(Code)(Java Doc) public void appendGet(ClassItem item)(Code)(Java Doc) public void appendGetField(ClassItem item)(Code)(Java Doc) public void appendGetStatic(ClassItem item)(Code)(Java Doc) public void appendIASTORE()(Code)(Java Doc) public void appendICONST_0()(Code)(Java Doc) public void appendICONST_1()(Code)(Java Doc) public BranchWrapper appendIFEQ(Object src)(Code)(Java Doc) public BranchWrapper appendIFGE(Object src)(Code)(Java Doc) public BranchWrapper appendIFLT(Object src)(Code)(Java Doc) public BranchWrapper appendIFNE(Object src)(Code)(Java Doc) public BranchWrapper appendIFNONNULL(Object src)(Code)(Java Doc) public BranchWrapper appendIFNULL(Object src)(Code)(Java Doc) public BranchWrapper appendIF_ICMPNE(Object src)(Code)(Java Doc) public void appendISUB()(Code)(Java Doc) public void appendIXOR()(Code)(Java Doc) public void appendIncrementLocal(int inc, int slot)(Code)(Java Doc) public void appendInstanceOf(String to)(Code)(Java Doc) public void appendLCMP()(Code)(Java Doc) public void appendLoadConstant(int value)(Code)(Java Doc) public void appendLoadConstant(String value)(Code)(Java Doc) public void appendLoadConstant(Object value)(Code)(Java Doc) public void appendLoadLocal(int slot)(Code)(Java Doc) public void appendPOP()(Code)(Java Doc) public void appendPOP2()(Code)(Java Doc) public void appendPut(ClassItem item)(Code)(Java Doc) public void appendPutField(ClassItem item)(Code)(Java Doc) public void appendPutStatic(ClassItem item)(Code)(Java Doc) public void appendReturn()(Code)(Java Doc) public void appendReturn(Type type)(Code)(Java Doc) public void appendReturn(String type)(Code)(Java Doc) public void appendSWAP()(Code)(Java Doc) public void appendSWAP1For2()(Code)(Java Doc) public void appendStoreLocal(int slot)(Code)(Java Doc) public BranchTarget appendTargetACONST_NULL()(Code)(Java Doc) public BranchTarget appendTargetCreateNew(String name)(Code)(Java Doc) public BranchTarget appendTargetLoadConstant(int value)(Code)(Java Doc) public BranchTarget appendTargetLoadConstant(String value)(Code)(Java Doc) public BranchTarget appendTargetNOP()(Code)(Java Doc) public void appendThrow()(Code)(Java Doc) public BranchWrapper appendUnconditionalBranch(Object src)(Code)(Java Doc) public void codeComplete(boolean suffix) throws JiBXException(Code)(Java Doc) protected LocalVariableGen createLocal(String name, Type type)(Code)(Java Doc) public int getAccessFlags()(Code)(Java Doc) protected InstructionHandle getFirstInstruction()(Code)(Java Doc) public ClassItem getItem()(Code)(Java Doc) public Object getKeyValue(Object key)(Code)(Java Doc) protected InstructionHandle getLastInstruction()(Code)(Java Doc) public Method getMethod()(Code)(Java Doc) public String getName()(Code)(Java Doc) public String getSignature()(Code)(Java Doc) abstract protected void handleExceptions() throws JiBXException(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public void initStackState(BranchWrapper branch)(Code)(Java Doc) public void initStackState(BranchWrapper branch, int pop)(Code)(Java Doc) protected void initStackState(String[] types)(Code)(Java Doc) protected InstructionHandle internalAppendCreateNew(String name)(Code)(Java Doc) public boolean isStackTopLong()(Code)(Java Doc) public void setAccessFlags(int flags)(Code)(Java Doc) public Object setKeyValue(Object key, Object value)(Code)(Java Doc) final protected void setTarget(InstructionHandle inst)(Code)(Java Doc) public void targetNext(BranchWrapper branch)(Code)(Java Doc) public void targetNext(BranchWrapper[] branches)(Code)(Java Doc)
|
|
|