public abstract class JavaTemplateEntity extends TemplateEntity
| Modifier and Type | Field and Description |
|---|---|
protected ConnectorModel |
connectorModel |
protected static String |
NAME_MEMBER |
protected Path |
outputDir |
protected RestSdkRunConfiguration |
runConfiguration |
protected static String |
VALUE_MEMBER |
| Constructor and Description |
|---|
JavaTemplateEntity(Path outputDir,
ConnectorModel connectorModel,
RestSdkRunConfiguration runConfiguration) |
| 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) |
protected com.squareup.javapoet.FieldSpec |
getConstantStringField(String fieldName,
String value) |
protected com.squareup.javapoet.JavaFile.Builder |
getJavaFileBuilderForClass(com.squareup.javapoet.TypeSpec clazz,
String targetPackage) |
protected Class<?> |
getJavaType(ParameterDataType parameterDataType) |
Path |
getResourcesPath() |
Path |
getSourcesPath() |
protected void |
writeClassToFile(com.squareup.javapoet.TypeSpec clazz,
String targetPackage) |
protected void |
writeJavaFile(com.squareup.javapoet.JavaFile javaFile) |
applyTemplates, getTemplateEngineprotected static final String VALUE_MEMBER
protected static final String NAME_MEMBER
protected final Path outputDir
protected final ConnectorModel connectorModel
protected final RestSdkRunConfiguration runConfiguration
public JavaTemplateEntity(Path outputDir, ConnectorModel connectorModel, RestSdkRunConfiguration runConfiguration)
protected void writeClassToFile(com.squareup.javapoet.TypeSpec clazz,
String targetPackage)
throws TemplatingException
TemplatingExceptionprotected com.squareup.javapoet.JavaFile.Builder getJavaFileBuilderForClass(com.squareup.javapoet.TypeSpec clazz,
String targetPackage)
protected void writeJavaFile(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)
protected com.squareup.javapoet.FieldSpec getConstantStringField(String fieldName, String value)
protected Class<?> getJavaType(ParameterDataType parameterDataType)
Copyright © 2020. All rights reserved.