Package io.debezium.operator.docs
Class Processing
java.lang.Object
io.debezium.operator.docs.Processing
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Annotation>
Optional<T>annotation(Element element, Class<T> annotation) static Optional<DeclaredType>asDeclared(TypeMirror type) Returns type mirror as instance ofDeclaredTypewhen possibleasElement(TypeMirror type) static Optional<TypeElement>asEnum(TypeMirror type) Return type mirror asTypeElementif it represents an Enum typestatic Optional<TypeElement>asTypeElement(TypeMirror type, ElementKind kind) Return type mirror asTypeElementif it represents specified kindenclosedElements(TypeElement element) enclosedElements(TypeElement element, ElementKind kind) Filters enclosed elements by kindenclosedElements(TypeElement element, ElementKind kind, Class<T> clazz) Filters enclosed elements by kindstatic <A extends Annotation>
booleanisAnnotated(Element element, Class<A> annotation) static TypeElementparent(TypeElement element) Returns parent class of given elementstatic Stream<? extends TypeMirror>typeArguments(DeclaredType type) static <T> Stream<T>typeArguments(DeclaredType type, Function<TypeMirror, T> mapper)
-
Constructor Details
-
Processing
private Processing()
-
-
Method Details
-
isAnnotated
- Parameters:
element- potentially annotated elementannotation- annotation class- Returns:
- ture if element is annotated, false otherwise
-
annotation
- Parameters:
element- potentially annotated elementannotation- annotation class- Returns:
- annotation instance or empty optional if not present
-
asDeclared
Returns type mirror as instance ofDeclaredTypewhen possible- Parameters:
type- type mirror instance- Returns:
- type as
DeclaredTypeor empty
-
asElement
- Parameters:
type- type mirror instance- Returns:
- type as
Elementor empty
-
asTypeElement
Return type mirror asTypeElementif it represents specified kind- Parameters:
type- type mirror instancekind- element kind- Returns:
- type mirror as
TypeElementor empty
-
asEnum
Return type mirror asTypeElementif it represents an Enum type- Parameters:
type- type mirror instance- Returns:
- type mirror as
TypeElementor empty
-
enclosedElements
public static <T extends Element> Stream<T> enclosedElements(TypeElement 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
Filters enclosed elements by kind- Parameters:
element- parent element- Returns:
- stream of enclosed elements
-
enclosedElements
- Parameters:
element- parent element- Returns:
- stream of enclosed elements
-
parent
Returns parent class of given element- Parameters:
element- the type element- Returns:
- parent or null in case that the parent is
Object
-
typeArguments
-
typeArguments
-