Java Doc for ClassWriter.java in  » 6.0-JDK-Modules-sun » javac-compiler » com » sun » tools » javac » jvm » 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 » 6.0 JDK Modules sun » javac compiler » com.sun.tools.javac.jvm 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.tools.javac.jvm.ClassFile
      com.sun.tools.javac.jvm.ClassWriter

ClassWriter
public class ClassWriter extends ClassFile (Code)
This class provides operations to map an internal symbol table graph rooted in a ClassSymbol into a classfile.

This is NOT part of any API supported by Sun Microsystems. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.


Inner Class :public static class PoolOverflow extends Exception
Inner Class :public static class StringOverflow extends Exception
Inner Class : enum RetentionPolicy
Inner Class :class AttributeWriter implements Attribute.Visitor
Inner Class :abstract static class StackMapTableFrame

Field Summary
final static  intDATA_BUF_SIZE
     The initial sizes of the data and constant pool buffers.
final static  intFULL_FRAME
    
final static  intMAX_LOCAL_LENGTH_DIFF
    
final static  intPOOL_BUF_SIZE
    
final static  intSAME_FRAME_EXTENDED
    
final static  intSAME_FRAME_SIZE
     The tags and constants used in compressed stackmap.
final static  intSAME_LOCALS_1_STACK_ITEM_EXTENDED
    
 AttributeWriterawriter
    
final protected static  Context.Key<ClassWriter>classWriterKey
    
 ByteBufferdatabuf
     An output buffer for member info.
 booleandebugstackmap
    
 Set<ClassSymbol>innerClasses
     The inner classes to be written, as a set.
 ListBuffer<ClassSymbol>innerClassesQueue
     The inner classes to be written, as a queue where enclosing classes come first.
 Poolpool
     The constant pool.
 ByteBufferpoolbuf
     An output buffer for the constant pool.
 ByteBuffersigbuf
     An output buffer for type signatures.


Method Summary
 intadjustFlags(long flags)
    
 voidassembleClassSig(Type type)
    
 voidassembleParamsSig(List<Type> typarams)
    
 voidassembleSig(Type type)
     Assemble signature of given type in string buffer.
 voidassembleSig(List<Type> types)
    
 intbeginAttrs()
     Leave space for attribute count and return index for number of attributes field.
 voidendAttr(int index)
     Fill in attribute length.
 voidendAttrs(int index, int count)
     Fill in number of attributes.
 voidenterInner(ClassSymbol c)
     Enter an inner class into the `innerClasses' set/queue.
 NamefieldName(Symbol sym)
     Given a field, return its name.
public static  StringflagNames(long flags)
     Return flags as a string, separated by " ".
 longgetLastModified(FileObject filename)
    
 RetentionPolicygetRetention(TypeSymbol annotationType)
    
 booleanhasTypeVar(List<Type> l)
    
public static  ClassWriterinstance(Context context)
     Get the ClassWriter instance for this context.
 NameAndTypenameType(Symbol sym)
     Given a symbol, return its name-and-type.
 voidputChar(ByteBuffer buf, int op, int x)
     Write a character into given byte buffer; byte buffer will not be grown.
 voidputInt(ByteBuffer buf, int adr, int x)
     Write an integer into given byte buffer; byte buffer will not be grown.
 NametypeSig(Type type)
    
 intwriteAttr(Name attrName)
     Write header for an attribute to data buffer and return position past attribute length index.
public  JavaFileObjectwriteClass(ClassSymbol c)
     Emit a class file for a given class.
public  voidwriteClassFile(OutputStream out, ClassSymbol c)
     Write class `c' to outstream `out'.
 voidwriteCode(Code code)
     Write code attribute of method.
 voidwriteCompoundAttribute(Attribute.Compound c)
     Write a compound attribute excluding the '@' marker.
 intwriteEnclosingMethodAttribute(ClassSymbol c)
     Write the EnclosingMethod attribute if needed.
 voidwriteField(VarSymbol v)
     Write field symbol, entering all references into constant pool.
 voidwriteFields(Scope.Entry e)
    
 intwriteFlagAttrs(long flags)
     Write flag attributes; return number of attributes written.
 voidwriteInnerClasses()
     Write "inner classes" attribute.
 intwriteJavaAnnotations(List<Attribute.Compound> attrs)
     Write Java-language annotations; return number of JVM attributes written (zero or one).
 intwriteMemberAttrs(Symbol sym)
     Write member (field or method) attributes; return number of attributes written.
 voidwriteMethod(MethodSymbol m)
     Write method symbol, entering all references into constant pool.
 voidwriteMethods(Scope.Entry e)
    
 intwriteParameterAttrs(MethodSymbol m)
     Write method parameter annotations; return number of attributes written.
 voidwritePool(Pool pool)
     Write constant pool to pool buffer.
 voidwriteStackMap(Code code)
    
 voidwriteStackMapType(Type t)
    
public  NamexClassName(Type t)
     Given a type t, return the extended class name of its erasure in external representation.

Field Detail
DATA_BUF_SIZE
final static int DATA_BUF_SIZE(Code)
The initial sizes of the data and constant pool buffers. sizes are increased when buffers get full.



FULL_FRAME
final static int FULL_FRAME(Code)



MAX_LOCAL_LENGTH_DIFF
final static int MAX_LOCAL_LENGTH_DIFF(Code)



POOL_BUF_SIZE
final static int POOL_BUF_SIZE(Code)



SAME_FRAME_EXTENDED
final static int SAME_FRAME_EXTENDED(Code)



SAME_FRAME_SIZE
final static int SAME_FRAME_SIZE(Code)
The tags and constants used in compressed stackmap.



SAME_LOCALS_1_STACK_ITEM_EXTENDED
final static int SAME_LOCALS_1_STACK_ITEM_EXTENDED(Code)



awriter
AttributeWriter awriter(Code)



classWriterKey
final protected static Context.Key<ClassWriter> classWriterKey(Code)



databuf
ByteBuffer databuf(Code)
An output buffer for member info.



debugstackmap
boolean debugstackmap(Code)
Switch: describe the generated stackmap



innerClasses
Set<ClassSymbol> innerClasses(Code)
The inner classes to be written, as a set.



innerClassesQueue
ListBuffer<ClassSymbol> innerClassesQueue(Code)
The inner classes to be written, as a queue where enclosing classes come first.



pool
Pool pool(Code)
The constant pool.



poolbuf
ByteBuffer poolbuf(Code)
An output buffer for the constant pool.



sigbuf
ByteBuffer sigbuf(Code)
An output buffer for type signatures.





Method Detail
adjustFlags
int adjustFlags(long flags)(Code)



assembleClassSig
void assembleClassSig(Type type)(Code)



assembleParamsSig
void assembleParamsSig(List<Type> typarams)(Code)



assembleSig
void assembleSig(Type type)(Code)
Assemble signature of given type in string buffer.



assembleSig
void assembleSig(List<Type> types)(Code)



beginAttrs
int beginAttrs()(Code)
Leave space for attribute count and return index for number of attributes field.



endAttr
void endAttr(int index)(Code)
Fill in attribute length.



endAttrs
void endAttrs(int index, int count)(Code)
Fill in number of attributes.



enterInner
void enterInner(ClassSymbol c)(Code)
Enter an inner class into the `innerClasses' set/queue.



fieldName
Name fieldName(Symbol sym)(Code)
Given a field, return its name.



flagNames
public static String flagNames(long flags)(Code)
Return flags as a string, separated by " ".



getLastModified
long getLastModified(FileObject filename)(Code)



getRetention
RetentionPolicy getRetention(TypeSymbol annotationType)(Code)



hasTypeVar
boolean hasTypeVar(List<Type> l)(Code)



instance
public static ClassWriter instance(Context context)(Code)
Get the ClassWriter instance for this context.



nameType
NameAndType nameType(Symbol sym)(Code)
Given a symbol, return its name-and-type.



putChar
void putChar(ByteBuffer buf, int op, int x)(Code)
Write a character into given byte buffer; byte buffer will not be grown.



putInt
void putInt(ByteBuffer buf, int adr, int x)(Code)
Write an integer into given byte buffer; byte buffer will not be grown.



typeSig
Name typeSig(Type type)(Code)
Return signature of given type



writeAttr
int writeAttr(Name attrName)(Code)
Write header for an attribute to data buffer and return position past attribute length index.



writeClass
public JavaFileObject writeClass(ClassSymbol c) throws IOException, PoolOverflow, StringOverflow(Code)
Emit a class file for a given class.
Parameters:
  c - The class from which a class file is generated.



writeClassFile
public void writeClassFile(OutputStream out, ClassSymbol c) throws IOException, PoolOverflow, StringOverflow(Code)
Write class `c' to outstream `out'.



writeCode
void writeCode(Code code)(Code)
Write code attribute of method.



writeCompoundAttribute
void writeCompoundAttribute(Attribute.Compound c)(Code)
Write a compound attribute excluding the '@' marker.



writeEnclosingMethodAttribute
int writeEnclosingMethodAttribute(ClassSymbol c)(Code)
Write the EnclosingMethod attribute if needed. Returns the number of attributes written (0 or 1).



writeField
void writeField(VarSymbol v)(Code)
Write field symbol, entering all references into constant pool.



writeFields
void writeFields(Scope.Entry e)(Code)



writeFlagAttrs
int writeFlagAttrs(long flags)(Code)
Write flag attributes; return number of attributes written.



writeInnerClasses
void writeInnerClasses()(Code)
Write "inner classes" attribute.



writeJavaAnnotations
int writeJavaAnnotations(List<Attribute.Compound> attrs)(Code)
Write Java-language annotations; return number of JVM attributes written (zero or one).



writeMemberAttrs
int writeMemberAttrs(Symbol sym)(Code)
Write member (field or method) attributes; return number of attributes written.



writeMethod
void writeMethod(MethodSymbol m)(Code)
Write method symbol, entering all references into constant pool.



writeMethods
void writeMethods(Scope.Entry e)(Code)



writeParameterAttrs
int writeParameterAttrs(MethodSymbol m)(Code)
Write method parameter annotations; return number of attributes written.



writePool
void writePool(Pool pool) throws PoolOverflow, StringOverflow(Code)
Write constant pool to pool buffer. Note: during writing, constant pool might grow since some parts of constants still need to be entered.



writeStackMap
void writeStackMap(Code code)(Code)



writeStackMapType
void writeStackMapType(Type t)(Code)



xClassName
public Name xClassName(Type t)(Code)
Given a type t, return the extended class name of its erasure in external representation.



Fields inherited from com.sun.tools.javac.jvm.ClassFile
final public static int CONSTANT_Class(Code)(Java Doc)
final public static int CONSTANT_Double(Code)(Java Doc)
final public static int CONSTANT_Fieldref(Code)(Java Doc)
final public static int CONSTANT_Float(Code)(Java Doc)
final public static int CONSTANT_Integer(Code)(Java Doc)
final public static int CONSTANT_InterfaceMethodref(Code)(Java Doc)
final public static int CONSTANT_Long(Code)(Java Doc)
final public static int CONSTANT_Methodref(Code)(Java Doc)
final public static int CONSTANT_NameandType(Code)(Java Doc)
final public static int CONSTANT_String(Code)(Java Doc)
final public static int CONSTANT_Unicode(Code)(Java Doc)
final public static int CONSTANT_Utf8(Code)(Java Doc)
final public static int JAVA_MAGIC(Code)(Java Doc)
final public static int MAX_CODE(Code)(Java Doc)
final public static int MAX_DIMENSIONS(Code)(Java Doc)
final public static int MAX_LOCALS(Code)(Java Doc)
final public static int MAX_PARAMETERS(Code)(Java Doc)
final public static int MAX_STACK(Code)(Java Doc)

Methods inherited from com.sun.tools.javac.jvm.ClassFile
public static byte[] externalize(byte[] buf, int offset, int len)(Code)(Java Doc)
public static byte[] externalize(Name name)(Code)(Java Doc)
public static byte[] internalize(byte[] buf, int offset, int len)(Code)(Java Doc)
public static byte[] internalize(Name name)(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.