Java Doc for CodeBuilder.java in  » Byte-Code » Cojen » org » cojen » classfile » 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 » Byte Code » Cojen » org.cojen.classfile 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.cojen.classfile.AbstractCodeAssembler
      org.cojen.classfile.CodeBuilder

CodeBuilder
public class CodeBuilder extends AbstractCodeAssembler implements CodeBuffer,CodeAssembler(Code)
This class is used as an aid in generating code for a method. It controls the max stack, local variable allocation, labels and bytecode.
author:
   Brian S O'Neill



Constructor Summary
public  CodeBuilder(MethodInfo info)
     Construct a CodeBuilder for the CodeAttr of the given MethodInfo.
public  CodeBuilder(MethodInfo info, boolean saveLineNumberInfo, boolean saveLocalVariableInfo)
     Construct a CodeBuilder for the CodeAttr of the given MethodInfo.

Method Summary
public  voidarrayLength()
    
public  voidbranch(Location location)
    
public  voidbreakpoint()
    
public  voidcheckCast(TypeDesc type)
    
public  voidconvert(TypeDesc fromType, TypeDesc toType)
    
public  voidconvert(TypeDesc fromType, TypeDesc toType, int fpConvertMode)
    
public  LabelcreateLabel()
    
public  LocalVariablecreateLocalVariable(String name, TypeDesc type)
    
public  voiddup()
    
public  voiddup2()
    
public  voiddup2X1()
    
public  voiddup2X2()
    
public  voiddupX1()
    
public  voiddupX2()
    
public  voidexceptionHandler(Location startLocation, Location endLocation, String catchClassName)
    
public  byte[]getByteCodes()
    
public  ExceptionHandler[]getExceptionHandlers()
    
public  intgetMaxLocals()
    
public  intgetMaxStackDepth()
    
public  LocalVariablegetParameter(int index)
    
public  intgetParameterCount()
    
public  voidifComparisonBranch(Location location, String choice)
    
public  voidifEqualBranch(Location location, boolean choice)
    
public  voidifNullBranch(Location location, boolean choice)
    
public  voidifZeroComparisonBranch(Location location, String choice)
    
public  voidinstanceOf(TypeDesc type)
    
public  voidintegerIncrement(LocalVariable local, int amount)
    
public  voidinvokeConstructor(TypeDesc[] params)
    
public  voidinvokeConstructor(String className, TypeDesc[] params)
    
public  voidinvokeConstructor(TypeDesc classDesc, TypeDesc[] params)
    
public  voidinvokeInterface(String className, String methodName, TypeDesc ret, TypeDesc[] params)
    
public  voidinvokeInterface(TypeDesc classDesc, String methodName, TypeDesc ret, TypeDesc[] params)
    
public  voidinvokePrivate(String methodName, TypeDesc ret, TypeDesc[] params)
    
public  voidinvokeStatic(String methodName, TypeDesc ret, TypeDesc[] params)
    
public  voidinvokeStatic(String className, String methodName, TypeDesc ret, TypeDesc[] params)
    
public  voidinvokeStatic(TypeDesc classDesc, String methodName, TypeDesc ret, TypeDesc[] params)
    
public  voidinvokeSuper(String superClassName, String methodName, TypeDesc ret, TypeDesc[] params)
    
public  voidinvokeSuper(TypeDesc superClassDesc, String methodName, TypeDesc ret, TypeDesc[] params)
    
public  voidinvokeSuperConstructor(TypeDesc[] params)
    
public  voidinvokeVirtual(String methodName, TypeDesc ret, TypeDesc[] params)
    
public  voidinvokeVirtual(String className, String methodName, TypeDesc ret, TypeDesc[] params)
    
public  voidinvokeVirtual(TypeDesc classDesc, String methodName, TypeDesc ret, TypeDesc[] params)
    
public  voidjsr(Location location)
    
public  voidloadConstant(String value)
    
public  voidloadConstant(TypeDesc type)
    
public  voidloadConstant(boolean value)
    
public  voidloadConstant(int value)
    
public  voidloadConstant(long value)
    
public  voidloadConstant(float value)
    
public  voidloadConstant(double value)
    
public  voidloadField(String fieldName, TypeDesc type)
    
public  voidloadField(String className, String fieldName, TypeDesc type)
    
public  voidloadField(TypeDesc classDesc, String fieldName, TypeDesc type)
    
public  voidloadFromArray(TypeDesc type)
    
public  voidloadLocal(LocalVariable local)
    
public  voidloadNull()
    
public  voidloadStaticField(String fieldName, TypeDesc type)
    
public  voidloadStaticField(String className, String fieldName, TypeDesc type)
    
public  voidloadStaticField(TypeDesc classDesc, String fieldName, TypeDesc type)
    
public  voidloadThis()
    
public  voidmapLineNumber(int lineNumber)
    
public  voidmath(byte opcode)
    
public  voidmonitorEnter()
    
public  voidmonitorExit()
    
public  voidnewObject(TypeDesc type)
    
public  voidnewObject(TypeDesc type, int dimensions)
    
public  voidnop()
    
public  voidpop()
    
public  voidpop2()
    
public  voidret(LocalVariable local)
    
public  voidreturnValue(TypeDesc type)
    
public  voidreturnVoid()
    
public  voidstoreField(String fieldName, TypeDesc type)
    
public  voidstoreField(String className, String fieldName, TypeDesc type)
    
public  voidstoreField(TypeDesc classDesc, String fieldName, TypeDesc type)
    
public  voidstoreLocal(LocalVariable local)
    
public  voidstoreStaticField(String fieldName, TypeDesc type)
    
public  voidstoreStaticField(String className, String fieldName, TypeDesc type)
    
public  voidstoreStaticField(TypeDesc classDesc, String fieldName, TypeDesc type)
    
public  voidstoreToArray(TypeDesc type)
    
public  voidswap()
    
public  voidswap2()
    
public  voidswitchBranch(int[] cases, Location[] locations, Location defaultLocation)
    
public  voidthrowObject()
    


Constructor Detail
CodeBuilder
public CodeBuilder(MethodInfo info)(Code)
Construct a CodeBuilder for the CodeAttr of the given MethodInfo. The CodeBuffer for the CodeAttr is automatically set to this CodeBuilder.



CodeBuilder
public CodeBuilder(MethodInfo info, boolean saveLineNumberInfo, boolean saveLocalVariableInfo)(Code)
Construct a CodeBuilder for the CodeAttr of the given MethodInfo. The CodeBuffer for the CodeAttr is automatically set to this CodeBuilder.
Parameters:
  saveLineNumberInfo - When set false, all calls to mapLineNumberare ignored. By default, this value is true.
Parameters:
  saveLocalVariableInfo - When set true, all local variableusage information is saved in the ClassFile. By default, this valueis false.
See Also:   CodeBuilder.mapLineNumber




Method Detail
arrayLength
public void arrayLength()(Code)



branch
public void branch(Location location)(Code)



breakpoint
public void breakpoint()(Code)



checkCast
public void checkCast(TypeDesc type)(Code)



convert
public void convert(TypeDesc fromType, TypeDesc toType)(Code)



convert
public void convert(TypeDesc fromType, TypeDesc toType, int fpConvertMode)(Code)



createLabel
public Label createLabel()(Code)



createLocalVariable
public LocalVariable createLocalVariable(String name, TypeDesc type)(Code)



dup
public void dup()(Code)



dup2
public void dup2()(Code)



dup2X1
public void dup2X1()(Code)



dup2X2
public void dup2X2()(Code)



dupX1
public void dupX1()(Code)



dupX2
public void dupX2()(Code)



exceptionHandler
public void exceptionHandler(Location startLocation, Location endLocation, String catchClassName)(Code)



getByteCodes
public byte[] getByteCodes()(Code)



getExceptionHandlers
public ExceptionHandler[] getExceptionHandlers()(Code)



getMaxLocals
public int getMaxLocals()(Code)



getMaxStackDepth
public int getMaxStackDepth()(Code)



getParameter
public LocalVariable getParameter(int index)(Code)



getParameterCount
public int getParameterCount()(Code)



ifComparisonBranch
public void ifComparisonBranch(Location location, String choice) throws IllegalArgumentException(Code)



ifEqualBranch
public void ifEqualBranch(Location location, boolean choice)(Code)



ifNullBranch
public void ifNullBranch(Location location, boolean choice)(Code)



ifZeroComparisonBranch
public void ifZeroComparisonBranch(Location location, String choice) throws IllegalArgumentException(Code)



instanceOf
public void instanceOf(TypeDesc type)(Code)



integerIncrement
public void integerIncrement(LocalVariable local, int amount)(Code)



invokeConstructor
public void invokeConstructor(TypeDesc[] params)(Code)



invokeConstructor
public void invokeConstructor(String className, TypeDesc[] params)(Code)



invokeConstructor
public void invokeConstructor(TypeDesc classDesc, TypeDesc[] params)(Code)



invokeInterface
public void invokeInterface(String className, String methodName, TypeDesc ret, TypeDesc[] params)(Code)



invokeInterface
public void invokeInterface(TypeDesc classDesc, String methodName, TypeDesc ret, TypeDesc[] params)(Code)



invokePrivate
public void invokePrivate(String methodName, TypeDesc ret, TypeDesc[] params)(Code)



invokeStatic
public void invokeStatic(String methodName, TypeDesc ret, TypeDesc[] params)(Code)



invokeStatic
public void invokeStatic(String className, String methodName, TypeDesc ret, TypeDesc[] params)(Code)



invokeStatic
public void invokeStatic(TypeDesc classDesc, String methodName, TypeDesc ret, TypeDesc[] params)(Code)



invokeSuper
public void invokeSuper(String superClassName, String methodName, TypeDesc ret, TypeDesc[] params)(Code)



invokeSuper
public void invokeSuper(TypeDesc superClassDesc, String methodName, TypeDesc ret, TypeDesc[] params)(Code)



invokeSuperConstructor
public void invokeSuperConstructor(TypeDesc[] params)(Code)



invokeVirtual
public void invokeVirtual(String methodName, TypeDesc ret, TypeDesc[] params)(Code)



invokeVirtual
public void invokeVirtual(String className, String methodName, TypeDesc ret, TypeDesc[] params)(Code)



invokeVirtual
public void invokeVirtual(TypeDesc classDesc, String methodName, TypeDesc ret, TypeDesc[] params)(Code)



jsr
public void jsr(Location location)(Code)



loadConstant
public void loadConstant(String value)(Code)



loadConstant
public void loadConstant(TypeDesc type) throws IllegalStateException(Code)



loadConstant
public void loadConstant(boolean value)(Code)



loadConstant
public void loadConstant(int value)(Code)



loadConstant
public void loadConstant(long value)(Code)



loadConstant
public void loadConstant(float value)(Code)



loadConstant
public void loadConstant(double value)(Code)



loadField
public void loadField(String fieldName, TypeDesc type)(Code)



loadField
public void loadField(String className, String fieldName, TypeDesc type)(Code)



loadField
public void loadField(TypeDesc classDesc, String fieldName, TypeDesc type)(Code)



loadFromArray
public void loadFromArray(TypeDesc type)(Code)



loadLocal
public void loadLocal(LocalVariable local)(Code)



loadNull
public void loadNull()(Code)



loadStaticField
public void loadStaticField(String fieldName, TypeDesc type)(Code)



loadStaticField
public void loadStaticField(String className, String fieldName, TypeDesc type)(Code)



loadStaticField
public void loadStaticField(TypeDesc classDesc, String fieldName, TypeDesc type)(Code)



loadThis
public void loadThis()(Code)



mapLineNumber
public void mapLineNumber(int lineNumber)(Code)



math
public void math(byte opcode)(Code)



monitorEnter
public void monitorEnter()(Code)



monitorExit
public void monitorExit()(Code)



newObject
public void newObject(TypeDesc type)(Code)



newObject
public void newObject(TypeDesc type, int dimensions)(Code)



nop
public void nop()(Code)



pop
public void pop()(Code)



pop2
public void pop2()(Code)



ret
public void ret(LocalVariable local)(Code)



returnValue
public void returnValue(TypeDesc type)(Code)



returnVoid
public void returnVoid()(Code)



storeField
public void storeField(String fieldName, TypeDesc type)(Code)



storeField
public void storeField(String className, String fieldName, TypeDesc type)(Code)



storeField
public void storeField(TypeDesc classDesc, String fieldName, TypeDesc type)(Code)



storeLocal
public void storeLocal(LocalVariable local)(Code)



storeStaticField
public void storeStaticField(String fieldName, TypeDesc type)(Code)



storeStaticField
public void storeStaticField(String className, String fieldName, TypeDesc type)(Code)



storeStaticField
public void storeStaticField(TypeDesc classDesc, String fieldName, TypeDesc type)(Code)



storeToArray
public void storeToArray(TypeDesc type)(Code)



swap
public void swap()(Code)



swap2
public void swap2()(Code)



switchBranch
public void switchBranch(int[] cases, Location[] locations, Location defaultLocation)(Code)



throwObject
public void throwObject()(Code)



Methods inherited from org.cojen.classfile.AbstractCodeAssembler
public void ifComparisonBranch(Location location, String choice, TypeDesc type)(Code)(Java Doc)
public void inline(Object code)(Code)(Java Doc)
public void invoke(Method method)(Code)(Java Doc)
public void invoke(Constructor constructor)(Code)(Java Doc)
public void invokeSuper(Method method)(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.