Package org.pf4j.util

Class ClassUtils

java.lang.Object
org.pf4j.util.ClassUtils

public class ClassUtils extends Object
  • Constructor Details

    • ClassUtils

      public ClassUtils()
  • Method Details

    • getAllInterfacesNames

      public static List<String> getAllInterfacesNames(Class<?> aClass)
    • getAllInterfaces

      public static List<Class<?>> getAllInterfaces(Class<?> aClass)
    • getAnnotationMirror

      public static AnnotationMirror getAnnotationMirror(TypeElement typeElement, Class<?> annotationClass)
      Get a certain annotation of a TypeElement. See stackoverflow.com for more information.
      Parameters:
      typeElement - the type element, that contains the requested annotation
      annotationClass - the class of the requested annotation
      Returns:
      the requested annotation or null, if no annotation of the provided class was found
      Throws:
      NullPointerException - if typeElement or annotationClass is null
    • getAnnotationValue

      public static AnnotationValue getAnnotationValue(AnnotationMirror annotationMirror, String annotationParameter)
      Get a certain parameter of an AnnotationMirror. See stackoverflow.com for more information.
      Parameters:
      annotationMirror - the annotation, that contains the requested parameter
      annotationParameter - the name of the requested annotation parameter
      Returns:
      the requested parameter or null, if no parameter of the provided name was found
      Throws:
      NullPointerException - if annotationMirror is null
    • getAnnotationValue

      public static AnnotationValue getAnnotationValue(TypeElement typeElement, Class<?> annotationClass, String annotationParameter)
      Get a certain annotation parameter of a TypeElement. See stackoverflow.com for more information.
      Parameters:
      typeElement - the type element, that contains the requested annotation
      annotationClass - the class of the requested annotation
      annotationParameter - 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 - if typeElement or annotationClass is null
    • toString

      private static List<String> toString(List<Class<?>> classes)
      Uses Class.getSimpleName() to convert from Class to String.
      Parameters:
      classes -
      Returns: