Class Processing

java.lang.Object
io.debezium.operator.docs.Processing

public final class Processing extends Object
  • Constructor Details

    • Processing

      private Processing()
  • Method Details

    • isAnnotated

      public static <A extends Annotation> boolean isAnnotated(Element element, Class<A> annotation)
      Parameters:
      element - potentially annotated element
      annotation - annotation class
      Returns:
      ture if element is annotated, false otherwise
    • annotation

      public static <T extends Annotation> Optional<T> annotation(Element element, Class<T> annotation)
      Parameters:
      element - potentially annotated element
      annotation - annotation class
      Returns:
      annotation instance or empty optional if not present
    • asDeclared

      public static Optional<DeclaredType> asDeclared(TypeMirror type)
      Returns type mirror as instance of DeclaredType when possible
      Parameters:
      type - type mirror instance
      Returns:
      type as DeclaredType or empty
    • asElement

      public static Optional<Element> asElement(TypeMirror type)
      Returns type mirror as instance of Element if type is instance of DeclaredType
      Parameters:
      type - type mirror instance
      Returns:
      type as Element or empty
    • asEnum

      public static Optional<TypeElement> asEnum(TypeMirror type)
      Return type mirror as TypeElement if it represents an Enum type
      Parameters:
      type - type mirror instance
      Returns:
      type mirror as TypeElement or empty
    • enclosedElements

      public static <T extends Element> Stream<T> enclosedElements(Element element, ElementKind kind, Class<T> clazz)
      Filters enclosed elements by kind
      Parameters:
      element - parent element
      Returns:
      stream of enclosed elements cast to given type
    • enclosedElements

      public static Stream<? extends Element> enclosedElements(Element element, ElementKind kind)
      Filters enclosed elements by kind
      Parameters:
      element - parent element
      Returns:
      stream of enclosed elements
    • enclosedElements

      public static Stream<? extends Element> enclosedElements(Element element)
      Parameters:
      element - parent element
      Returns:
      stream of enclosed elements
    • typeArguments

      public static Stream<? extends TypeMirror> typeArguments(DeclaredType type)
    • typeArguments

      public static <T> Stream<T> typeArguments(DeclaredType type, Function<TypeMirror,T> mapper)