Class AnnotationUtils
java.lang.Object
org.apache.commons.digester3.annotations.utils.AnnotationUtils
Simple utility class to introspect annotations.
- Since:
- 2.1
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getAnnotationNamespaceURI
(Annotation annotation) Extract thenamespaceURI()
from annotation.static String
getAnnotationPattern
(Annotation annotation) Extract thepattern()
from annotation.static Annotation[]
getAnnotationsArrayValue
(Annotation annotation) Extract the Annotations arrayvalue()
from annotation if present, nul otherwise.static Object
getAnnotationValue
(Annotation annotation) Extract thevalue()
from annotation.static boolean
getFireOnBegin
(Annotation annotation) Extract thefireOnBegin()
from annotation.private static Object
invokeAnnotationMethod
(Annotation annotation, String method) Invokes an annotation method.
-
Field Details
-
VALUE
Thevalue
string constant.- See Also:
-
PATTERN
Thepattern
string constant.- See Also:
-
NAMESPACE_URI
ThenamespaceURI
string constant.- See Also:
-
FIRE_ON_BEGIN
ThenamespaceURI
string constant.- See Also:
-
-
Constructor Details
-
AnnotationUtils
private AnnotationUtils()This class can't be instantiated.
-
-
Method Details
-
getAnnotationValue
Extract thevalue()
from annotation.- Parameters:
annotation
- the annotation has to be introspected.- Returns:
- the annotation
value()
.
-
getAnnotationPattern
Extract thepattern()
from annotation.- Parameters:
annotation
- the annotation has to be introspected.- Returns:
- the annotation
pattern()
.
-
getAnnotationNamespaceURI
Extract thenamespaceURI()
from annotation.- Parameters:
annotation
- The annotation has to be introspected- Returns:
- The annotation
namespaceURI()
-
getFireOnBegin
Extract thefireOnBegin()
from annotation.- Parameters:
annotation
- The annotation has to be introspected- Returns:
- The annotation
fireOnBegin()
-
getAnnotationsArrayValue
Extract the Annotations arrayvalue()
from annotation if present, nul otherwise.- Parameters:
annotation
- the annotation has to be introspected.- Returns:
- the annotation
value()
as Annotations array.
-
invokeAnnotationMethod
Invokes an annotation method.- Parameters:
method
- the method name to execute.annotationn
- the annotation has to be introspected.- Returns:
- the annotation method value, null if any error occurs.
-