Java Doc for CodeEnhancer.java in  » EJB-Server-resin-3.1.5 » resin » com » caucho » bytecode » 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 » EJB Server resin 3.1.5 » resin » com.caucho.bytecode 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.caucho.bytecode.CodeVisitor
      com.caucho.bytecode.CodeEnhancer

CodeEnhancer
public class CodeEnhancer extends CodeVisitor (Code)
Visitor for travelling the code.

Inner Class :abstract static class Branch
Inner Class :static class Jump extends Branch
Inner Class :static class Switch extends Branch
Inner Class :static class TableSwitch extends Switch
Inner Class :static class LookupSwitch extends Switch
Inner Class :class JumpAnalyzer extends Analyzer


Constructor Summary
public  CodeEnhancer()
    
public  CodeEnhancer(JavaClass javaClass, CodeAttribute code)
    

Method Summary
public  voidadd(int offset, byte[] buffer, int bufOffset, int length)
     Adds a byte to the code.
public  voidaddByte(int offset, int value)
     Adds a byte to the code.
public  voidaddNulls(int offset, int count)
     Adds a byte to the code.
public  voidaddShort(int offset, int value)
     Adds a short to the code.
public  voidanalyze(Analyzer analyzer, boolean allowFlow)
    
protected  voidanalyzeJumps()
    
public  byte[]getCode()
     Returns the code buffer.
public  intgetLength()
     Returns the length.
public  voidinit(JavaClass javaClass, CodeAttribute codeAttr)
    
protected  voidinsertCode(int offset, int count)
     Updates indices when adding a chunk of code.
public  voidremove(int offset, int count)
     Removes a range from the code.
protected  voidremoveCode(int offset, int count)
    
public  voidsetByte(int offset, int value)
     Adds a byte to the code.
public  voidupdate()
     Updates the code.


Constructor Detail
CodeEnhancer
public CodeEnhancer()(Code)



CodeEnhancer
public CodeEnhancer(JavaClass javaClass, CodeAttribute code)(Code)




Method Detail
add
public void add(int offset, byte[] buffer, int bufOffset, int length)(Code)
Adds a byte to the code.



addByte
public void addByte(int offset, int value)(Code)
Adds a byte to the code.



addNulls
public void addNulls(int offset, int count)(Code)
Adds a byte to the code.



addShort
public void addShort(int offset, int value)(Code)
Adds a short to the code.



analyze
public void analyze(Analyzer analyzer, boolean allowFlow) throws Exception(Code)
Analyzes the code for a method



analyzeJumps
protected void analyzeJumps()(Code)



getCode
public byte[] getCode()(Code)
Returns the code buffer.



getLength
public int getLength()(Code)
Returns the length.



init
public void init(JavaClass javaClass, CodeAttribute codeAttr)(Code)



insertCode
protected void insertCode(int offset, int count)(Code)
Updates indices when adding a chunk of code. The operation at the given offset moves, e.g. adding 6 bytes to the beginning of the program moves the initial byte down by 6 and therefore needs to update the links as well. Therefore, enhancers which expand an opcode from 2 bytes to 3 bytes must insert the new bytes after the initial opcode.



remove
public void remove(int offset, int count)(Code)
Removes a range from the code.



removeCode
protected void removeCode(int offset, int count)(Code)



setByte
public void setByte(int offset, int value)(Code)
Adds a byte to the code.



update
public void update()(Code)
Updates the code.



Fields inherited from com.caucho.bytecode.CodeVisitor
final public static int AALOAD(Code)(Java Doc)
final public static int AASTORE(Code)(Java Doc)
final public static int ACONST_NULL(Code)(Java Doc)
final public static int ALOAD(Code)(Java Doc)
final public static int ALOAD_0(Code)(Java Doc)
final public static int ALOAD_1(Code)(Java Doc)
final public static int ALOAD_2(Code)(Java Doc)
final public static int ALOAD_3(Code)(Java Doc)
final public static int ANEWARRAY(Code)(Java Doc)
final public static int ARETURN(Code)(Java Doc)
final public static int ARRAYLENGTH(Code)(Java Doc)
final public static int ASTORE(Code)(Java Doc)
final public static int ASTORE_0(Code)(Java Doc)
final public static int ASTORE_1(Code)(Java Doc)
final public static int ASTORE_2(Code)(Java Doc)
final public static int ASTORE_3(Code)(Java Doc)
final public static int ATHROW(Code)(Java Doc)
final public static int BALOAD(Code)(Java Doc)
final public static int BASTORE(Code)(Java Doc)
final public static int BIPUSH(Code)(Java Doc)
final public static int CALOAD(Code)(Java Doc)
final public static int CASTORE(Code)(Java Doc)
final public static int CHECKCAST(Code)(Java Doc)
final public static int D2F(Code)(Java Doc)
final public static int D2I(Code)(Java Doc)
final public static int D2L(Code)(Java Doc)
final public static int DADD(Code)(Java Doc)
final public static int DALOAD(Code)(Java Doc)
final public static int DASTORE(Code)(Java Doc)
final public static int DCMPG(Code)(Java Doc)
final public static int DCMPL(Code)(Java Doc)
final public static int DCONST_0(Code)(Java Doc)
final public static int DCONST_1(Code)(Java Doc)
final public static int DDIV(Code)(Java Doc)
final public static int DLOAD(Code)(Java Doc)
final public static int DLOAD_0(Code)(Java Doc)
final public static int DLOAD_1(Code)(Java Doc)
final public static int DLOAD_2(Code)(Java Doc)
final public static int DLOAD_3(Code)(Java Doc)
final public static int DMUL(Code)(Java Doc)
final public static int DNEG(Code)(Java Doc)
final public static int DREM(Code)(Java Doc)
final public static int DRETURN(Code)(Java Doc)
final public static int DSTORE(Code)(Java Doc)
final public static int DSTORE_0(Code)(Java Doc)
final public static int DSTORE_1(Code)(Java Doc)
final public static int DSTORE_2(Code)(Java Doc)
final public static int DSTORE_3(Code)(Java Doc)
final public static int DSUB(Code)(Java Doc)
final public static int DUP(Code)(Java Doc)
final public static int DUP2(Code)(Java Doc)
final public static int DUP2_X1(Code)(Java Doc)
final public static int DUP2_X2(Code)(Java Doc)
final public static int DUP_X1(Code)(Java Doc)
final public static int DUP_X2(Code)(Java Doc)
final public static int F2D(Code)(Java Doc)
final public static int F2I(Code)(Java Doc)
final public static int F2L(Code)(Java Doc)
final public static int FADD(Code)(Java Doc)
final public static int FALOAD(Code)(Java Doc)
final public static int FASTORE(Code)(Java Doc)
final public static int FCMPG(Code)(Java Doc)
final public static int FCMPL(Code)(Java Doc)
final public static int FCONST_0(Code)(Java Doc)
final public static int FCONST_1(Code)(Java Doc)
final public static int FCONST_2(Code)(Java Doc)
final public static int FDIV(Code)(Java Doc)
final public static int FLOAD(Code)(Java Doc)
final public static int FLOAD_0(Code)(Java Doc)
final public static int FLOAD_1(Code)(Java Doc)
final public static int FLOAD_2(Code)(Java Doc)
final public static int FLOAD_3(Code)(Java Doc)
final public static int FMUL(Code)(Java Doc)
final public static int FNEG(Code)(Java Doc)
final public static int FREM(Code)(Java Doc)
final public static int FRETURN(Code)(Java Doc)
final public static int FSTORE(Code)(Java Doc)
final public static int FSTORE_0(Code)(Java Doc)
final public static int FSTORE_1(Code)(Java Doc)
final public static int FSTORE_2(Code)(Java Doc)
final public static int FSTORE_3(Code)(Java Doc)
final public static int FSUB(Code)(Java Doc)
final public static int GETFIELD(Code)(Java Doc)
final public static int GETSTATIC(Code)(Java Doc)
final public static int GOTO(Code)(Java Doc)
final public static int GOTO_W(Code)(Java Doc)
final public static int I2B(Code)(Java Doc)
final public static int I2C(Code)(Java Doc)
final public static int I2D(Code)(Java Doc)
final public static int I2F(Code)(Java Doc)
final public static int I2L(Code)(Java Doc)
final public static int I2S(Code)(Java Doc)
final public static int IADD(Code)(Java Doc)
final public static int IALOAD(Code)(Java Doc)
final public static int IAND(Code)(Java Doc)
final public static int IASTORE(Code)(Java Doc)
final public static int ICONST_0(Code)(Java Doc)
final public static int ICONST_1(Code)(Java Doc)
final public static int ICONST_2(Code)(Java Doc)
final public static int ICONST_3(Code)(Java Doc)
final public static int ICONST_4(Code)(Java Doc)
final public static int ICONST_5(Code)(Java Doc)
final public static int ICONST_M1(Code)(Java Doc)
final public static int IDIV(Code)(Java Doc)
final public static int IFEQ(Code)(Java Doc)
final public static int IFGE(Code)(Java Doc)
final public static int IFGT(Code)(Java Doc)
final public static int IFLE(Code)(Java Doc)
final public static int IFLT(Code)(Java Doc)
final public static int IFNE(Code)(Java Doc)
final public static int IFNONNULL(Code)(Java Doc)
final public static int IFNULL(Code)(Java Doc)
final public static int IF_ACMPEQ(Code)(Java Doc)
final public static int IF_ACMPNE(Code)(Java Doc)
final public static int IF_ICMPEQ(Code)(Java Doc)
final public static int IF_ICMPGE(Code)(Java Doc)
final public static int IF_ICMPGT(Code)(Java Doc)
final public static int IF_ICMPLE(Code)(Java Doc)
final public static int IF_ICMPLT(Code)(Java Doc)
final public static int IF_ICMPNE(Code)(Java Doc)
final public static int IINC(Code)(Java Doc)
final public static int ILOAD(Code)(Java Doc)
final public static int ILOAD_0(Code)(Java Doc)
final public static int ILOAD_1(Code)(Java Doc)
final public static int ILOAD_2(Code)(Java Doc)
final public static int ILOAD_3(Code)(Java Doc)
final public static int IMUL(Code)(Java Doc)
final public static int INEG(Code)(Java Doc)
final public static int INSTANCEOF(Code)(Java Doc)
final public static int INVOKEINTERFACE(Code)(Java Doc)
final public static int INVOKESPECIAL(Code)(Java Doc)
final public static int INVOKESTATIC(Code)(Java Doc)
final public static int INVOKEVIRTUAL(Code)(Java Doc)
final public static int IOR(Code)(Java Doc)
final public static int IREM(Code)(Java Doc)
final public static int IRETURN(Code)(Java Doc)
final public static int ISHL(Code)(Java Doc)
final public static int ISHR(Code)(Java Doc)
final public static int ISTORE(Code)(Java Doc)
final public static int ISTORE_0(Code)(Java Doc)
final public static int ISTORE_1(Code)(Java Doc)
final public static int ISTORE_2(Code)(Java Doc)
final public static int ISTORE_3(Code)(Java Doc)
final public static int ISUB(Code)(Java Doc)
final public static int IUSHR(Code)(Java Doc)
final public static int IXOR(Code)(Java Doc)
final public static int JSR(Code)(Java Doc)
final public static int JSR_W(Code)(Java Doc)
final public static int L2D(Code)(Java Doc)
final public static int L2F(Code)(Java Doc)
final public static int L2I(Code)(Java Doc)
final public static int LADD(Code)(Java Doc)
final public static int LALOAD(Code)(Java Doc)
final public static int LAND(Code)(Java Doc)
final public static int LASTORE(Code)(Java Doc)
final public static int LCMP(Code)(Java Doc)
final public static int LCONST_0(Code)(Java Doc)
final public static int LCONST_1(Code)(Java Doc)
final public static int LDC(Code)(Java Doc)
final public static int LDC2_W(Code)(Java Doc)
final public static int LDC_W(Code)(Java Doc)
final public static int LDIV(Code)(Java Doc)
final public static int LLOAD(Code)(Java Doc)
final public static int LLOAD_0(Code)(Java Doc)
final public static int LLOAD_1(Code)(Java Doc)
final public static int LLOAD_2(Code)(Java Doc)
final public static int LLOAD_3(Code)(Java Doc)
final public static int LMUL(Code)(Java Doc)
final public static int LNEG(Code)(Java Doc)
final public static int LOOKUPSWITCH(Code)(Java Doc)
final public static int LOR(Code)(Java Doc)
final public static int LREM(Code)(Java Doc)
final public static int LRETURN(Code)(Java Doc)
final public static int LSHL(Code)(Java Doc)
final public static int LSHR(Code)(Java Doc)
final public static int LSTORE(Code)(Java Doc)
final public static int LSTORE_0(Code)(Java Doc)
final public static int LSTORE_1(Code)(Java Doc)
final public static int LSTORE_2(Code)(Java Doc)
final public static int LSTORE_3(Code)(Java Doc)
final public static int LSUB(Code)(Java Doc)
final public static int LUSHR(Code)(Java Doc)
final public static int LXOR(Code)(Java Doc)
final public static int MONITORENTER(Code)(Java Doc)
final public static int MONITOREXIT(Code)(Java Doc)
final public static int MULTIANEWARRAY(Code)(Java Doc)
final public static int NEW(Code)(Java Doc)
final public static int NEWARRAY(Code)(Java Doc)
final public static int NOP(Code)(Java Doc)
final public static int POP(Code)(Java Doc)
final public static int POP2(Code)(Java Doc)
final public static int PUTFIELD(Code)(Java Doc)
final public static int PUTSTATIC(Code)(Java Doc)
final public static int RESERVED_0(Code)(Java Doc)
final public static int RET(Code)(Java Doc)
final public static int RETURN(Code)(Java Doc)
final public static int SALOAD(Code)(Java Doc)
final public static int SASTORE(Code)(Java Doc)
final public static int SIPUSH(Code)(Java Doc)
final public static int SWAP(Code)(Java Doc)
final public static int TABLESWITCH(Code)(Java Doc)
final public static int WIDE(Code)(Java Doc)
protected CodeAttribute _codeAttr(Code)(Java Doc)
protected int _offset(Code)(Java Doc)

Methods inherited from com.caucho.bytecode.CodeVisitor
public void analyze(Analyzer analyzer) throws Exception(Code)(Java Doc)
public void analyze(Analyzer analyzer, boolean allowFlow) throws Exception(Code)(Java Doc)
protected void analyzeImpl(Analyzer analyzer, boolean allowFlow, IntArray pendingTargets, IntArray completedTargets) throws Exception(Code)(Java Doc)
public int getBranchTarget()(Code)(Java Doc)
public int getByte(int offset)(Code)(Java Doc)
public int getByteArg()(Code)(Java Doc)
public int getByteArg(int offset)(Code)(Java Doc)
public byte[] getCode()(Code)(Java Doc)
public CodeAttribute getCodeAttribute()(Code)(Java Doc)
public ConstantPoolEntry getConstantArg()(Code)(Java Doc)
public ArrayList<CodeAttribute.ExceptionItem> getExceptions()(Code)(Java Doc)
public int getInt(int offset)(Code)(Java Doc)
public int getIntArg()(Code)(Java Doc)
public JavaClass getJavaClass()(Code)(Java Doc)
public int getOffset()(Code)(Java Doc)
public int getOpcode()(Code)(Java Doc)
public int getShort(int offset)(Code)(Java Doc)
public int getShortArg()(Code)(Java Doc)
public int getShortArg(int offset)(Code)(Java Doc)
public int[] getSwitchTargets()(Code)(Java Doc)
public void init(JavaClass javaClass, CodeAttribute codeAttr)(Code)(Java Doc)
public boolean isBranch()(Code)(Java Doc)
public boolean isSwitch()(Code)(Java Doc)
public boolean next()(Code)(Java Doc)
protected int nextOffset()(Code)(Java Doc)
public void setByteArg(int offset, int value)(Code)(Java Doc)
public void setInt(int offset, int value)(Code)(Java Doc)
public void setOffset(int offset)(Code)(Java Doc)
public void setShort(int offset, int value)(Code)(Java Doc)
public void setShortArg(int offset, int value)(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.