com.stratelia.webactiv.util.annotation
Class AnnotationUtil

java.lang.Object
  extended by com.stratelia.webactiv.util.annotation.AnnotationUtil

public class AnnotationUtil
extends Object

User: Yohann Chastagnier Date: 22/10/13


Constructor Summary
AnnotationUtil()
           
 
Method Summary
static
<A extends Annotation>
Map<Class<A>,A>
extractMethodAnnotations(javax.interceptor.InvocationContext invocationContext)
          Provides a centralized way to extract annotation of a method.
static
<A extends Annotation>
Map<Class<A>,A>
extractMethodAnnotations(org.aspectj.lang.ProceedingJoinPoint invocationContext)
          Provides a centralized way to extract annotation of a method.
static Map<Class<Annotation>,List<Object>> extractMethodAnnotedParameterValues(javax.interceptor.InvocationContext invocationContext)
          Provides a centralized way to extract annoted method parameter values.
static Map<Class<Annotation>,List<Object>> extractMethodAnnotedParameterValues(org.aspectj.lang.ProceedingJoinPoint invocationContext)
          Provides a centralized way to extract annoted method parameter values.
static List<Object> getAnnotedValues(Map<Class<Annotation>,List<Object>> annotedValues, Class<? extends Annotation> annotationClass)
          Gets the values associated to an annotation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationUtil

public AnnotationUtil()
Method Detail

extractMethodAnnotations

public static <A extends Annotation> Map<Class<A>,A> extractMethodAnnotations(javax.interceptor.InvocationContext invocationContext)
                                                                                      throws Exception
Provides a centralized way to extract annotation of a method.

Parameters:
invocationContext -
Returns:
Throws:
Exception

extractMethodAnnotations

public static <A extends Annotation> Map<Class<A>,A> extractMethodAnnotations(org.aspectj.lang.ProceedingJoinPoint invocationContext)
                                                                                      throws Exception
Provides a centralized way to extract annotation of a method.

Parameters:
invocationContext -
Returns:
Throws:
Exception

extractMethodAnnotedParameterValues

public static Map<Class<Annotation>,List<Object>> extractMethodAnnotedParameterValues(javax.interceptor.InvocationContext invocationContext)
                                                                               throws Exception
Provides a centralized way to extract annoted method parameter values.

Parameters:
invocationContext -
Returns:
Throws:
Exception

extractMethodAnnotedParameterValues

public static Map<Class<Annotation>,List<Object>> extractMethodAnnotedParameterValues(org.aspectj.lang.ProceedingJoinPoint invocationContext)
                                                                               throws Exception
Provides a centralized way to extract annoted method parameter values.

Parameters:
invocationContext -
Returns:
Throws:
Exception

getAnnotedValues

public static List<Object> getAnnotedValues(Map<Class<Annotation>,List<Object>> annotedValues,
                                            Class<? extends Annotation> annotationClass)
Gets the values associated to an annotation.

Parameters:
annotedValues -
Returns:
List empty or not (but never null)


Copyright © 2016 Silverpeas. All Rights Reserved.