Class AnnotationHelper
- java.lang.Object
-
- com.github.microtweak.validator.conditional.core.internal.AnnotationHelper
-
public final class AnnotationHelper extends Object
-
-
Constructor Summary
Constructors Constructor Description AnnotationHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <A extends Annotation>
AcreateAnnotation(Class<A> annotationType, Map<String,Object> attributes)static <A extends Annotation>
Annotation[]getAnnotationsWithAnnotation(AnnotatedElement element, Class<A> annotationType)static Map<String,Object>readAllAtributeExcept(Annotation annotation, String... exceptAttributes)static Map<String,Object>readAllAttributes(Annotation annotation)static ObjectreadAttribute(Annotation annotation, Method method)static <R extends Serializable>
RreadAttribute(Annotation annotation, String attributeName, Class<R> returnType)static Annotation[]unwrapRepeatableAnnotations(Annotation annotation)
-
-
-
Method Detail
-
readAllAtributeExcept
public static Map<String,Object> readAllAtributeExcept(Annotation annotation, String... exceptAttributes)
-
readAllAttributes
public static Map<String,Object> readAllAttributes(Annotation annotation)
-
readAttribute
public static Object readAttribute(Annotation annotation, Method method)
-
readAttribute
public static <R extends Serializable> R readAttribute(Annotation annotation, String attributeName, Class<R> returnType) throws NoSuchMethodException
- Throws:
NoSuchMethodException
-
createAnnotation
public static <A extends Annotation> A createAnnotation(Class<A> annotationType, Map<String,Object> attributes)
-
unwrapRepeatableAnnotations
public static Annotation[] unwrapRepeatableAnnotations(Annotation annotation)
-
getAnnotationsWithAnnotation
public static <A extends Annotation> Annotation[] getAnnotationsWithAnnotation(AnnotatedElement element, Class<A> annotationType)
-
-