Package org.jibx.binding
Class Compile
- java.lang.Object
-
- org.jibx.binding.Compile
-
public class Compile extends java.lang.Object
Binding compiler. This version checks the modified and generated classes by loading them and listing method information.- Author:
- Dennis M. Sosnoski
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Compile.DirectLoader
Direct class loader.
-
Field Summary
Fields Modifier and Type Field Description private boolean
m_errorOverride
private boolean
m_load
private boolean
m_skipValidate
private boolean
m_trackBranches
private boolean
m_verbose1
private boolean
m_verbose2
private boolean
m_verify
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
compile(java.lang.String[] paths, java.lang.String[] files)
Compile a set of bindings using supplied classpaths.static void
main(java.lang.String[] args)
Main method for running compiler as application.void
setLoad(boolean load)
Set control flag for test loading generated/modified classes.void
setSkipValidate(boolean skip)
Set control flag for skipping binding validation.void
setVerbose(boolean verbose)
Set control flag for verbose processing reports.void
setVerify(boolean verify)
Set control flag for verifying generated/modified classes with BCEL.private boolean
verifyBCEL(ClassFile file)
Verify generated and modified files using BCEL verifier.
-
-
-
Constructor Detail
-
Compile
public Compile()
Default constructor. This just initializes all options disabled.
-
Compile
public Compile(boolean verbose1, boolean verbose2, boolean load, boolean verify, boolean track, boolean over)
Constructor with settings specified.- Parameters:
verbose1
- report binding details and resultsverbose2
- report second pass binding detailsload
- test load modified classes to validateverify
- use BCEL validation of modified classestrack
- keep tracking information for source of branch generationover
- override code generation error handling
-
-
Method Detail
-
verifyBCEL
private boolean verifyBCEL(ClassFile file)
Verify generated and modified files using BCEL verifier. This provides a more comprehensive listing of errors than just loading a class in the JVM.- Parameters:
file
- information for class to be verified- Returns:
true
if successfully verified,false
if problem found (automatically reported)
-
setLoad
public void setLoad(boolean load)
Set control flag for test loading generated/modified classes.- Parameters:
load
- test load generated/modified classes flag
-
setVerbose
public void setVerbose(boolean verbose)
Set control flag for verbose processing reports.- Parameters:
verbose
- report verbose information in processing bindings flag
-
setVerify
public void setVerify(boolean verify)
Set control flag for verifying generated/modified classes with BCEL.- Parameters:
verify
- use BCEL verification for generated/modified classes flag
-
setSkipValidate
public void setSkipValidate(boolean skip)
Set control flag for skipping binding validation. This flag is intended only for use while processing the binding model components within JiBX. Otherwise it'd be impossible to correct errors in the binding validation.- Parameters:
skip
- test load generated/modified classes flag
-
compile
public void compile(java.lang.String[] paths, java.lang.String[] files) throws JiBXException
Compile a set of bindings using supplied classpaths.- Parameters:
paths
- list of paths for loading classesfiles
- list of binding definition files- Throws:
JiBXException
- if error in processing the binding definition
-
main
public static void main(java.lang.String[] args)
Main method for running compiler as application.- Parameters:
args
- command line arguments
-
-