Java Doc for MethodBuilder.java in  » XML » jibx-1.1.5 » org » jibx » binding » classes » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » jibx 1.1.5 » org.jibx.binding.classes 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jibx.binding.classes.BindingMethod
      org.jibx.binding.classes.MethodBuilder

All known Subclasses:   org.jibx.binding.classes.ExceptionMethodBuilder,
MethodBuilder
abstract public class MethodBuilder extends BindingMethod (Code)
Method builder. Organizes and tracks the creation of a method, providing convenience methods for common operations. This is customized for the needs of JiBX, with some predetermined settings as appropriate. It supplies hash code and equality checking based on the method signature and actual byte code of the generated method, ignoring the method name.
author:
   Dennis M. Sosnoski
version:
   1.0


Field Summary
protected static  String[]EMPTY_STRING_ARRAY
     Zero-length string array.
final public static  StringEXCEPTION_CONSTRUCTOR_SIGNATURE1
    
final public static  StringEXCEPTION_CONSTRUCTOR_SIGNATURE2
    
final public static  StringFRAMEWORK_EXCEPTION_CLASS
    
final public static  intSYNTHETIC_ACCESS_FLAG
    
protected  ArrayListm_exceptions
     Exceptions needing to be handled in method (lazy create, null if not used).
protected  MethodGenm_generator
     Generator for constructing method.
protected  intm_hashCode
     Accumulated hash code from adding instructions.
protected  InstructionBuilderm_instructionBuilder
     Builder for class instructions.
protected  ClassItemm_item
     Method class item information.
protected  Methodm_method
     Actual generated method information.
protected  BranchWrapper[]m_targetBranches
     Branch to be aimed at next appended instruction.
protected  HashMapm_valueMap
     Map for initialized properties (lazy create, null if not used).
protected static  ArrayLists_argNameLists
     Table of argument name lists (generated as needed).

Constructor Summary
protected  MethodBuilder(String name, Type ret, Type[] args, ClassFile cf, int access)
     Constructor.

Method Summary
public  voidaddException(String name)
     Add exception to those needing handling.
public  intaddLocal(String name, Type type)
     Add local variable to method.
public  ClassItemaddMethod()
     Add constructed method to class.
public  voidaddMethodExceptions(ClassItem method)
     Add exceptions thrown by called method to those needing handling.
public  voidappendAASTORE()
     Append an AASTORE to the instruction list.
public  voidappendACONST_NULL()
     Append an ACONST_NULL to the instruction list.
public  voidappendALOAD(String type)
     Append appropriate array load to the instruction list.
public  voidappendARRAYLENGTH()
     Append an ARRAYLENGTH to the instruction list.
public  voidappendASTORE(String type)
     Append the appropriate array store to the instruction list.
public  voidappendCall(ClassItem item)
     Create invoke instruction for static, member, or interface method and append to method.
public  voidappendCallInit(String name, String signature)
     Create invoke initializer instruction from signature and append to method.
public  voidappendCallInterface(String method, String signature)
     Create invoke interface method instruction from signature and append to method.
public  voidappendCallStatic(String method, String signature)
     Create invoke static method instruction from signature and append to method.
public  voidappendCallVirtual(String method, String signature)
     Create invoke virtual method instruction from signature and append to method.
public  voidappendCreateArray(String type)
     Append instruction to create instance of array.
public  voidappendCreateCast(String from, String to)
     Append check cast instruction (if needed).
public  voidappendCreateCast(String to)
     Append check cast instruction from object (if needed).
public  voidappendCreateNew(String name)
     Append instruction to create instance of class.
public  voidappendDCMPG()
     Append an DCMPG to the instruction list.
public  voidappendDUP()
     Append a DUP to the instruction list.
public  voidappendDUP2()
     Append a DUP2 to the instruction list.
public  voidappendDUP_X1()
     Append a DUP_X1 to the instruction list.
public  voidappendFCMPG()
     Append an FCMPG to the instruction list.
public  voidappendGet(ClassItem item)
     Create get instruction and append to method.
public  voidappendGetField(ClassItem item)
     Create getfield instruction and append to method.
public  voidappendGetStatic(ClassItem item)
     Create getstatic instruction and append to method.
public  voidappendIASTORE()
     Append an IASTORE to the instruction list.
public  voidappendICONST_0()
     Append an ICONST_0 to the instruction list.
public  voidappendICONST_1()
     Append an ICONST_1 to the instruction list.
public  BranchWrapperappendIFEQ(Object src)
     Append IFEQ branch instruction to method.
public  BranchWrapperappendIFGE(Object src)
     Append IFGE branch instruction to method.
public  BranchWrapperappendIFLT(Object src)
     Append IFLT branch instruction to method.
public  BranchWrapperappendIFNE(Object src)
     Append IFNE branch instruction to method.
public  BranchWrapperappendIFNONNULL(Object src)
     Append IFNONNULL branch instruction to method.
public  BranchWrapperappendIFNULL(Object src)
     Append IFNULL branch instruction to method.
public  BranchWrapperappendIF_ICMPNE(Object src)
     Append IF_ICMPNE branch instruction to method.
public  voidappendISUB()
     Append an ISUB to the instruction list.
public  voidappendIXOR()
     Append an IXOR to the instruction list.
public  voidappendIncrementLocal(int inc, int slot)
     Append instruction to increment local integer variable.
public  voidappendInstanceOf(String to)
     Append instanceof check instruction.
public  voidappendLCMP()
     Append an LCMP to the instruction list.
public  voidappendLoadConstant(int value)
     Create load constant instruction and append to method.
public  voidappendLoadConstant(String value)
     Create load constant instruction and append to method.
public  voidappendLoadConstant(Object value)
     Create load constant instruction and append to method.
public  voidappendLoadLocal(int slot)
     Append instruction to load local variable.
public  voidappendPOP()
     Append a POP to the instruction list.
public  voidappendPOP2()
     Append a POP2 to the instruction list.
public  voidappendPut(ClassItem item)
     Create put instruction and append to method.
public  voidappendPutField(ClassItem item)
     Create putfield instruction and append to method.
public  voidappendPutStatic(ClassItem item)
     Create putstatic instruction and append to method.
public  voidappendReturn()
     Append simple return.
public  voidappendReturn(Type type)
     Append typed return.
public  voidappendReturn(String type)
     Append typed return.
public  voidappendSWAP()
     Append a SWAP to the instruction list.
public  voidappendSWAP1For2()
     Append instructions to exchange a single-word value on the top of the stack with the double-word value below it on the stack.
public  voidappendStoreLocal(int slot)
     Append instruction to store local variable.
public  BranchTargetappendTargetACONST_NULL()
     Append an ACONST_NULL to the instruction list as a branch target.
public  BranchTargetappendTargetCreateNew(String name)
     Append instruction to create instance of class as a branch target.
public  BranchTargetappendTargetLoadConstant(int value)
     Append a load constant instruction as a branch target.
public  BranchTargetappendTargetLoadConstant(String value)
     Append a load constant instruction as a branch target.
public  BranchTargetappendTargetNOP()
     Append a NOP to the instruction list as a branch target.
public  voidappendThrow()
     Append exception throw.
public  BranchWrapperappendUnconditionalBranch(Object src)
     Append unconditional branch instruction to method.
public  voidcodeComplete(boolean suffix)
     Complete method construction.
protected  LocalVariableGencreateLocal(String name, Type type)
     Add local variable to method.
public  intgetAccessFlags()
     Get access flags.
protected  InstructionHandlegetFirstInstruction()
     Get first instruction in method.
public  ClassItemgetItem()
     Get the method item.
public  ObjectgetKeyValue(Object key)
     Get local variable for object.
protected  InstructionHandlegetLastInstruction()
     Get last instruction in method.
public  MethodgetMethod()
     Get the actual method.
public  StringgetName()
     Get name of method being constructed.
public  StringgetSignature()
     Get signature.
abstract protected  voidhandleExceptions()
     Process accumulated exceptions.
public  inthashCode()
     Get hash code.
public  voidinitStackState(BranchWrapper branch)
     Initialize stack state to match branch source.
public  voidinitStackState(BranchWrapper branch, int pop)
     Initialize stack state to partially match branch source.
protected  voidinitStackState(String[] types)
     Initialize stack state to array of value types.
protected  InstructionHandleinternalAppendCreateNew(String name)
     Internal append instruction to create instance of class.
public  booleanisStackTopLong()
     Check if top item on stack is a long value.
public  voidsetAccessFlags(int flags)
     Set access flags.
public  ObjectsetKeyValue(Object key, Object value)
     Add keyed value to method definition.
final protected  voidsetTarget(InstructionHandle inst)
     Target branches if pending.
public  voidtargetNext(BranchWrapper branch)
     Set branch target as next instruction added to method.
public  voidtargetNext(BranchWrapper[] branches)
     Set branch targets as next instruction added to method.

Field Detail
EMPTY_STRING_ARRAY
protected static String[] EMPTY_STRING_ARRAY(Code)
Zero-length string array.



EXCEPTION_CONSTRUCTOR_SIGNATURE1
final public static String EXCEPTION_CONSTRUCTOR_SIGNATURE1(Code)



EXCEPTION_CONSTRUCTOR_SIGNATURE2
final public static String EXCEPTION_CONSTRUCTOR_SIGNATURE2(Code)



FRAMEWORK_EXCEPTION_CLASS
final public static String FRAMEWORK_EXCEPTION_CLASS(Code)



SYNTHETIC_ACCESS_FLAG
final public static int SYNTHETIC_ACCESS_FLAG(Code)



m_exceptions
protected ArrayList m_exceptions(Code)
Exceptions needing to be handled in method (lazy create, null if not used).



m_generator
protected MethodGen m_generator(Code)
Generator for constructing method.



m_hashCode
protected int m_hashCode(Code)
Accumulated hash code from adding instructions.



m_instructionBuilder
protected InstructionBuilder m_instructionBuilder(Code)
Builder for class instructions.



m_item
protected ClassItem m_item(Code)
Method class item information.



m_method
protected Method m_method(Code)
Actual generated method information.



m_targetBranches
protected BranchWrapper[] m_targetBranches(Code)
Branch to be aimed at next appended instruction.



m_valueMap
protected HashMap m_valueMap(Code)
Map for initialized properties (lazy create, null if not used).



s_argNameLists
protected static ArrayList s_argNameLists(Code)
Table of argument name lists (generated as needed).




Constructor Detail
MethodBuilder
protected MethodBuilder(String name, Type ret, Type[] args, ClassFile cf, int access) throws JiBXException(Code)
Constructor. This sets up for constructing a method with public access.
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
throws:
  JiBXException - on error in constructing method




Method Detail
addException
public void addException(String name)(Code)
Add exception to those needing handling.
Parameters:
  name - fully qualified name of exception class



addLocal
public int addLocal(String name, Type type)(Code)
Add local variable to method. The current code in the method must have the initial value for the variable on the stack. The scope of the variable is defined from the preceding instruction to the end of the method.
Parameters:
  name - local variable name
Parameters:
  type - variable type local variable slot number



addMethod
public ClassItem addMethod() throws JiBXException(Code)
Add constructed method to class. Makes the method callable, generating the method information. added method information
throws:
  JiBXException - on error in finishing method construction



addMethodExceptions
public void addMethodExceptions(ClassItem method)(Code)
Add exceptions thrown by called method to those needing handling.
Parameters:
  method - information for method to be handled



appendAASTORE
public void appendAASTORE()(Code)
Append an AASTORE to the instruction list. Doesn't actually check the types, just the count of items present.



appendACONST_NULL
public void appendACONST_NULL()(Code)
Append an ACONST_NULL to the instruction list.



appendALOAD
public void appendALOAD(String type)(Code)
Append appropriate array load to the instruction list.
Parameters:
  type - array item type expected



appendARRAYLENGTH
public void appendARRAYLENGTH()(Code)
Append an ARRAYLENGTH to the instruction list.



appendASTORE
public void appendASTORE(String type)(Code)
Append the appropriate array store to the instruction list.
Parameters:
  type - array item type expected



appendCall
public void appendCall(ClassItem item)(Code)
Create invoke instruction for static, member, or interface method and append to method. Uses the target method information to generate the correct instruction.
Parameters:
  item - information for method to be called



appendCallInit
public void appendCallInit(String name, String signature)(Code)
Create invoke initializer instruction from signature and append to method.
Parameters:
  name - fully qualified class name
Parameters:
  signature - method signature in standard form



appendCallInterface
public void appendCallInterface(String method, String signature)(Code)
Create invoke interface method instruction from signature and append to method.
Parameters:
  method - fully qualified interface and method name
Parameters:
  signature - method signature in standard form



appendCallStatic
public void appendCallStatic(String method, String signature)(Code)
Create invoke static method instruction from signature and append to method.
Parameters:
  method - fully qualified class and method name
Parameters:
  signature - method signature in standard form



appendCallVirtual
public void appendCallVirtual(String method, String signature)(Code)
Create invoke virtual method instruction from signature and append to method.
Parameters:
  method - fully qualified class and method name
Parameters:
  signature - method signature in standard form



appendCreateArray
public void appendCreateArray(String type)(Code)
Append instruction to create instance of array.
Parameters:
  type - fully qualified type name of array elements



appendCreateCast
public void appendCreateCast(String from, String to)(Code)
Append check cast instruction (if needed).
Parameters:
  from - fully qualified name of current type
Parameters:
  to - fully qualified name of desired type



appendCreateCast
public void appendCreateCast(String to)(Code)
Append check cast instruction from object (if needed).
Parameters:
  to - fully qualified name of desired type



appendCreateNew
public void appendCreateNew(String name)(Code)
Append instruction to create instance of class.
Parameters:
  name - fully qualified class name



appendDCMPG
public void appendDCMPG()(Code)
Append an DCMPG to the instruction list.



appendDUP
public void appendDUP()(Code)
Append a DUP to the instruction list.



appendDUP2
public void appendDUP2()(Code)
Append a DUP2 to the instruction list.



appendDUP_X1
public void appendDUP_X1()(Code)
Append a DUP_X1 to the instruction list.



appendFCMPG
public void appendFCMPG()(Code)
Append an FCMPG to the instruction list.



appendGet
public void appendGet(ClassItem item)(Code)
Create get instruction and append to method. This generates either a getstatic or a getfield instruction, as appropriate.
Parameters:
  item - information for field to be gotten



appendGetField
public void appendGetField(ClassItem item)(Code)
Create getfield instruction and append to method. Uses the target field information to generate the instruction.
Parameters:
  item - information for field to be gotton



appendGetStatic
public void appendGetStatic(ClassItem item)(Code)
Create getstatic instruction and append to method. Uses the target field information to generate the instruction.
Parameters:
  item - information for field to be set



appendIASTORE
public void appendIASTORE()(Code)
Append an IASTORE to the instruction list. Doesn't actually check the types, just the count of items present.



appendICONST_0
public void appendICONST_0()(Code)
Append an ICONST_0 to the instruction list.



appendICONST_1
public void appendICONST_1()(Code)
Append an ICONST_1 to the instruction list.



appendIFEQ
public BranchWrapper appendIFEQ(Object src)(Code)
Append IFEQ branch instruction to method.
Parameters:
  src - object responsible for generating branch wrapper for appended conditional branch



appendIFGE
public BranchWrapper appendIFGE(Object src)(Code)
Append IFGE branch instruction to method.
Parameters:
  src - object responsible for generating branch wrapper for appended conditional branch



appendIFLT
public BranchWrapper appendIFLT(Object src)(Code)
Append IFLT branch instruction to method.
Parameters:
  src - object responsible for generating branch wrapper for appended conditional branch



appendIFNE
public BranchWrapper appendIFNE(Object src)(Code)
Append IFNE branch instruction to method.
Parameters:
  src - object responsible for generating branch wrapper for appended conditional branch



appendIFNONNULL
public BranchWrapper appendIFNONNULL(Object src)(Code)
Append IFNONNULL branch instruction to method.
Parameters:
  src - object responsible for generating branch wrapper for appended conditional branch



appendIFNULL
public BranchWrapper appendIFNULL(Object src)(Code)
Append IFNULL branch instruction to method.
Parameters:
  src - object responsible for generating branch wrapper for appended conditional branch



appendIF_ICMPNE
public BranchWrapper appendIF_ICMPNE(Object src)(Code)
Append IF_ICMPNE branch instruction to method.
Parameters:
  src - object responsible for generating branch wrapper for appended conditional branch



appendISUB
public void appendISUB()(Code)
Append an ISUB to the instruction list.



appendIXOR
public void appendIXOR()(Code)
Append an IXOR to the instruction list.



appendIncrementLocal
public void appendIncrementLocal(int inc, int slot)(Code)
Append instruction to increment local integer variable.
Parameters:
  inc - amount of incrment
Parameters:
  slot - local variable slot to load



appendInstanceOf
public void appendInstanceOf(String to)(Code)
Append instanceof check instruction.
Parameters:
  to - fully qualified name of type to check



appendLCMP
public void appendLCMP()(Code)
Append an LCMP to the instruction list.



appendLoadConstant
public void appendLoadConstant(int value)(Code)
Create load constant instruction and append to method. Builds the most appropriate type of instruction for the value.
Parameters:
  value - constant value to be loaded



appendLoadConstant
public void appendLoadConstant(String value)(Code)
Create load constant instruction and append to method. Loads a String reference from the constant pool.
Parameters:
  value - constant value to be loaded



appendLoadConstant
public void appendLoadConstant(Object value)(Code)
Create load constant instruction and append to method. Loads an unwrapped primitive value from the constant pool.
Parameters:
  value - constant value to be loaded



appendLoadLocal
public void appendLoadLocal(int slot)(Code)
Append instruction to load local variable.
Parameters:
  slot - local variable slot to load



appendPOP
public void appendPOP()(Code)
Append a POP to the instruction list.



appendPOP2
public void appendPOP2()(Code)
Append a POP2 to the instruction list.



appendPut
public void appendPut(ClassItem item)(Code)
Create put instruction and append to method. This generates either a putstatic or a putfield instruction, as appropriate.
Parameters:
  item - information for field to be gotten



appendPutField
public void appendPutField(ClassItem item)(Code)
Create putfield instruction and append to method. Uses the target field information to generate the instruction.
Parameters:
  item - information for field to be set



appendPutStatic
public void appendPutStatic(ClassItem item)(Code)
Create putstatic instruction and append to method. Uses the target field information to generate the instruction.
Parameters:
  item - information for field to be set



appendReturn
public void appendReturn()(Code)
Append simple return.



appendReturn
public void appendReturn(Type type)(Code)
Append typed return.
Parameters:
  type - returned type (may be Type.VOID)



appendReturn
public void appendReturn(String type)(Code)
Append typed return.
Parameters:
  type - returned type (may be void)



appendSWAP
public void appendSWAP()(Code)
Append a SWAP to the instruction list.



appendSWAP1For2
public void appendSWAP1For2()(Code)
Append instructions to exchange a single-word value on the top of the stack with the double-word value below it on the stack.



appendStoreLocal
public void appendStoreLocal(int slot)(Code)
Append instruction to store local variable.
Parameters:
  slot - local variable slot to store



appendTargetACONST_NULL
public BranchTarget appendTargetACONST_NULL()(Code)
Append an ACONST_NULL to the instruction list as a branch target. branch target information



appendTargetCreateNew
public BranchTarget appendTargetCreateNew(String name)(Code)
Append instruction to create instance of class as a branch target.
Parameters:
  name - fully qualified class name branch target information



appendTargetLoadConstant
public BranchTarget appendTargetLoadConstant(int value)(Code)
Append a load constant instruction as a branch target. Builds the most appropriate type of instruction for the value.
Parameters:
  value - constant value to be loaded branch target information



appendTargetLoadConstant
public BranchTarget appendTargetLoadConstant(String value)(Code)
Append a load constant instruction as a branch target. Loads a String reference from the constant pool.
Parameters:
  value - constant value to be loaded branch target information



appendTargetNOP
public BranchTarget appendTargetNOP()(Code)
Append a NOP to the instruction list as a branch target. branch target information



appendThrow
public void appendThrow()(Code)
Append exception throw.



appendUnconditionalBranch
public BranchWrapper appendUnconditionalBranch(Object src)(Code)
Append unconditional branch instruction to method.
Parameters:
  src - object responsible for generating branch wrapper for appended unconditional branch



codeComplete
public void codeComplete(boolean suffix) throws JiBXException(Code)
Complete method construction. Finalizes the instruction list and generates the byte code for the constructed method, then computes the hash code based on the byte code. If requested, an appropriate suffix is tacked on the end of the supplied name in order to make sure that it will not be duplicated (even in a superclass or subclass).
Parameters:
  suffix - add suffix to make method name unique
throws:
  JiBXException - on error in finishing method construction



createLocal
protected LocalVariableGen createLocal(String name, Type type)(Code)
Add local variable to method. The current code in the method must have the initial value for the variable on the stack. The scope of the variable is defined from the last instruction to the end of the method unless otherwise modified.
Parameters:
  name - local variable name (may be null to use default)
Parameters:
  type - variable type



getAccessFlags
public int getAccessFlags()(Code)
Get access flags. flags for access type of method



getFirstInstruction
protected InstructionHandle getFirstInstruction()(Code)
Get first instruction in method. handle for first instruction in method



getItem
public ClassItem getItem()(Code)
Get the method item. method item information



getKeyValue
public Object getKeyValue(Object key)(Code)
Get local variable for object.
Parameters:
  key - object key for local variable local variable



getLastInstruction
protected InstructionHandle getLastInstruction()(Code)
Get last instruction in method. handle for last instruction in method



getMethod
public Method getMethod()(Code)
Get the actual method. This can only be called once code generation is completed (after the MethodBuilder.codeComplete(boolean) method is called). constructed method information



getName
public String getName()(Code)
Get name of method being constructed. name of method being constructed



getSignature
public String getSignature()(Code)
Get signature. signature for method



handleExceptions
abstract protected void handleExceptions() throws JiBXException(Code)
Process accumulated exceptions. Each subclass must implement this method to perform the appropriate handling of the checked exceptions that may be thrown in the constructed method.
throws:
  JiBXException - on error in exception handling



hashCode
public int hashCode()(Code)
Get hash code. This is based only on the byte code in the method, and is only valid after the MethodBuilder.codeComplete method is called. hash code based on code sequence



initStackState
public void initStackState(BranchWrapper branch)(Code)
Initialize stack state to match branch source. This can be used to set the expected stack state following an unconditional transfer of control instruction. The principle here is that the code to be generated must be reached by a branch, so the stack state must match that of the branch source.
Parameters:
  branch - wrapper for branch to be for stack initialization



initStackState
public void initStackState(BranchWrapper branch, int pop)(Code)
Initialize stack state to partially match branch source. This can be used to set the expected stack state following an unconditional transfer of control instruction. The specified number of items are removed from the branch stack, with the assumption that code to add these items will be appended before the branch join point is reached.
Parameters:
  branch - wrapper for branch to be for stack initialization
Parameters:
  pop - number of items to be removed from branch source stack state



initStackState
protected void initStackState(String[] types)(Code)
Initialize stack state to array of value types. This can be used to set the expected stack state following an unconditional transfer of control instruction.
Parameters:
  types - array of type names on stack



internalAppendCreateNew
protected InstructionHandle internalAppendCreateNew(String name)(Code)
Internal append instruction to create instance of class. This is used by subclasses when they need access to the actual instruction handle.
Parameters:
  name - fully qualified class name



isStackTopLong
public boolean isStackTopLong()(Code)
Check if top item on stack is a long value. true if long value, false if not



setAccessFlags
public void setAccessFlags(int flags)(Code)
Set access flags.
Parameters:
  flags - access type to be set



setKeyValue
public Object setKeyValue(Object key, Object value)(Code)
Add keyed value to method definition.
Parameters:
  key - retrieval key
Parameters:
  value - keyed value prior value for key



setTarget
final protected void setTarget(InstructionHandle inst)(Code)
Target branches if pending. This implements setting the target of branch instructions supplied using the MethodBuilder.targetNext method.
Parameters:
  inst - handle for appended instruction



targetNext
public void targetNext(BranchWrapper branch)(Code)
Set branch target as next instruction added to method. This effectively sets up a state trigger for the next append operation. The appended instruction is set as the target for the branch. This requires that instructions are only appended using the methods supplied in this class.
Parameters:
  branch - wrapper for branch to be aimed at next instruction (may benull, in which case nothing is done)



targetNext
public void targetNext(BranchWrapper[] branches)(Code)
Set branch targets as next instruction added to method. This effectively sets up a state trigger for the next append operation. The appended instruction is set as the target for all the branches. This requires that instructions are only appended using the methods supplied in this class.
Parameters:
  branches - wrappers for branches to be aimed at next instruction(may be null, in which case nothing is done)



Methods inherited from org.jibx.binding.classes.BindingMethod
public static int computeMethodHash(Method method)(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
abstract public int getAccessFlags()(Code)(Java Doc)
public ClassFile getClassFile()(Code)(Java Doc)
abstract public ClassItem getItem()(Code)(Java Doc)
abstract public Method getMethod()(Code)(Java Doc)
abstract public String getName()(Code)(Java Doc)
abstract public String getSignature()(Code)(Java Doc)
abstract public int hashCode()(Code)(Java Doc)
public void makeAccessible(ClassFile src)(Code)(Java Doc)
abstract public void setAccessFlags(int flags)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.