[jacli commit] r23 - in trunk/src/main/java/com/google/jacli: . compilers

1 view
Skip to first unread message

codesite...@google.com

unread,
Jul 9, 2008, 4:55:27 AM7/9/08
to fant...@googlegroups.com
Author: maomaode
Date: Wed Jul 9 01:55:01 2008
New Revision: 23

Modified:
trunk/src/main/java/com/google/jacli/CommandLine.java
trunk/src/main/java/com/google/jacli/Pattern.java
trunk/src/main/java/com/google/jacli/compilers/AbstractCompiler.java

Log:
* Fix the checks

--____________--

M src/main/java/com/google/jacli/CommandLine.java
M src/main/java/com/google/jacli/compilers/AbstractCompiler.java
M src/main/java/com/google/jacli/Pattern.java


Modified: trunk/src/main/java/com/google/jacli/CommandLine.java
==============================================================================
--- trunk/src/main/java/com/google/jacli/CommandLine.java (original)
+++ trunk/src/main/java/com/google/jacli/CommandLine.java Wed Jul 9
01:55:01 2008
@@ -11,12 +11,11 @@
private Pattern pattern;
private String prefix = CommandLineParser.DEFAULT_PREFIX;
private String shortPrefix = CommandLineParser.DEFAULT_SHORT_PREFIX;
+ private List<Exception> exceptions = new ArrayList<Exception>();

public CommandLine() {
setPattern(Pattern.SEQ);
}
-
- private List<Exception> exceptions = new ArrayList<Exception>();

public final Object getBean() {
return bean;
@@ -44,7 +43,7 @@

public void setPattern(Pattern s) {
this.pattern = s;
- Pattern.command = this;
+ Pattern.setCommandLine(this);
}

public Pattern getPattern() {

Modified: trunk/src/main/java/com/google/jacli/Pattern.java
==============================================================================
--- trunk/src/main/java/com/google/jacli/Pattern.java (original)
+++ trunk/src/main/java/com/google/jacli/Pattern.java Wed Jul 9
01:55:01 2008
@@ -27,10 +27,11 @@
compiler.compile(fieldList, target, args);
}
};
-
+
+ private static CommandLine command;
+
abstract void compile(final List<Field> fieldList, final Object
target, final String[] args);

- public static CommandLine command;

public String getPrefix() {
if (command != null) {
@@ -46,5 +47,9 @@
} else {
return CommandLineParser.DEFAULT_SHORT_PREFIX;
}
+ }
+
+ public static void setCommandLine(CommandLine c) {
+ command = c;
}
}

Modified: trunk/src/main/java/com/google/jacli/compilers/AbstractCompiler.java
==============================================================================
---
trunk/src/main/java/com/google/jacli/compilers/AbstractCompiler.java (original)
+++
trunk/src/main/java/com/google/jacli/compilers/AbstractCompiler.java
Wed Jul 9 01:55:01 2008
@@ -18,9 +18,9 @@
import com.google.jacli.CommandLine;

public abstract class AbstractCompiler {
+ protected CommandLine command;
private String prefix;
private String shortPrefix;
- protected CommandLine command;

public abstract void compile(final List<Field> fieldList, final
Object target, final String[] args);

Reply all
Reply to author
Forward
0 new messages