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