|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jibx.binding.classes.BindingMethod
org.jibx.binding.classes.MethodBuilder
org.jibx.binding.classes.ExceptionMethodBuilder
org.jibx.binding.classes.ContextMethodBuilder
public class ContextMethodBuilder
Builder for binding methods with a context and, optionally, a current object. Tracks the current object reference and the context object reference positions in the local variables table.
Field Summary | |
---|---|
private int |
m_contextSlot
Variable slot for context reference. |
private java.lang.String |
m_contextType
Context type as accessed by method. |
private boolean |
m_isStatic
Context type as accessed by method. |
private int |
m_objectSlot
Variable slot for current object reference. |
private java.lang.String |
m_objectType
Object type as accessed by method ( null if none). |
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 | |
---|---|
ContextMethodBuilder(java.lang.String name,
java.lang.String sig,
ClassFile cf,
int access,
int obj,
java.lang.String type,
int ctx,
java.lang.String ctype)
Constructor from signature. |
|
ContextMethodBuilder(java.lang.String name,
java.lang.String sig,
ClassFile cf,
int obj,
java.lang.String type,
int ctx,
java.lang.String ctype)
Constructor from signature for public, final method. |
|
ContextMethodBuilder(java.lang.String name,
Type ret,
Type[] args,
ClassFile cf,
int access,
int obj,
java.lang.String type,
int ctx,
java.lang.String ctype)
Constructor with types specified. |
Method Summary | |
---|---|
java.lang.String |
getFullName()
Construct fully-qualified class and method name for method under construction. |
boolean |
isStaticMethod()
Check if method is static. |
void |
loadContext()
Append instruction to load context to stack. |
void |
loadContext(java.lang.String type)
Append instruction(s) to load context to stack as specified type. |
void |
loadObject()
Append instruction to load object to stack. |
void |
loadObject(java.lang.String type)
Append instruction(s) to load object to stack as specified type. |
void |
setObjectSlot(int slot)
Set current object slot. |
void |
storeObject()
Append instruction to store object from stack. |
Methods inherited from class org.jibx.binding.classes.ExceptionMethodBuilder |
---|
defineSlot, freeSlot, getSlot, handleExceptions |
Methods inherited from class org.jibx.binding.classes.BindingMethod |
---|
computeMethodHash, equals, getClassFile, makeAccessible |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int m_objectSlot
private java.lang.String m_objectType
null
if none).
private int m_contextSlot
private java.lang.String m_contextType
private final boolean m_isStatic
Constructor Detail |
---|
public ContextMethodBuilder(java.lang.String name, Type ret, Type[] args, ClassFile cf, int access, int obj, java.lang.String type, int ctx, java.lang.String ctype)
name
- method name to be builtret
- method return typeargs
- types of argumentscf
- owning class file informationaccess
- flags for method accessobj
- variable slot for current object (negative value if to be
defined later)type
- current object type as defined in method (null
if none)ctx
- variable slot for marshalling/unmarshalling contextctype
- context type as defined in methodpublic ContextMethodBuilder(java.lang.String name, java.lang.String sig, ClassFile cf, int access, int obj, java.lang.String type, int ctx, java.lang.String ctype)
name
- method name to be builtsig
- method signaturecf
- owning class file informationaccess
- flags for method accessobj
- variable slot for current object (negative value if to be
defined later)type
- current object typectx
- variable slot for marshalling/unmarshalling contextctype
- context type as defined in methodpublic ContextMethodBuilder(java.lang.String name, java.lang.String sig, ClassFile cf, int obj, java.lang.String type, int ctx, java.lang.String ctype)
name
- method name to be builtsig
- method signaturecf
- owning class file informationobj
- variable slot for current object (negative value if to be
defined later)type
- current object typectx
- variable slot for marshalling/unmarshalling contextctype
- context type as defined in methodMethod Detail |
---|
public void setObjectSlot(int slot)
slot
- local variable slot for current objectpublic void loadObject()
public void storeObject()
public void loadObject(java.lang.String type)
type
- loaded type expected on stackpublic void loadContext()
public void loadContext(java.lang.String type)
type
- loaded type expected on stackpublic boolean isStaticMethod()
true
if static, false
if notpublic java.lang.String getFullName()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |