public interface SrcGenService
| Modifier and Type | Field and Description |
|---|---|
static Path |
CLASSES_PATH
The virtual path for the generated classes in the source code generation
process.
|
static Path |
DATA_PATH
The virtual path for the data in the source code generation process.
|
static Path |
RESOURCE_PATH
The virtual path for the generated resources in the source code
generation process.
|
static Path |
SOURCES_PATH
The virtual path for the the java sources in the code generation process.
|
static Path |
SUPL_PATH
The virtual path for the suplementary data in the source code generation
process.
|
static Path |
TEMPLATES_PATH
The virtual path for the templates in the source code generation process.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createClass(String clsFullName,
String tplPath,
Object data)
Create a class with the given data and the given template.
|
void |
createResource(String resourcePath,
String tplPath,
Object data)
Creates a new resource with the given data and the given template.
|
<T> Map<T,VFile> |
findData(Class<T> cls)
Finds the data by the given class, this method will read the data from
the default virtual path in the VFS tree and parse all the files that
have the content of the given class.
|
com.github.javaparser.ast.CompilationUnit |
findJavaClass(String name)
Finds a java class by its full name and parsed it, from the sources
folder.
|
List<com.github.javaparser.ast.CompilationUnit> |
findJavaClasses(Predicate<com.github.javaparser.ast.CompilationUnit> predicate)
Finds all classes by the given predicate.
|
<T> List<T> |
findSuplData(Class<T> cls)
Finds the supplementary data by the given class, this method will read the
data from the default virtual path in the VFS tree and parse all the
files that have the content of the given class.
|
com.github.javaparser.ast.CompilationUnit |
parseJavaClass(VFile clsFile)
Parses the java code from the given file.
|
<T> T |
readFile(VFile file,
Class<T> cls)
Reads the given xml file.
|
static final Path DATA_PATH
static final Path SUPL_PATH
static final Path RESOURCE_PATH
static final Path SOURCES_PATH
static final Path CLASSES_PATH
static final Path TEMPLATES_PATH
com.github.javaparser.ast.CompilationUnit findJavaClass(String name)
name - The name of the java class.List<com.github.javaparser.ast.CompilationUnit> findJavaClasses(Predicate<com.github.javaparser.ast.CompilationUnit> predicate)
predicate - The predicate to test the classes.com.github.javaparser.ast.CompilationUnit parseJavaClass(VFile clsFile)
clsFile - The file to parse.<T> Map<T,VFile> findData(Class<T> cls) throws IOException
T - The type of the data to read.cls - The class of the data to read.IOException - If any IO exception occurs.<T> T readFile(VFile file, Class<T> cls) throws IOException
T - The type of the data to read.file - The file to read.cls - The class of the data to read.IOException - If any IO exception occurs.<T> List<T> findSuplData(Class<T> cls) throws IOException
T - The type of the data to read.cls - The class of the data to read.IOException - If any IO exception occurs.void createClass(String clsFullName, String tplPath, Object data) throws IOException
clsFullName - The full name of the class to create.tplPath - The path of the template to use to create the class.data - The data to use by the template to create the class.IOException - If any IO exception occurs.void createResource(String resourcePath, String tplPath, Object data) throws IOException
resourcePath - The path and name of the resource file to create.tplPath - The path of the template to use to create the class.data - The data to use by the template to create the class.IOException - If any IO exception occurs.Copyright © 2015–2019 Bridje Framework. All rights reserved.