public abstract class JavaGeneratingProcessor
extends javax.annotation.processing.AbstractProcessor
| Modifier and Type | Field and Description |
|---|---|
protected CodeGeneratorContext |
context |
| Constructor and Description |
|---|
JavaGeneratingProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
createFromStringTemplate(TypeDef model,
java.lang.String content)
Create a source file from the specified
TypeDef. |
<T> TypeDef |
createTypeFromTemplate(T model,
java.lang.String[] parameters,
java.lang.String content)
Generate a
TypeDef from the specified model, parameters and template. |
void |
generateFromResources(TypeDef model,
javax.tools.JavaFileObject fileObject,
java.lang.String resourceName)
Generates a source file from the specified
TypeDef. |
void |
generateFromResources(TypeDef model,
java.lang.String resourceName)
Generates a source file from the specified
TypeDef. |
<T> void |
generateFromStringTemplate(T model,
javax.tools.FileObject fileObject,
java.lang.String content)
Generates a source file from the specified
TypeDef. |
<T> void |
generateFromStringTemplate(T model,
java.lang.String[] parameters,
javax.tools.FileObject fileObject,
java.lang.String content)
Generates a source file from the specified
TypeDef. |
<T> void |
generateFromStringTemplate(T model,
java.lang.String[] parameters,
java.lang.String outputPath,
java.lang.String content)
Generates a source file from the specified
TypeDef. |
<T> void |
generateFromStringTemplate(T model,
java.lang.String outputPath,
java.lang.String content)
Generates a source file from the specified
TypeDef. |
void |
generateFromStringTemplate(TypeDef model,
java.lang.String content)
Generates a source file from the specified
TypeDef. |
void |
generateFromStringTemplate(TypeDef model,
java.lang.String[] parameters,
java.lang.String content)
Generates a source file from the specified
TypeDef. |
protected CodeGeneratorContext context
public void createFromStringTemplate(TypeDef model, java.lang.String content) throws java.io.IOException
TypeDef.model - The model of the class to generate.content - The template to use.java.io.IOException - If it fails to create the source file.public void generateFromResources(TypeDef model, java.lang.String resourceName) throws java.io.IOException
TypeDef.model - The model of the class to generate.resourceName - The template to use.java.io.IOException - If it fails to create the source file.public void generateFromResources(TypeDef model, javax.tools.JavaFileObject fileObject, java.lang.String resourceName) throws java.io.IOException
TypeDef.model - The model of the class to generate.fileObject - Where to save the generated class.resourceName - The template to use.java.io.IOException - If it fails to create the source file.public void generateFromStringTemplate(TypeDef model, java.lang.String content) throws java.io.IOException
TypeDef.model - The model of the class to generate.content - The template to use.java.io.IOException - If it fails to create the source file.public void generateFromStringTemplate(TypeDef model, java.lang.String[] parameters, java.lang.String content) throws java.io.IOException
TypeDef.model - The model of the class to generate.content - The template to use.java.io.IOException - If it fails to create the source file.public <T> void generateFromStringTemplate(T model,
javax.tools.FileObject fileObject,
java.lang.String content)
throws java.io.IOException
TypeDef.model - The model of the class to generate.fileObject - Where to save the generated class.content - The template to use.java.io.IOException - If it fails to create the source file.public <T> void generateFromStringTemplate(T model,
java.lang.String[] parameters,
javax.tools.FileObject fileObject,
java.lang.String content)
throws java.io.IOException
TypeDef.model - The model of the class to generate.parameters - The external parameters to pass to the template.fileObject - Where to save the generated class.content - The template to use.java.io.IOException - If it fails to create the source file.public <T> void generateFromStringTemplate(T model,
java.lang.String outputPath,
java.lang.String content)
throws java.io.IOException
TypeDef.model - The model of the class to generate.outputPath - Where to save the generated class.content - The template to use.java.io.IOException - If it fails to create the source file.public <T> void generateFromStringTemplate(T model,
java.lang.String[] parameters,
java.lang.String outputPath,
java.lang.String content)
throws java.io.IOException
TypeDef.model - The model of the class to generate.outputPath - Where to save the generated class.content - The template to use.java.io.IOException - If it fails to create the source file.Copyright © 2018. All Rights Reserved.