final class FieldWriter extends FieldVisitor
FieldVisitor
that generates Java fields in bytecode form.api, fv
Constructor and Description |
---|
FieldWriter(ClassWriter cw,
int access,
java.lang.String name,
java.lang.String desc,
java.lang.String signature,
java.lang.Object value)
Constructs a new
FieldWriter . |
Modifier and Type | Method and Description |
---|---|
(package private) int |
getSize()
Returns the size of this field.
|
(package private) void |
put(ByteVector out)
Puts the content of this field into the given byte vector.
|
AnnotationVisitor |
visitAnnotation(java.lang.String desc,
boolean visible)
Visits an annotation of the field.
|
void |
visitAttribute(Attribute attr)
Visits a non standard attribute of the field.
|
void |
visitEnd()
Visits the end of the field.
|
FieldWriter(ClassWriter cw, int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.Object value)
FieldWriter
.public AnnotationVisitor visitAnnotation(java.lang.String desc, boolean visible)
FieldVisitor
visitAnnotation
in class FieldVisitor
desc
- the class descriptor of the annotation class.visible
- true if the annotation is visible at runtime.public void visitAttribute(Attribute attr)
FieldVisitor
visitAttribute
in class FieldVisitor
attr
- an attribute.public void visitEnd()
FieldVisitor
visitEnd
in class FieldVisitor
int getSize()
void put(ByteVector out)
out
- where the content of this field must be put.Copyright (c) 2004-2012 Oracle. All rights reserved.