Class AnnotationReader
- java.lang.Object
-
- de.unistuttgart.informatik.fius.icge.simulation.inspection.AnnotationReader
-
public class AnnotationReader extends Object
Class responsible for reading annotations.- Author:
- Tim Neumann
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Field>
getAllAttributesWithAnnotationRecursively(Class<?> cls, Class<? extends Annotation> annotation)
Get all attributes with the given annotation in the given class and all parent classes.static List<Method>
getAllMethodsWithAnnotationRecursively(Class<?> cls, Class<? extends Annotation> annotation)
Get all methods with the given annotation in the given class and all parent classes.
-
-
-
Method Detail
-
getAllMethodsWithAnnotationRecursively
public static List<Method> getAllMethodsWithAnnotationRecursively(Class<?> cls, Class<? extends Annotation> annotation)
Get all methods with the given annotation in the given class and all parent classes.- Parameters:
cls
- The class to get the methods fromannotation
- The type of annotation all returned methods need to have.- Returns:
- A list of methods with the given annotation.
-
getAllAttributesWithAnnotationRecursively
public static List<Field> getAllAttributesWithAnnotationRecursively(Class<?> cls, Class<? extends Annotation> annotation)
Get all attributes with the given annotation in the given class and all parent classes.- Parameters:
cls
- The class to get the attributes fromannotation
- The type of annotation all returned attributes need to have.- Returns:
- A list of attributes with the given annotation.
-
-