Class AnnotationUtils

java.lang.Object
org.geysermc.geyser.util.AnnotationUtils

public class AnnotationUtils extends Object
  • Constructor Details

    • AnnotationUtils

      public AnnotationUtils()
  • Method Details

    • hasAnnotationRecursive

      public static boolean hasAnnotationRecursive(Class<?> clazz, Class<? extends Annotation> annotation)
    • getGeneratedClassesForAnnotation

      public static Set<Class<?>> getGeneratedClassesForAnnotation(Class<? extends Annotation> annotationClass)
      Returns a set of all the classes that are annotated by a given annotation. Keep in mind that these are from a set of generated annotations generated at compile time by the annotation processor, meaning that arbitrary annotations cannot be passed into this method and expected to have a set of classes returned back.
      Parameters:
      annotationClass - the annotation class
      Returns:
      a set of all the classes annotated by the given annotation
    • getGeneratedClassesForAnnotation

      public static Set<Class<?>> getGeneratedClassesForAnnotation(String input)
      Returns a set of all the classes that are annotated by a given annotation. Keep in mind that these are from a set of generated annotations generated at compile time by the annotation processor, meaning that arbitrary annotations cannot be passed into this method and expected to have a set of classes returned back.
      Parameters:
      input - the fully qualified name of the annotation
      Returns:
      a set of all the classes annotated by the given annotation