Class AnnotationUtil
- java.lang.Object
-
- org.silverpeas.core.util.annotation.AnnotationUtil
-
public class AnnotationUtil extends Object
User: Yohann Chastagnier Date: 22/10/13
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<Class<? extends Annotation>,List<Object>>
extractMethodAnnotatedParameterValues(javax.interceptor.InvocationContext invocationContext)
Provides a centralized way to extract annotated method parameter values.static Map<Class<? extends Annotation>,Annotation>
extractMethodAnnotations(javax.interceptor.InvocationContext invocationContext)
Provides a centralized way to extract annotation of a method.static <T> List<T>
getAnnotatedValues(Map<Class<? extends Annotation>,List<Object>> annotatedValues, Class<? extends Annotation> annotationClass)
Gets the list of annotation instances from the given list of annotations which the type is the one given.
-
-
-
Method Detail
-
extractMethodAnnotations
public static Map<Class<? extends Annotation>,Annotation> extractMethodAnnotations(javax.interceptor.InvocationContext invocationContext)
Provides a centralized way to extract annotation of a method.- Parameters:
invocationContext
- the context of invocation.- Returns:
- the map with keys of Annotation class and values of object list.
-
extractMethodAnnotatedParameterValues
public static Map<Class<? extends Annotation>,List<Object>> extractMethodAnnotatedParameterValues(javax.interceptor.InvocationContext invocationContext)
Provides a centralized way to extract annotated method parameter values.- Parameters:
invocationContext
- the context of invocation.- Returns:
- the map with keys of Annotation class and values of object list.
-
getAnnotatedValues
public static <T> List<T> getAnnotatedValues(Map<Class<? extends Annotation>,List<Object>> annotatedValues, Class<? extends Annotation> annotationClass)
Gets the list of annotation instances from the given list of annotations which the type is the one given.- Parameters:
annotatedValues
- container that contains several types of annotation instances.- Returns:
- List empty or not (but never null)
-
-