Class Generator
- java.lang.Object
-
- org.mapstruct.extensions.spring.converter.Generator
-
- Direct Known Subclasses:
AdapterRelatedGenerator,DelegatingConverterGenerator
public abstract class Generator extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static com.squareup.javapoet.ClassNameCONVERTER_CLASSNAMEprotected static java.lang.StringGENERATED_ANNOTATION_CLASS_NAME_STRINGprotected static java.lang.StringJAVA_9_PLUS_ANNOTATION_GENERATED_PACKAGEprotected static java.lang.StringPRE_JAVA_9_ANNOTATION_GENERATED_PACKAGEprotected static com.squareup.javapoet.AnnotationSpecRETENTION_RUNTIME_ANNOTATION_SPECprotected static java.lang.StringSPRING_CONTEXT_ANNOTATION_PACKAGE_NAMEprotected static com.squareup.javapoet.AnnotationSpecTARGET_TYPE_ANNOTATION_SPEC
-
Constructor Summary
Constructors Modifier Constructor Description protectedGenerator(java.time.Clock clock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.squareup.javapoet.AnnotationSpecbuildGeneratedAnnotationSpec()protected java.lang.StringcollectionOfNameIfApplicable(com.squareup.javapoet.TypeName typeName)protected java.time.ClockgetClock()protected javax.annotation.processing.ProcessingEnvironmentgetProcessingEnvironment()voidinit(javax.annotation.processing.ProcessingEnvironment processingEnv)protected booleanisCollectionWithGenericParameter(com.squareup.javapoet.ParameterizedTypeName parameterizedTypeName)protected booleanisJava9PlusGeneratedAvailable()protected booleanisPreJava9GeneratedAvailable()protected booleanisTypeAvailable(java.lang.String name)protected com.squareup.javapoet.JavaFile.BuildermodifyDefaultFileBuilder(com.squareup.javapoet.JavaFile.Builder javaFileBuilder)protected voidwriteGeneratedCodeToOutput(java.util.function.Supplier<java.lang.String> packageNameSupplier, java.util.function.Supplier<com.squareup.javapoet.TypeSpec> mainTypeSpecSupplier, java.io.Writer out)
-
-
-
Field Detail
-
GENERATED_ANNOTATION_CLASS_NAME_STRING
protected static final java.lang.String GENERATED_ANNOTATION_CLASS_NAME_STRING
- See Also:
- Constant Field Values
-
PRE_JAVA_9_ANNOTATION_GENERATED_PACKAGE
protected static final java.lang.String PRE_JAVA_9_ANNOTATION_GENERATED_PACKAGE
- See Also:
- Constant Field Values
-
JAVA_9_PLUS_ANNOTATION_GENERATED_PACKAGE
protected static final java.lang.String JAVA_9_PLUS_ANNOTATION_GENERATED_PACKAGE
- See Also:
- Constant Field Values
-
TARGET_TYPE_ANNOTATION_SPEC
protected static final com.squareup.javapoet.AnnotationSpec TARGET_TYPE_ANNOTATION_SPEC
-
RETENTION_RUNTIME_ANNOTATION_SPEC
protected static final com.squareup.javapoet.AnnotationSpec RETENTION_RUNTIME_ANNOTATION_SPEC
-
SPRING_CONTEXT_ANNOTATION_PACKAGE_NAME
protected static final java.lang.String SPRING_CONTEXT_ANNOTATION_PACKAGE_NAME
- See Also:
- Constant Field Values
-
CONVERTER_CLASSNAME
protected static final com.squareup.javapoet.ClassName CONVERTER_CLASSNAME
-
-
Method Detail
-
getProcessingEnvironment
protected final javax.annotation.processing.ProcessingEnvironment getProcessingEnvironment()
-
init
public final void init(javax.annotation.processing.ProcessingEnvironment processingEnv)
-
getClock
protected final java.time.Clock getClock()
-
isPreJava9GeneratedAvailable
protected final boolean isPreJava9GeneratedAvailable()
-
isJava9PlusGeneratedAvailable
protected final boolean isJava9PlusGeneratedAvailable()
-
isTypeAvailable
protected boolean isTypeAvailable(java.lang.String name)
-
buildGeneratedAnnotationSpec
protected final com.squareup.javapoet.AnnotationSpec buildGeneratedAnnotationSpec()
-
modifyDefaultFileBuilder
protected com.squareup.javapoet.JavaFile.Builder modifyDefaultFileBuilder(com.squareup.javapoet.JavaFile.Builder javaFileBuilder)
-
writeGeneratedCodeToOutput
protected final void writeGeneratedCodeToOutput(java.util.function.Supplier<java.lang.String> packageNameSupplier, java.util.function.Supplier<com.squareup.javapoet.TypeSpec> mainTypeSpecSupplier, java.io.Writer out)
-
isCollectionWithGenericParameter
protected final boolean isCollectionWithGenericParameter(com.squareup.javapoet.ParameterizedTypeName parameterizedTypeName)
-
collectionOfNameIfApplicable
protected final java.lang.String collectionOfNameIfApplicable(com.squareup.javapoet.TypeName typeName)
-
-