{
while(ANNOTATION.equals(getElementName())) {
nextElement();
//REVIEW creating ann for tag is not the right thing to do here.
//we may need to store more info about exactly what the annotation was
MAnnotation ann = element.addLiteralAnnotation(assertCurrentString(NAME));
while(ANNOTATIONVALUE.equals(getElementName())) {
nextElement();
String name = assertCurrentString(NAME);
String type = assertCurrentString(TYPE);
JClass jclass = mContext.getClassLoader().loadClass(type);
if (jclass.isArrayType()) {
Collection list = new ArrayList();
while(VALUE.equals(getElementName())) {
String value = assertCurrentString(VALUE);
list.add(value);
}
String[] vals = new String[list.size()];
list.toArray(vals);
ann.setSimpleValue(name,vals,jclass);
} else {
String value = assertCurrentString(VALUE);
ann.setSimpleValue(name,value, jclass);
}
assertEnd(ANNOTATIONVALUE);
nextElement();
}
assertEnd(ANNOTATION);