Package io.debezium.operator.docs
Class AbstractDocsProcessor
java.lang.Object
javax.annotation.processing.AbstractProcessor
io.debezium.operator.docs.AbstractDocsProcessor
- All Implemented Interfaces:
Processor
- Direct Known Subclasses:
DebeziumOperatorDocsProcessor
-
Field Summary
FieldsFields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<Documented.Field>additionalFields(TypeElement element) protected Documentation.FieldDescriptioncreateFieldDocs(Documented.Field field) Called for each field documented byDocumented.Fieldprotected Documentation.FieldDescriptioncreateFieldDocs(VariableElement field) Called for each field documented byJsonPropertyDescriptiondeclaredTypeName(TypeMirror mirror) protected Optional<Documented.Field>documentedFieldInfo(Element element) protected Optional<Documented>protected Optional<Documented>documentedTypeInfo(TypeMirror type) protected Documentation.TypeDescriptiondocumentType(TypeElement element) protected voiddocumentTypes(Collection<TypeElement> types) enumConstantNames(TypeElement type) enumTypeName(TypeMirror type) Extracts type documented byDocumented.FieldexplicitTypeName(TypeMirror type) protected StringfieldDefaultValue(Element element) protected StringfieldDescription(Element element) Gets descriptions fromJsonPropertyDescriptionprotected Stringprotected StringExtracts external type reference URL fromDocumented.Fieldpresent on a fieldprotected StringfieldType(VariableElement field) protected StringExtracts a type reference from a field's type.protected abstract DocumentationFormatterCreates an appropriate instance of documentation formatterprotected StringgenericTypeName(DeclaredType type) protected booleanisDocumentedField(Element field) protected booleanisKnownType(String name) protected booleanisNotHidden(TypeElement element) protected Optional<com.fasterxml.jackson.annotation.JsonProperty>jsonProperty(Element element) protected Optional<com.fasterxml.jackson.annotation.JsonPropertyDescription>jsonPropertyDescription(Element element) k8TypeReference(String slug) protected Stringprotected Stringname(TypeElement type) protected List<VariableElement>presentFields(TypeElement element) booleanprocess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) private voidsetKnownTypes(Collection<TypeElement> types) protected StringsimpleName(String fullName) For a fully qualified name, this method returns the part after the last dotprotected Documentation.TypeDescriptionBuildertypeDescriptionBuilder(String name) Creates an appropriate instance of type description builderprotected StringtypeName(TypeMirror type) protected voidwriteDocFile(String fileName) Methods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedOptions, getSupportedSourceVersion, init, isInitialized
-
Field Details
-
documentation
-
file
-
knownTypes
-
-
Constructor Details
-
AbstractDocsProcessor
-
-
Method Details
-
getSupportedAnnotationTypes
- Specified by:
getSupportedAnnotationTypesin interfaceProcessor- Overrides:
getSupportedAnnotationTypesin classAbstractProcessor
-
process
- Specified by:
processin interfaceProcessor- Specified by:
processin classAbstractProcessor
-
writeDocFile
-
documentTypes
-
documentType
-
additionalFields
-
presentFields
-
setKnownTypes
-
name
- Parameters:
type- type given asTypeElementinstance- Returns:
- name of the type
-
name
- Returns:
- name of the element
-
simpleName
For a fully qualified name, this method returns the part after the last dot- Parameters:
fullName- fully qualified name- Returns:
- simple name
-
documentedFieldInfo
-
jsonPropertyDescription
-
jsonProperty
-
documentedTypeInfo
-
documentedTypeInfo
-
isDocumentedField
-
isNotHidden
-
isKnownType
-
fieldDefaultValue
-
fieldDescription
Gets descriptions fromJsonPropertyDescription- Parameters:
element- annotated element- Returns:
- field description
-
fieldType
- Parameters:
field- variable field- Returns:
- type with generic arguments
-
explicitFieldTypeName
Extracts type documented byDocumented.Field- Parameters:
field- scanned field- Returns:
- documented type or empty
-
explicitTypeName
-
enumTypeName
-
declaredTypeName
-
typeName
-
genericTypeName
-
enumConstantNames
-
fieldTypeReference
Extracts a type reference from a field's type.- Parameters:
field- variable element- Returns:
- name of documented type
-
fieldExternalTypeReference
Extracts external type reference URL fromDocumented.Fieldpresent on a field- Returns:
- reference url
-
fieldExternalTypeReference
-
k8TypeReference
-
typeErasureReference
-
typeArgumentReference
-
typeDescriptionBuilder
Creates an appropriate instance of type description builder- Parameters:
name- type name- Returns:
- type description builder
-
createFieldDocs
Called for each field documented byDocumented.Field- Parameters:
field- field asDocumented.Field- Returns:
- field description
-
createFieldDocs
Called for each field documented byJsonPropertyDescription- Parameters:
field- field asVariableElement- Returns:
- filed description
-
formatter
Creates an appropriate instance of documentation formatter- Returns:
- documentation formatter
-