Package org.pf4j.util
Class ClassUtils
java.lang.Object
org.pf4j.util.ClassUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllInterfaces
(Class<?> aClass) getAllInterfacesNames
(Class<?> aClass) static AnnotationMirror
getAnnotationMirror
(TypeElement typeElement, Class<?> annotationClass) Get a certain annotation of aTypeElement
.static AnnotationValue
getAnnotationValue
(AnnotationMirror annotationMirror, String annotationParameter) Get a certain parameter of anAnnotationMirror
.static AnnotationValue
getAnnotationValue
(TypeElement typeElement, Class<?> annotationClass, String annotationParameter) Get a certain annotation parameter of aTypeElement
.
-
Constructor Details
-
ClassUtils
public ClassUtils()
-
-
Method Details
-
getAllInterfacesNames
-
getAllInterfaces
-
getAnnotationMirror
public static AnnotationMirror getAnnotationMirror(TypeElement typeElement, Class<?> annotationClass) Get a certain annotation of aTypeElement
. See stackoverflow.com for more information.- Parameters:
typeElement
- the type element, that contains the requested annotationannotationClass
- the class of the requested annotation- Returns:
- the requested annotation or null, if no annotation of the provided class was found
- Throws:
NullPointerException
- iftypeElement
orannotationClass
is null
-
getAnnotationValue
public static AnnotationValue getAnnotationValue(AnnotationMirror annotationMirror, String annotationParameter) Get a certain parameter of anAnnotationMirror
. See stackoverflow.com for more information.- Parameters:
annotationMirror
- the annotation, that contains the requested parameterannotationParameter
- the name of the requested annotation parameter- Returns:
- the requested parameter or null, if no parameter of the provided name was found
- Throws:
NullPointerException
- ifannotationMirror
is null
-
getAnnotationValue
public static AnnotationValue getAnnotationValue(TypeElement typeElement, Class<?> annotationClass, String annotationParameter) Get a certain annotation parameter of aTypeElement
. See stackoverflow.com for more information.- Parameters:
typeElement
- the type element, that contains the requested annotationannotationClass
- the class of the requested annotationannotationParameter
- the name of the requested annotation parameter- Returns:
- the requested parameter or null, if no annotation for the provided class was found or no annotation parameter was found
- Throws:
NullPointerException
- iftypeElement
orannotationClass
is null
-
toString
- Parameters:
classes
-- Returns:
-