public static final class ClassFileWriter.FieldWriter
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected ClassFileWriter.ConstPoolWriter |
constPool |
private int |
fieldCount |
protected ByteStream |
output |
| Constructor and Description |
|---|
FieldWriter(ClassFileWriter.ConstPoolWriter cp) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int accessFlags,
int name,
int descriptor,
ClassFileWriter.AttributeWriter aw)
Adds a new field.
|
void |
add(int accessFlags,
java.lang.String name,
java.lang.String descriptor,
ClassFileWriter.AttributeWriter aw)
Adds a new field.
|
(package private) int |
dataSize() |
(package private) int |
size() |
(package private) void |
write(java.io.OutputStream out)
Writes the added fields.
|
protected ByteStream output
protected ClassFileWriter.ConstPoolWriter constPool
private int fieldCount
FieldWriter(ClassFileWriter.ConstPoolWriter cp)
public void add(int accessFlags,
java.lang.String name,
java.lang.String descriptor,
ClassFileWriter.AttributeWriter aw)
accessFlags - access flags.name - the field name.descriptor - the field type.aw - the attributes of the field. may be null.AccessFlagpublic void add(int accessFlags,
int name,
int descriptor,
ClassFileWriter.AttributeWriter aw)
accessFlags - access flags.name - the field name. an index indicating its CONSTANT_Utf8_info.descriptor - the field type. an index indicating its CONSTANT_Utf8_info.aw - the attributes of the field. may be null.AccessFlagint size()
int dataSize()
void write(java.io.OutputStream out)
throws java.io.IOException
java.io.IOException