}
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, new Byte(b[i]));
}
} else if (value instanceof char[]) {
char[] b = (char[]) value;
for (int i = 0; i < b.length; i++) {
av.visit(null, new Character(b[i]));
}
} else if (value instanceof short[]) {
short[] b = (short[]) value;
for (int i = 0; i < b.length; i++) {
av.visit(null, new Short(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, new Integer(b[i]));
}
} else if (value instanceof long[]) {
long[] b = (long[]) value;
for (int i = 0; i < b.length; i++) {
av.visit(null, new Long(b[i]));
}
} else if (value instanceof float[]) {
float[] b = (float[]) value;
for (int i = 0; i < b.length; i++) {
av.visit(null, new Float(b[i]));
}
} else if (value instanceof double[]) {
double[] b = (double[]) value;
for (int i = 0; i < b.length; i++) {
av.visit(null, new Double(b[i]));
}
}
av.visitEnd();
} else {
addValueElement("annotationValue",
name,
Type.getDescriptor(c),
value.toString());