|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.classfile.ClassWriter
public class ClassWriter
Write a ClassFile data structure to a file or stream.
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.
| Nested Class Summary | |
|---|---|
protected static class |
ClassWriter.AnnotationWriter
Writer for annotations and the values they contain. |
protected static class |
ClassWriter.AttributeWriter
Writer for the different types of attribute. |
protected static class |
ClassWriter.ClassOutputStream
Subtype of ByteArrayOutputStream with the convenience methods of a DataOutputStream. |
protected static class |
ClassWriter.ConstantPoolWriter
Writer for the entries in the constant pool. |
protected static class |
ClassWriter.StackMapTableWriter
Writer for the frames of StackMap and StackMapTable attributes. |
| Field Summary | |
|---|---|
protected ClassWriter.AttributeWriter |
attributeWriter
|
protected ClassFile |
classFile
|
protected ClassWriter.ConstantPoolWriter |
constantPoolWriter
|
protected ClassWriter.ClassOutputStream |
out
|
| Constructor Summary | |
|---|---|
ClassWriter()
|
|
| Method Summary | |
|---|---|
protected void |
write()
|
void |
write(ClassFile classFile,
java.io.File f)
Write a ClassFile data structure to a file. |
void |
write(ClassFile classFile,
java.io.OutputStream s)
Write a ClassFile data structure to a stream. |
protected void |
writeAccessFlags(AccessFlags flags)
|
protected void |
writeAttributes(Attributes attributes)
|
protected void |
writeClassInfo()
|
protected void |
writeConstantPool()
|
protected void |
writeDescriptor(Descriptor d)
|
protected void |
writeField(Field f)
|
protected void |
writeFields()
|
protected void |
writeHeader()
|
protected void |
writeMethod(Method m)
|
protected void |
writeMethods()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ClassFile classFile
protected ClassWriter.ClassOutputStream out
protected ClassWriter.AttributeWriter attributeWriter
protected ClassWriter.ConstantPoolWriter constantPoolWriter
| Constructor Detail |
|---|
public ClassWriter()
| Method Detail |
|---|
public void write(ClassFile classFile,
java.io.File f)
throws java.io.IOException
java.io.IOException
public void write(ClassFile classFile,
java.io.OutputStream s)
throws java.io.IOException
java.io.IOException
protected void write()
throws java.io.IOException
java.io.IOExceptionprotected void writeHeader()
protected void writeAccessFlags(AccessFlags flags)
protected void writeAttributes(Attributes attributes)
protected void writeClassInfo()
protected void writeDescriptor(Descriptor d)
protected void writeConstantPool()
protected void writeFields()
throws java.io.IOException
java.io.IOException
protected void writeField(Field f)
throws java.io.IOException
java.io.IOException
protected void writeMethods()
throws java.io.IOException
java.io.IOException
protected void writeMethod(Method m)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||