Java Doc for ClassWriter.java in  » Scripting » beanshell » bsh » org » objectweb » asm » 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 » Scripting » beanshell » bsh.org.objectweb.asm 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   bsh.org.objectweb.asm.ClassWriter

ClassWriter
public class ClassWriter implements ClassVisitor(Code)
A ClassVisitor ClassVisitor that generates Java class files. More precisely this visitor generates a byte array conforming to the Java class file format. It can be used alone, to generate a Java class "from scratch", or with one or more ClassReader ClassReader and adapter class visitor to generate a modified class from one or more existing Java classes.


Field Summary
final static  intCLASS
     The type of CONSTANT_Class constant pool items.
final static  intDOUBLE
     The type of CONSTANT_Double constant pool items.
final static  intFIELD
     The type of CONSTANT_Fieldref constant pool items.
final static  intFIELDORMETH_INSN
     The type of field and method invocations instructions.
final static  intFLOAT
     The type of CONSTANT_Float constant pool items.
final static  intIINC_INSN
     The type of the IINC instruction.
final static  intIMETH
     The type of CONSTANT_InterfaceMethodref constant pool items.
final static  intIMPLVAR_INSN
     The type of instructions with an implicit local variable index label.
final static  intINT
     The type of CONSTANT_Integer constant pool items.
final static  intITFMETH_INSN
     The type of the INVOKEINTERFACE instruction.
final static  intLABELW_INSN
     The type of instructions with a 4 bytes bytecode offset label.
final static  intLABEL_INSN
     The type of instructions with a 2 bytes bytecode offset label.
final static  intLDCW_INSN
     The type of the LDC_W and LDC2_W instructions.
final static  intLDC_INSN
     The type of the LDC instruction.
final static  intLONG
     The type of CONSTANT_Long constant pool items.
final static  intLOOK_INSN
     The type of the LOOKUPSWITCH instruction.
final static  intMANA_INSN
     The type of the MULTIANEWARRAY instruction.
final static  intMETH
     The type of CONSTANT_Methodref constant pool items.
final static  intNAME_TYPE
     The type of CONSTANT_NameAndType constant pool items.
final static  intNOARG_INSN
     The type of instructions without any label.
final static  intSBYTE_INSN
     The type of instructions with an signed byte label.
final static  intSHORT_INSN
     The type of instructions with an signed short label.
final static  intSTR
     The type of CONSTANT_String constant pool items.
final static  intTABL_INSN
     The type of the TABLESWITCH instruction.
static  byte[]TYPE
     The instruction types of all JVM opcodes.
final static  intTYPE_INSN
     The type of instructions with a type descriptor argument.
final static  intUTF8
     The type of CONSTANT_Utf8 constant pool items.
final static  intVAR_INSN
     The type of instructions with a local variable index label.
final static  intWIDE_INSN
     The type of the WIDE instruction.
 CodeWriterfirstMethod
     The methods of this class.
 Itemkey
     A reusable key used to look for items in the hash ClassWriter.table table .
 Itemkey2
     A reusable key used to look for items in the hash ClassWriter.table table .
 Itemkey3
     A reusable key used to look for items in the hash ClassWriter.table table .
 CodeWriterlastMethod
     The methods of this class.

Constructor Summary
public  ClassWriter(boolean computeMaxs)
     Constructs a new ClassWriter ClassWriter object.
Parameters:
  computeMaxs - true if the maximum stack size and the maximumnumber of local variables must be automatically computed.

Method Summary
 ItemnewClass(String value)
     Adds a class reference to the constant pool of the class being build.
 ItemnewCst(Object cst)
     Adds a number or string constant to the constant pool of the class being build.
 ItemnewField(String owner, String name, String desc)
     Adds a field reference to the constant pool of the class being build.
 ItemnewItfMethod(String ownerItf, String name, String desc)
     Adds an interface method reference to the constant pool of the class being build.
 ItemnewMethod(String owner, String name, String desc)
     Adds a method reference to the constant pool of the class being build.
 ItemnewUTF8(String value)
     Adds an UTF string to the constant pool of the class being build.
public  byte[]toByteArray()
     Returns the bytecode of the class that was build with this class writer.
public  voidvisit(int access, String name, String superName, String[] interfaces, String sourceFile)
    
public  voidvisitEnd()
    
public  voidvisitField(int access, String name, String desc, Object value)
    
public  voidvisitInnerClass(String name, String outerName, String innerName, int access)
    
public  CodeVisitorvisitMethod(int access, String name, String desc, String[] exceptions)
    

Field Detail
CLASS
final static int CLASS(Code)
The type of CONSTANT_Class constant pool items.



DOUBLE
final static int DOUBLE(Code)
The type of CONSTANT_Double constant pool items.



FIELD
final static int FIELD(Code)
The type of CONSTANT_Fieldref constant pool items.



FIELDORMETH_INSN
final static int FIELDORMETH_INSN(Code)
The type of field and method invocations instructions.



FLOAT
final static int FLOAT(Code)
The type of CONSTANT_Float constant pool items.



IINC_INSN
final static int IINC_INSN(Code)
The type of the IINC instruction.



IMETH
final static int IMETH(Code)
The type of CONSTANT_InterfaceMethodref constant pool items.



IMPLVAR_INSN
final static int IMPLVAR_INSN(Code)
The type of instructions with an implicit local variable index label.



INT
final static int INT(Code)
The type of CONSTANT_Integer constant pool items.



ITFMETH_INSN
final static int ITFMETH_INSN(Code)
The type of the INVOKEINTERFACE instruction.



LABELW_INSN
final static int LABELW_INSN(Code)
The type of instructions with a 4 bytes bytecode offset label.



LABEL_INSN
final static int LABEL_INSN(Code)
The type of instructions with a 2 bytes bytecode offset label.



LDCW_INSN
final static int LDCW_INSN(Code)
The type of the LDC_W and LDC2_W instructions.



LDC_INSN
final static int LDC_INSN(Code)
The type of the LDC instruction.



LONG
final static int LONG(Code)
The type of CONSTANT_Long constant pool items.



LOOK_INSN
final static int LOOK_INSN(Code)
The type of the LOOKUPSWITCH instruction.



MANA_INSN
final static int MANA_INSN(Code)
The type of the MULTIANEWARRAY instruction.



METH
final static int METH(Code)
The type of CONSTANT_Methodref constant pool items.



NAME_TYPE
final static int NAME_TYPE(Code)
The type of CONSTANT_NameAndType constant pool items.



NOARG_INSN
final static int NOARG_INSN(Code)
The type of instructions without any label.



SBYTE_INSN
final static int SBYTE_INSN(Code)
The type of instructions with an signed byte label.



SHORT_INSN
final static int SHORT_INSN(Code)
The type of instructions with an signed short label.



STR
final static int STR(Code)
The type of CONSTANT_String constant pool items.



TABL_INSN
final static int TABL_INSN(Code)
The type of the TABLESWITCH instruction.



TYPE
static byte[] TYPE(Code)
The instruction types of all JVM opcodes.



TYPE_INSN
final static int TYPE_INSN(Code)
The type of instructions with a type descriptor argument.



UTF8
final static int UTF8(Code)
The type of CONSTANT_Utf8 constant pool items.



VAR_INSN
final static int VAR_INSN(Code)
The type of instructions with a local variable index label.



WIDE_INSN
final static int WIDE_INSN(Code)
The type of the WIDE instruction.



firstMethod
CodeWriter firstMethod(Code)
The methods of this class. These methods are stored in a linked list of CodeWriter CodeWriter objects, linked to each other by their CodeWriter.next field. This field stores the first element of this list.



key
Item key(Code)
A reusable key used to look for items in the hash ClassWriter.table table .



key2
Item key2(Code)
A reusable key used to look for items in the hash ClassWriter.table table .



key3
Item key3(Code)
A reusable key used to look for items in the hash ClassWriter.table table .



lastMethod
CodeWriter lastMethod(Code)
The methods of this class. These methods are stored in a linked list of CodeWriter CodeWriter objects, linked to each other by their CodeWriter.next field. This field stores the last element of this list.




Constructor Detail
ClassWriter
public ClassWriter(boolean computeMaxs)(Code)
Constructs a new ClassWriter ClassWriter object.
Parameters:
  computeMaxs - true if the maximum stack size and the maximumnumber of local variables must be automatically computed. If this flagis true, then the arguments of the CodeVisitor.visitMaxs visitMaxs method of the CodeVisitorCodeVisitor returned by the ClassWriter.visitMethod visitMethod methodwill be ignored, and computed automatically from the signature andthe bytecode of each method.




Method Detail
newClass
Item newClass(String value)(Code)
Adds a class reference to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item.
Parameters:
  value - the internal name of the class. a new or already existing class reference item.



newCst
Item newCst(Object cst)(Code)
Adds a number or string constant to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item.
Parameters:
  cst - the value of the constant to be added to the constant pool. Thisparameter must be an java.lang.Integer Integer, a java.lang.Float Float, a java.lang.Long Long, a java.lang.Double Double or a String String. a new or already existing constant item with the given value.



newField
Item newField(String owner, String name, String desc)(Code)
Adds a field reference to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item.
Parameters:
  owner - the internal name of the field's owner class.
Parameters:
  name - the field's name.
Parameters:
  desc - the field's descriptor. a new or already existing field reference item.



newItfMethod
Item newItfMethod(String ownerItf, String name, String desc)(Code)
Adds an interface method reference to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item.
Parameters:
  ownerItf - the internal name of the method's owner interface.
Parameters:
  name - the method's name.
Parameters:
  desc - the method's descriptor. a new or already existing interface method reference item.



newMethod
Item newMethod(String owner, String name, String desc)(Code)
Adds a method reference to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item.
Parameters:
  owner - the internal name of the method's owner class.
Parameters:
  name - the method's name.
Parameters:
  desc - the method's descriptor. a new or already existing method reference item.



newUTF8
Item newUTF8(String value)(Code)
Adds an UTF string to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item.
Parameters:
  value - the String value. a new or already existing UTF8 item.



toByteArray
public byte[] toByteArray()(Code)
Returns the bytecode of the class that was build with this class writer. the bytecode of the class that was build with this class writer.



visit
public void visit(int access, String name, String superName, String[] interfaces, String sourceFile)(Code)



visitEnd
public void visitEnd()(Code)



visitField
public void visitField(int access, String name, String desc, Object value)(Code)



visitInnerClass
public void visitInnerClass(String name, String outerName, String innerName, int access)(Code)



visitMethod
public CodeVisitor visitMethod(int access, String name, String desc, String[] exceptions)(Code)



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.