[prev in list] [next in list] [prev in thread] [next in thread]
List: jibx-cvs
Subject: [Jibx-cvs] core/build/src/org/jibx/binding Compile.java, 1.11,
From: Dennis Sosnoski <dsosnoski () users ! sourceforge ! net>
Date: 2009-04-28 12:47:51
Message-ID: E1Lymj1-0003zH-UJ () fdv4jf1 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Update of /cvsroot/jibx/core/build/src/org/jibx/binding
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15291/src/org/jibx/binding
Modified Files:
Compile.java Loader.java
Log Message:
Pass second flag to binding code generation to control second pass printing.
Index: Loader.java
===================================================================
RCS file: /cvsroot/jibx/core/build/src/org/jibx/binding/Loader.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Loader.java 14 Jul 2008 21:11:59 -0000 1.5
--- Loader.java 28 Apr 2009 12:47:49 -0000 1.6
***************
*** 1,4 ****
/*
! Copyright (c) 2003-2008, Dennis M. Sosnoski.
All rights reserved.
--- 1,4 ----
/*
! Copyright (c) 2003-2009, Dennis M. Sosnoski.
All rights reserved.
***************
*** 248,252 ****
BindingDefinition binding =
(BindingDefinition)m_bindings.get(i);
! binding.generateCode(false);
}
--- 248,252 ----
BindingDefinition binding =
(BindingDefinition)m_bindings.get(i);
! binding.generateCode(false, false);
}
Index: Compile.java
===================================================================
RCS file: /cvsroot/jibx/core/build/src/org/jibx/binding/Compile.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Compile.java 4 Jul 2008 20:42:00 -0000 1.11
--- Compile.java 28 Apr 2009 12:47:49 -0000 1.12
***************
*** 1,4 ****
/*
! Copyright (c) 2003-2008, Dennis M. Sosnoski.
All rights reserved.
--- 1,4 ----
/*
! Copyright (c) 2003-2009, Dennis M. Sosnoski.
All rights reserved.
***************
*** 55,59 ****
public class Compile
{
! private boolean m_verbose;
private boolean m_load;
private boolean m_verify;
--- 55,60 ----
public class Compile
{
! private boolean m_verbose1;
! private boolean m_verbose2;
private boolean m_load;
private boolean m_verify;
***************
*** 71,75 ****
* Constructor with settings specified.
*
! * @param verbose report binding details and results
* @param load test load modified classes to validate
* @param verify use BCEL validation of modified classes
--- 72,77 ----
* Constructor with settings specified.
*
! * @param verbose1 report binding details and results
! * @param verbose2 report second pass binding details
* @param load test load modified classes to validate
* @param verify use BCEL validation of modified classes
***************
*** 77,83 ****
* @param over override code generation error handling
*/
! public Compile(boolean verbose, boolean load, boolean verify,
! boolean track, boolean over) {
! m_verbose = verbose;
m_load = load;
m_verify = verify;
--- 79,86 ----
* @param over override code generation error handling
*/
! public Compile(boolean verbose1, boolean verbose2, boolean load,
! boolean verify, boolean track, boolean over) {
! m_verbose1 = verbose1;
! m_verbose2 = verbose2;
m_load = load;
m_verify = verify;
***************
*** 157,161 ****
*/
public void setVerbose(boolean verbose) {
! m_verbose = verbose;
}
--- 160,164 ----
*/
public void setVerbose(boolean verbose) {
! m_verbose1 = verbose;
}
***************
*** 191,195 ****
// include current version information in verbose output
! if (m_verbose) {
System.out.println("Running binding compiler version " +
BindingDefinition.CURRENT_VERSION_NAME);
--- 194,198 ----
// include current version information in verbose output
! if (m_verbose1) {
System.out.println("Running binding compiler version " +
BindingDefinition.CURRENT_VERSION_NAME);
***************
*** 211,215 ****
for (int i = 0; i < files.length; i++) {
defs[i] = Utility.loadFileBinding(files[i], !m_skipValidate);
! if (m_verbose) {
defs[i].print();
}
--- 214,218 ----
for (int i = 0; i < files.length; i++) {
defs[i] = Utility.loadFileBinding(files[i], !m_skipValidate);
! if (m_verbose1) {
defs[i].print();
}
***************
*** 219,223 ****
for (int i = 0; i < defs.length; i++) {
try {
! defs[i].generateCode(m_verbose);
} catch (RuntimeException e) {
throw new JiBXException
--- 222,226 ----
for (int i = 0; i < defs.length; i++) {
try {
! defs[i].generateCode(m_verbose1, m_verbose2);
} catch (RuntimeException e) {
throw new JiBXException
***************
*** 241,248 ****
ClassFile[] adds = lists[0];
int addcount = adds.length;
! if (m_verbose) {
System.out.println("\nWrote " + addcount + " files");
}
! if (m_verbose || m_load) {
// generate class paths as URLs if needed for test loading
--- 244,251 ----
ClassFile[] adds = lists[0];
int addcount = adds.length;
! if (m_verbose1) {
System.out.println("\nWrote " + addcount + " files");
}
! if (m_verbose1 || m_load) {
// generate class paths as URLs if needed for test loading
***************
*** 261,265 ****
file.writeFile(bos);
byte[] bytes = bos.toByteArray();
! if(m_verbose){
System.out.println("\n " + file.getName() +
" output file size is " + bytes.length + " bytes");
--- 264,268 ----
file.writeFile(bos);
byte[] bytes = bos.toByteArray();
! if(m_verbose1){
System.out.println("\n " + file.getName() +
" output file size is " + bytes.length + " bytes");
***************
*** 275,279 ****
DirectLoader cloader = new DirectLoader(urls);
Class clas = cloader.load(file.getName(), bytes);
! if (m_verbose) {
java.lang.reflect.Method[] methods =
clas.getDeclaredMethods();
--- 278,282 ----
DirectLoader cloader = new DirectLoader(urls);
Class clas = cloader.load(file.getName(), bytes);
! if (m_verbose1) {
java.lang.reflect.Method[] methods =
clas.getDeclaredMethods();
***************
*** 292,296 ****
// report summary information for files unchanged or deleted
! if (m_verbose) {
ClassFile[] keeps = lists[1];
System.out.println("\nKept " + keeps.length + " files unchanged:");
--- 295,299 ----
// report summary information for files unchanged or deleted
! if (m_verbose1) {
ClassFile[] keeps = lists[1];
System.out.println("\nKept " + keeps.length + " files unchanged:");
***************
*** 325,329 ****
// check for various flags set
! boolean verbose = false;
boolean load = false;
boolean verify = false;
--- 328,333 ----
// check for various flags set
! boolean verbose1 = false;
! boolean verbose2 = false;
boolean load = false;
boolean verify = false;
***************
*** 335,339 ****
String arg = args[offset];
if ("-v".equalsIgnoreCase(arg)) {
! verbose = true;
} else if ("-l".equalsIgnoreCase(arg)) {
load = true;
--- 339,347 ----
String arg = args[offset];
if ("-v".equalsIgnoreCase(arg)) {
! if (verbose1) {
! verbose2 = true;
! } else {
! verbose1 = true;
! }
} else if ("-l".equalsIgnoreCase(arg)) {
load = true;
***************
*** 357,361 ****
// report on the configuration
! if (verbose) {
System.out.println("Using paths:");
for (int i = 0; i < clsspths.length; i++) {
--- 365,369 ----
// report on the configuration
! if (verbose1) {
System.out.println("Using paths:");
for (int i = 0; i < clsspths.length; i++) {
***************
*** 370,374 ****
// compile the bindings
Compile compiler =
! new Compile(verbose, load, verify, track, over);
compiler.setSkipValidate(skip);
compiler.compile(clsspths, bindings);
--- 378,382 ----
// compile the bindings
Compile compiler =
! new Compile(verbose1, verbose2, load, verify, track, over);
compiler.setSkipValidate(skip);
compiler.compile(clsspths, bindings);
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Jibx-cvs mailing list
Jibx-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic