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.ClassName
CONVERTER_CLASSNAME
protected static java.lang.String
GENERATED_ANNOTATION_CLASS_NAME_STRING
protected static java.lang.String
JAVA_9_PLUS_ANNOTATION_GENERATED_PACKAGE
protected static java.lang.String
PRE_JAVA_9_ANNOTATION_GENERATED_PACKAGE
protected static com.squareup.javapoet.AnnotationSpec
RETENTION_RUNTIME_ANNOTATION_SPEC
protected static java.lang.String
SPRING_CONTEXT_ANNOTATION_PACKAGE_NAME
protected static com.squareup.javapoet.AnnotationSpec
TARGET_TYPE_ANNOTATION_SPEC
-
Constructor Summary
Constructors Modifier Constructor Description protected
Generator(java.time.Clock clock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.squareup.javapoet.AnnotationSpec
buildGeneratedAnnotationSpec()
protected java.lang.String
collectionOfNameIfApplicable(com.squareup.javapoet.TypeName typeName)
protected java.time.Clock
getClock()
protected javax.annotation.processing.ProcessingEnvironment
getProcessingEnvironment()
void
init(javax.annotation.processing.ProcessingEnvironment processingEnv)
protected boolean
isCollectionWithGenericParameter(com.squareup.javapoet.ParameterizedTypeName parameterizedTypeName)
protected boolean
isJava9PlusGeneratedAvailable()
protected boolean
isPreJava9GeneratedAvailable()
protected com.squareup.javapoet.JavaFile.Builder
modifyDefaultFileBuilder(com.squareup.javapoet.JavaFile.Builder javaFileBuilder)
protected void
writeGeneratedCodeToOutput(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()
-
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)
-
-