..Annotations_attribute
. See the source code of the AnnotationsAttribute.Copier
class. The following code snippet is an example of use of this class:
ConstPool pool = ...; output = new ByteArrayOutputStream(); writer = new AnnotationsWriter(output, pool); writer.numAnnotations(1); writer.annotation("Author", 2); writer.memberValuePair("name"); writer.constValueIndex("chiba"); writer.memberValuePair("address"); writer.constValueIndex("tokyo"); writer.close(); byte[] attribute_info = output.toByteArray(); AnnotationsAttribute anno = new AnnotationsAttribute(pool, AnnotationsAttribute.visibleTag, attribute_info);
The code snippet above generates the annotation attribute corresponding to this annotation:
@Author(name = "chiba", address = "tokyo")@see org.jboss.forge.furnace.proxy.javassist.bytecode.AnnotationsAttribute @see org.jboss.forge.furnace.proxy.javassist.bytecode.ParameterAnnotationsAttribute
|
|