use of org.mvel2.asm.AnnotationVisitor in project mvel by mvel.
the class TraceMethodVisitor method visitLocalVariableAnnotation.
@Override
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef, TypePath typePath, Label[] start, Label[] end, int[] index, String desc, boolean visible) {
Printer p = this.p.visitLocalVariableAnnotation(typeRef, typePath, start, end, index, desc, visible);
AnnotationVisitor av = mv == null ? null : mv.visitLocalVariableAnnotation(typeRef, typePath, start, end, index, desc, visible);
return new TraceAnnotationVisitor(av, p);
}
use of org.mvel2.asm.AnnotationVisitor in project mvel by mvel.
the class TraceMethodVisitor method visitTypeAnnotation.
@Override
public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) {
Printer p = this.p.visitMethodTypeAnnotation(typeRef, typePath, desc, visible);
AnnotationVisitor av = mv == null ? null : mv.visitTypeAnnotation(typeRef, typePath, desc, visible);
return new TraceAnnotationVisitor(av, p);
}
use of org.mvel2.asm.AnnotationVisitor in project mvel by mvel.
the class TraceMethodVisitor method visitTryCatchAnnotation.
@Override
public AnnotationVisitor visitTryCatchAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) {
Printer p = this.p.visitTryCatchAnnotation(typeRef, typePath, desc, visible);
AnnotationVisitor av = mv == null ? null : mv.visitTryCatchAnnotation(typeRef, typePath, desc, visible);
return new TraceAnnotationVisitor(av, p);
}
use of org.mvel2.asm.AnnotationVisitor in project mvel by mvel.
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 org.mvel2.asm.AnnotationVisitor in project mvel by mvel.
the class SAXAnnotationAdapter method visit.
@Override
public void visit(final String name, final Object value) {
Class<?> c = value.getClass();
if (c.isArray()) {
AnnotationVisitor av = visitArray(name);
if (value instanceof byte[]) {
byte[] b = (byte[]) value;
for (int i = 0; i < b.length; i++) {
av.visit(null, b[i]);
}
} else if (value instanceof char[]) {
char[] b = (char[]) value;
for (int i = 0; i < b.length; i++) {
av.visit(null, b[i]);
}
} else if (value instanceof short[]) {
short[] b = (short[]) value;
for (int i = 0; i < b.length; i++) {
av.visit(null, b[i]);
}
} else if (value instanceof boolean[]) {
boolean[] b = (boolean[]) value;
for (int i = 0; i < b.length; i++) {
av.visit(null, Boolean.valueOf(b[i]));
}
} else if (value instanceof int[]) {
int[] b = (int[]) value;
for (int i = 0; i < b.length; i++) {
av.visit(null, b[i]);
}
} else if (value instanceof long[]) {
long[] b = (long[]) value;
for (int i = 0; i < b.length; i++) {
av.visit(null, b[i]);
}
} else if (value instanceof float[]) {
float[] b = (float[]) value;
for (int i = 0; i < b.length; i++) {
av.visit(null, b[i]);
}
} else if (value instanceof double[]) {
double[] b = (double[]) value;
for (int i = 0; i < b.length; i++) {
av.visit(null, b[i]);
}
}
av.visitEnd();
} else {
addValueElement("annotationValue", name, Type.getDescriptor(c), value.toString());
}
}
Aggregations