import java.util.List;
/**
- * Utlities for working with annotations.
+ * Utlities for working with annotations.
*
* @author Erik Brakkee
- *
+ *
*/
public class AnnotationUtils {
* Class to analyse.
* @param aAnnotation
* Annotation that must be present.
- * @return List of accessors. Empty list is returned if no match is found.
+ * @return List of accessors. Empty list is returned if no match is found.
*/
public static List<Accessor> analyse(Class aClass,
Class<? extends Annotation> aAnnotation) {
- List<Accessor> result = new ArrayList<Accessor>();
-
+ List<Accessor> result = new ArrayList<Accessor>();
+
List<Field> fields = ReflectionUtils.getAllFields(aClass);
for (Field field : fields) {
if (field.isAnnotationPresent(aAnnotation)) {