public abstract class JavaTemplateEntity extends TemplateEntity
| Modifier and Type | Field and Description |
|---|---|
protected ConnectorModel |
connectorModel |
protected static String |
NAME_MEMBER |
protected Path |
outputDir |
protected static String |
VALUE_MEMBER |
| Constructor and Description |
|---|
JavaTemplateEntity(Path outputDir,
ConnectorModel connectorModel) |
| Modifier and Type | Method and Description |
|---|---|
protected com.squareup.javapoet.MethodSpec.Builder |
generateGetter(com.squareup.javapoet.FieldSpec fieldSpec,
com.google.common.base.CaseFormat fieldNameCaseFormat) |
protected com.squareup.javapoet.MethodSpec.Builder |
generateOptionalGetter(com.squareup.javapoet.FieldSpec fieldSpec,
Class<?> type,
com.google.common.base.CaseFormat fieldNameCaseFormat) |
Path |
getResourcesPath() |
Path |
getSourcesPath() |
protected void |
writeClassToFile(com.squareup.javapoet.JavaFile javaFile) |
protected void |
writeClassToFile(com.squareup.javapoet.TypeSpec clazz,
String targetPackage) |
applyTemplates, getTemplateEngineprotected static final String VALUE_MEMBER
protected static final String NAME_MEMBER
protected final Path outputDir
protected final ConnectorModel connectorModel
public JavaTemplateEntity(Path outputDir, ConnectorModel connectorModel)
protected void writeClassToFile(com.squareup.javapoet.TypeSpec clazz,
String targetPackage)
throws TemplatingException
TemplatingExceptionprotected void writeClassToFile(com.squareup.javapoet.JavaFile javaFile)
throws TemplatingException
TemplatingExceptionpublic Path getResourcesPath()
public Path getSourcesPath()
protected com.squareup.javapoet.MethodSpec.Builder generateGetter(com.squareup.javapoet.FieldSpec fieldSpec,
com.google.common.base.CaseFormat fieldNameCaseFormat)
protected com.squareup.javapoet.MethodSpec.Builder generateOptionalGetter(com.squareup.javapoet.FieldSpec fieldSpec,
Class<?> type,
com.google.common.base.CaseFormat fieldNameCaseFormat)
Copyright © 2020. All rights reserved.