Package org.jibx.binding
Class Compile
- java.lang.Object
-
- org.jibx.binding.Compile
-
public class Compile extends java.lang.ObjectBinding 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 classCompile.DirectLoaderDirect class loader.
-
Field Summary
Fields Modifier and Type Field Description private booleanm_errorOverrideprivate booleanm_loadprivate booleanm_skipValidateprivate booleanm_trackBranchesprivate booleanm_verbose1private booleanm_verbose2private booleanm_verify
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompile(java.lang.String[] paths, java.lang.String[] files)Compile a set of bindings using supplied classpaths.static voidmain(java.lang.String[] args)Main method for running compiler as application.voidsetLoad(boolean load)Set control flag for test loading generated/modified classes.voidsetSkipValidate(boolean skip)Set control flag for skipping binding validation.voidsetVerbose(boolean verbose)Set control flag for verbose processing reports.voidsetVerify(boolean verify)Set control flag for verifying generated/modified classes with BCEL.private booleanverifyBCEL(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:
trueif successfully verified,falseif 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 JiBXExceptionCompile 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
-
-