public class EJC extends Object
ClassModelCompiler
- parse a edi-mapping-file a creates a ClassModel
.BeanWriter
- generates javaimplementation from ClassModel
.BindingWriter
- generates a bindingfile from ClassModel
.Modifier and Type | Field and Description |
---|---|
static String |
BINDINGCONFIG_XML |
static String |
EDIMAPPINGCONFIG_XML |
Constructor and Description |
---|
EJC() |
Modifier and Type | Method and Description |
---|---|
void |
addEDIMessageAnnotation(boolean addEDIMessageAnnotation)
Add the
EDIMessage annotation to the
root class of the generated model. |
ClassModel |
compile(Edimap mappingModel,
String beanPackage,
String beanFolder)
Compiles a edi-mapping-configuration and generates java implementation and
bindingfile.
|
ClassModel |
compile(Edimap mappingModel,
String beanPackage,
String beanFolder,
Map<MappingNode,JClass> commonTypes)
Compiles a edi-mapping-configuration and generates java implementation and
bindingfile.
|
ClassModel |
compile(InputStream mappingModel,
String beanPackage)
Compiles a edi-mapping-configuration and generates java implementation and
bindingfile.
|
void |
compile(InputStream mappingModel,
String beanPackage,
String beanFolder)
Compiles a edi-mapping-configuration and generates java implementation and
bindingfile.
|
void |
compile(InputStream mappingModel,
String configName,
String beanPackage,
String beanFolder)
Deprecated.
|
EJC |
include(String includePackage) |
static void |
main(String[] args)
The main method parsing in-parameters and invoking the compile method.
|
void |
writeModelToFolder(ClassModel model,
InputStream mappingModel,
String beanFolder,
String bindingFile) |
public static final String BINDINGCONFIG_XML
public static final String EDIMAPPINGCONFIG_XML
public void addEDIMessageAnnotation(boolean addEDIMessageAnnotation)
EDIMessage
annotation to the
root class of the generated model.addEDIMessageAnnotation
- True if the annotation is to
be added, otherwise false.public void compile(InputStream mappingModel, String configName, String beanPackage, String beanFolder) throws EDIConfigurationException, IOException, SAXException, IllegalNameException, ClassNotFoundException
compile(java.io.InputStream, String, String)
.ClassModelCompiler
- parse a edi-mapping-file a creates a ClassModel
.
2. BeanWriter
- generates javaimplementation from ClassModel
.
3. BindingWriter
- generates a bindingfile from ClassModel
.mappingModel
- the edi-mapping-configuration.configName
- the name of the edi-mapping-config.beanPackage
- the package name of generated java classes.beanFolder
- the folder to place the generated java classes.EDIConfigurationException
- When edi-mapping-configuration is badly formatted.IOException
- When unable to read edi-mapping-configuration.SAXException
- When edi-mapping-configuration is badly formatted.IllegalNameException
- when name of java-classes is illegal.ClassNotFoundException
- when error occurs while creating bindingfile.public void compile(InputStream mappingModel, String beanPackage, String beanFolder) throws EDIConfigurationException, IOException, SAXException, IllegalNameException, ClassNotFoundException
ClassModelCompiler
- parse a edi-mapping-file a creates a ClassModel
.
2. BeanWriter
- generates javaimplementation from ClassModel
.
3. BindingWriter
- generates a bindingfile from ClassModel
.mappingModel
- the edi-mapping-configuration.beanPackage
- the package name of generated java classes.beanFolder
- the folder to place the generated java classes.EDIConfigurationException
- When edi-mapping-configuration is badly formatted.IOException
- When unable to read edi-mapping-configuration.SAXException
- When edi-mapping-configuration is badly formatted.IllegalNameException
- when name of java-classes is illegal.ClassNotFoundException
- when error occurs while creating bindingfile.public ClassModel compile(Edimap mappingModel, String beanPackage, String beanFolder) throws EDIConfigurationException, IOException, SAXException, IllegalNameException, ClassNotFoundException
ClassModelCompiler
- parse a edi-mapping-file a creates a ClassModel
.
2. BeanWriter
- generates javaimplementation from ClassModel
.
3. BindingWriter
- generates a bindingfile from ClassModel
.mappingModel
- the edi-mapping-configuration.beanPackage
- the package name of generated java classes.beanFolder
- the folder to place the generated java classes.EDIConfigurationException
- When edi-mapping-configuration is badly formatted.IOException
- When unable to read edi-mapping-configuration.SAXException
- When edi-mapping-configuration is badly formatted.IllegalNameException
- when name of java-classes is illegal.ClassNotFoundException
- when error occurs while creating bindingfile.public ClassModel compile(Edimap mappingModel, String beanPackage, String beanFolder, Map<MappingNode,JClass> commonTypes) throws EDIConfigurationException, IOException, IllegalNameException, ClassNotFoundException
ClassModelCompiler
- parse a edi-mapping-file a creates a ClassModel
.
2. BeanWriter
- generates javaimplementation from ClassModel
.
3. BindingWriter
- generates a bindingfile from ClassModel
.mappingModel
- the edi-mapping-configuration.beanPackage
- the package name of generated java classes.beanFolder
- the folder to place the generated java classes.EDIConfigurationException
- When edi-mapping-configuration is badly formatted.IOException
- When unable to read edi-mapping-configuration.IllegalNameException
- when name of java-classes is illegal.ClassNotFoundException
- when error occurs while creating bindingfile.public ClassModel compile(InputStream mappingModel, String beanPackage) throws EDIConfigurationException, IOException, SAXException, IllegalNameException
ClassModelCompiler
- parse a edi-mapping-file a creates a ClassModel
.
2. BeanWriter
- generates javaimplementation from ClassModel
.
3. BindingWriter
- generates a bindingfile from ClassModel
.mappingModel
- the edi-mapping-configuration.beanPackage
- the package name of generated java classes.EDIConfigurationException
- When edi-mapping-configuration is badly formatted.IOException
- When unable to read edi-mapping-configuration.SAXException
- When edi-mapping-configuration is badly formatted.IllegalNameException
- when name of java-classes is illegal.public void writeModelToFolder(ClassModel model, InputStream mappingModel, String beanFolder, String bindingFile) throws IOException, IllegalNameException, ClassNotFoundException
public static void main(String[] args) throws IOException, EDIConfigurationException, IllegalNameException, SAXException, ClassNotFoundException
args
- the argumentsEDIConfigurationException
- when error occurs while reading ediConfiguration.IllegalNameException
- when xmltag in edi-configuration has a conconflict with reserved java keywords.IOException
- when error ocurcurs when reading or writing files.SAXException
- when error occurs while reading ediConfiguration.ClassNotFoundException
Copyright © 2020. All rights reserved.