Class AnnotationProcessingHelper

java.lang.Object
org.tentackle.buildsupport.AnnotationProcessingHelper

public final class AnnotationProcessingHelper extends Object
Helper for annotation processing.
Author:
harald
  • Method Details

    • readModifiers

      public static Modifier[] readModifiers(StringTokenizer stok)
      Gets an array of modifiers from a string tokenizer.
      Parameters:
      stok - the string tokenizer
      Returns:
      the modifier array
    • isModifierSet

      public static boolean isModifierSet(Modifier modifier, Modifier[] modifierList)
      Checks if a modifier is in the set of modifiers.
      Parameters:
      modifier - the modifier to check
      modifierList - the list of modifiers
      Returns:
      true if modifier is in the list of modifiers
    • objectArrayToString

      public static String objectArrayToString(Object[] objArray, String separator)
      Creates a string from an object array. Copied from StringHelper to keep dependencies small.
      Parameters:
      objArray - the array of objects
      separator - the string between two objects
      Returns:
      the object array string
    • isTypeInstanceOf

      public static boolean isTypeInstanceOf(ProcessingEnvironment processingEnv, TypeMirror typeMirror, String className, String genType)
      Checks whether a type is an instance of a given classname and optional generics type.
      Parameters:
      processingEnv - the annotation processing environment
      typeMirror - the element type
      className - the class to check
      genType - the generic type
      Returns:
      true if type is an instance of a given classname
    • isTypeInstanceOf

      public static boolean isTypeInstanceOf(ProcessingEnvironment processingEnv, TypeMirror typeMirror, String className)
      Checks whether a type is a given instance of a class.
      Parameters:
      processingEnv - the annotation processing environment
      typeMirror - the element type
      className - the class to check
      Returns:
      true if the typeMirror represents an instance of className