public final class AnnotationRef<T extends Annotation> extends Object
Annotation instances into asm visit operations.
This is safer than just using AnnotationVisitor directly since it makes it impossible
to typo field names, which are silently ignored, since it is assumed in the parser that the field
is from a different version of the annotation.
| Modifier and Type | Method and Description |
|---|---|
static <T extends Annotation> |
forType(Class<T> annType) |
void |
write(T instance,
org.objectweb.asm.ClassVisitor visitor)
Writes the given annotation to the visitor.
|
public static <T extends Annotation> AnnotationRef<T> forType(Class<T> annType)
public void write(T instance, org.objectweb.asm.ClassVisitor visitor)