// use AsmClassInfo to loop over fields, to avoid nested loading of potential target classes
ClassInfo classInfo = AsmClassInfo.getClassInfo(klass.getName(), klass.getClassLoader());
FieldInfo[] fieldList = classInfo.getFields();
for (int i = 0; i < fieldList.length; i++) {
FieldInfo field = fieldList[i];
for (Iterator iterator = field.getAnnotations().iterator(); iterator.hasNext();) {
AnnotationInfo annotationInfo = (AnnotationInfo) iterator.next();
if (annotationInfo.getAnnotation() == null) {
continue;
}
if (AnnotationC.ANNOTATION_EXPRESSION.equals(annotationInfo.getName())) {
DefinitionParserHelper.createAndAddPointcutDefToAspectDef(
field.getName(),
((ExpressionAnnotationProxy)annotationInfo.getAnnotation()).expression(),
aspectDef
);
}
else if (AnnotationC.ANNOTATION_IMPLEMENTS.equals(annotationInfo.getName())) {
DefinitionParserHelper.createAndAddInterfaceIntroductionDefToAspectDef(
((ImplementsAnnotationProxy)annotationInfo.getAnnotation()).expression(),
field.getName(),
field.getType().getName(),
aspectDef
);
}
}