use of jdk.internal.org.objectweb.asm.AnnotationVisitor in project Bytecoder by mirkosertic.
the class TraceMethodVisitor method visitParameterAnnotation.
@Override
public AnnotationVisitor visitParameterAnnotation(final int parameter, final String desc, final boolean visible) {
Printer p = this.p.visitParameterAnnotation(parameter, desc, visible);
AnnotationVisitor av = mv == null ? null : mv.visitParameterAnnotation(parameter, desc, visible);
return new TraceAnnotationVisitor(av, p);
}
use of jdk.internal.org.objectweb.asm.AnnotationVisitor in project Bytecoder by mirkosertic.
the class TraceAnnotationVisitor method visitArray.
@Override
public AnnotationVisitor visitArray(final String name) {
Printer p = this.p.visitArray(name);
AnnotationVisitor av = this.av == null ? null : this.av.visitArray(name);
return new TraceAnnotationVisitor(av, p);
}
use of jdk.internal.org.objectweb.asm.AnnotationVisitor in project Bytecoder by mirkosertic.
the class TraceFieldVisitor method visitTypeAnnotation.
@Override
public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) {
Printer p = this.p.visitFieldTypeAnnotation(typeRef, typePath, desc, visible);
AnnotationVisitor av = fv == null ? null : fv.visitTypeAnnotation(typeRef, typePath, desc, visible);
return new TraceAnnotationVisitor(av, p);
}
use of jdk.internal.org.objectweb.asm.AnnotationVisitor in project Bytecoder by mirkosertic.
the class TraceFieldVisitor method visitAnnotation.
@Override
public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) {
Printer p = this.p.visitFieldAnnotation(desc, visible);
AnnotationVisitor av = fv == null ? null : fv.visitAnnotation(desc, visible);
return new TraceAnnotationVisitor(av, p);
}
use of jdk.internal.org.objectweb.asm.AnnotationVisitor in project Bytecoder by mirkosertic.
the class AnnotationNode method accept.
/**
* Makes the given visitor visit a given annotation value.
*
* @param av
* an annotation visitor. Maybe <tt>null</tt>.
* @param name
* the value name.
* @param value
* the actual value.
*/
static void accept(final AnnotationVisitor av, final String name, final Object value) {
if (av != null) {
if (value instanceof String[]) {
String[] typeconst = (String[]) value;
av.visitEnum(name, typeconst[0], typeconst[1]);
} else if (value instanceof AnnotationNode) {
AnnotationNode an = (AnnotationNode) value;
an.accept(av.visitAnnotation(name, an.desc));
} else if (value instanceof List) {
AnnotationVisitor v = av.visitArray(name);
if (v != null) {
List<?> array = (List<?>) value;
for (int j = 0; j < array.size(); ++j) {
accept(v, null, array.get(j));
}
v.visitEnd();
}
} else {
av.visit(name, value);
}
}
}
Aggregations