public class CastorBuilder
extends java.lang.Object
| Constructor and Description |
|---|
CastorBuilder() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args) |
void |
run(java.io.File schemaDir,
java.io.File primaryConfigFile,
java.util.List<java.lang.String> otherConfigFileNames,
java.util.List<java.io.File> includeDirs,
java.io.File javaOutputDir)
Runs the Castor code generator.
|
void |
run0(java.lang.String[] args,
java.lang.String configFileConcat)
Parses the arguments given to
main and then hands over control to method run. |
public static void main(java.lang.String[] args)
args - args[0]: xml config file (with path) complying to EntitybuilderSettings.xsd;
for the schemas that need code generation; args[1]: output directory under which the generated Java files will be put. args[2..n]: -I schemaIncludeDirectory (optional)public void run0(java.lang.String[] args,
java.lang.String configFileConcat)
throws BindingException,
java.io.FileNotFoundException
main and then hands over control to method run.args - as in mainconfigFileConcat - space-separated list of xsd binding config files for included schemas.BindingExceptionjava.io.FileNotFoundExceptionpublic void run(java.io.File schemaDir,
java.io.File primaryConfigFile,
java.util.List<java.lang.String> otherConfigFileNames,
java.util.List<java.io.File> includeDirs,
java.io.File javaOutputDir)
throws BindingException,
java.io.FileNotFoundException
schemaDir - (base) directory where the xsd files are, for which code will be generated.primaryConfigFile - config file for the schema code generation.
Currently must be in the directory schemaDir.otherConfigFileNames - Names without paths of schema code generation config files.
While primaryConfigFile must contain the information for the schemas to compile directly,
these config files have similar information for other schemas which are included by the "primary" schemas.
This data is needed to generate correct Java packages of already existing binding classes.includeDirs - directories from which other xsd files or config files should be included,
with preference to directories that appear first in case of multiple occurences of the same file.javaOutputDir - root directory under which the generated Java binding classes will be putBindingExceptionjava.io.FileNotFoundException