提交 7047ec9f 编写于 作者: N nloodin

7029383: Refresh of non-client demos

Reviewed-by: mchung, ohair
上级 cbcf28a8
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.request.*;
public class AccessWatchpointSpec extends WatchpointSpec { public class AccessWatchpointSpec extends WatchpointSpec {
...@@ -38,6 +37,7 @@ public class AccessWatchpointSpec extends WatchpointSpec { ...@@ -38,6 +37,7 @@ public class AccessWatchpointSpec extends WatchpointSpec {
/** /**
* The 'refType' is known to match. * The 'refType' is known to match.
*/ */
@Override
void resolve(ReferenceType refType) throws InvalidTypeException, void resolve(ReferenceType refType) throws InvalidTypeException,
NoSuchFieldException { NoSuchFieldException {
if (!(refType instanceof ClassType)) { if (!(refType instanceof ClassType)) {
...@@ -51,6 +51,7 @@ public class AccessWatchpointSpec extends WatchpointSpec { ...@@ -51,6 +51,7 @@ public class AccessWatchpointSpec extends WatchpointSpec {
.createAccessWatchpointRequest(field)); .createAccessWatchpointRequest(field));
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
return (obj instanceof AccessWatchpointSpec) && super.equals(obj); return (obj instanceof AccessWatchpointSpec) && super.equals(obj);
} }
......
...@@ -27,6 +27,9 @@ package com.sun.tools.example.debug.bdi; ...@@ -27,6 +27,9 @@ package com.sun.tools.example.debug.bdi;
public class AmbiguousMethodException extends Exception public class AmbiguousMethodException extends Exception
{ {
private static final long serialVersionUID = 7793370943251707514L;
public AmbiguousMethodException() public AmbiguousMethodException()
{ {
super(); super();
......
...@@ -25,30 +25,33 @@ ...@@ -25,30 +25,33 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.request.*;
public abstract class BreakpointSpec extends EventRequestSpec { public abstract class BreakpointSpec extends EventRequestSpec {
BreakpointSpec(EventRequestSpecList specs, ReferenceTypeSpec refSpec) { BreakpointSpec(EventRequestSpecList specs, ReferenceTypeSpec refSpec) {
super(specs, refSpec); super(specs, refSpec);
} }
@Override
void notifySet(SpecListener listener, SpecEvent evt) { void notifySet(SpecListener listener, SpecEvent evt) {
listener.breakpointSet(evt); listener.breakpointSet(evt);
} }
@Override
void notifyDeferred(SpecListener listener, SpecEvent evt) { void notifyDeferred(SpecListener listener, SpecEvent evt) {
listener.breakpointDeferred(evt); listener.breakpointDeferred(evt);
} }
@Override
void notifyResolved(SpecListener listener, SpecEvent evt) { void notifyResolved(SpecListener listener, SpecEvent evt) {
listener.breakpointResolved(evt); listener.breakpointResolved(evt);
} }
@Override
void notifyDeleted(SpecListener listener, SpecEvent evt) { void notifyDeleted(SpecListener listener, SpecEvent evt) {
listener.breakpointDeleted(evt); listener.breakpointDeleted(evt);
} }
@Override
void notifyError(SpecListener listener, SpecErrorEvent evt) { void notifyError(SpecListener listener, SpecErrorEvent evt) {
listener.breakpointError(evt); listener.breakpointError(evt);
} }
......
...@@ -43,10 +43,6 @@ class ChildSession extends Session { ...@@ -43,10 +43,6 @@ class ChildSession extends Session {
private BufferedReader out; private BufferedReader out;
private BufferedReader err; private BufferedReader err;
private InputWriter inputWriter;
private OutputReader outputReader;
private OutputReader errorReader;
private InputListener input; private InputListener input;
private OutputListener output; private OutputListener output;
private OutputListener error; private OutputListener error;
...@@ -84,6 +80,7 @@ class ChildSession extends Session { ...@@ -84,6 +80,7 @@ class ChildSession extends Session {
this.error = error; this.error = error;
} }
@Override
public boolean attach() { public boolean attach() {
if (!connectToVMProcess()) { if (!connectToVMProcess()) {
...@@ -131,6 +128,7 @@ class ChildSession extends Session { ...@@ -131,6 +128,7 @@ class ChildSession extends Session {
return true; return true;
} }
@Override
public void detach() { public void detach() {
//### debug //### debug
...@@ -242,10 +240,7 @@ class ChildSession extends Session { ...@@ -242,10 +240,7 @@ class ChildSession extends Session {
this.diagnostics = diagnostics; this.diagnostics = diagnostics;
} }
public void quit() { @Override
running = false;
}
public void run() { public void run() {
try { try {
int count; int count;
...@@ -254,6 +249,7 @@ class ChildSession extends Session { ...@@ -254,6 +249,7 @@ class ChildSession extends Session {
// Run in Swing event dispatcher thread. // Run in Swing event dispatcher thread.
final String chars = new String(buffer, 0, count); final String chars = new String(buffer, 0, count);
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() { public void run() {
output.putString(chars); output.putString(chars);
} }
...@@ -264,6 +260,7 @@ class ChildSession extends Session { ...@@ -264,6 +260,7 @@ class ChildSession extends Session {
} catch (IOException e) { } catch (IOException e) {
// Run in Swing event dispatcher thread. // Run in Swing event dispatcher thread.
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() { public void run() {
diagnostics.putString("IO error reading " + diagnostics.putString("IO error reading " +
streamName + streamName +
...@@ -288,11 +285,7 @@ class ChildSession extends Session { ...@@ -288,11 +285,7 @@ class ChildSession extends Session {
this.input = input; this.input = input;
} }
public void quit() { @Override
//### Won't have much effect if blocked on input!
running = false;
}
public void run() { public void run() {
String line; String line;
while (running) { while (running) {
......
...@@ -25,4 +25,7 @@ ...@@ -25,4 +25,7 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
public class EvaluationException extends Exception {} public class EvaluationException extends Exception {
private static final long serialVersionUID = 4947109680354951694L;
}
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import java.util.*;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.request.EventRequest; import com.sun.jdi.request.EventRequest;
......
...@@ -26,11 +26,6 @@ ...@@ -26,11 +26,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.ReferenceType; import com.sun.jdi.ReferenceType;
import com.sun.jdi.request.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Iterator;
public class ExceptionSpec extends EventRequestSpec { public class ExceptionSpec extends EventRequestSpec {
...@@ -45,22 +40,27 @@ public class ExceptionSpec extends EventRequestSpec { ...@@ -45,22 +40,27 @@ public class ExceptionSpec extends EventRequestSpec {
this.notifyUncaught = notifyUncaught; this.notifyUncaught = notifyUncaught;
} }
@Override
void notifySet(SpecListener listener, SpecEvent evt) { void notifySet(SpecListener listener, SpecEvent evt) {
listener.exceptionInterceptSet(evt); listener.exceptionInterceptSet(evt);
} }
@Override
void notifyDeferred(SpecListener listener, SpecEvent evt) { void notifyDeferred(SpecListener listener, SpecEvent evt) {
listener.exceptionInterceptDeferred(evt); listener.exceptionInterceptDeferred(evt);
} }
@Override
void notifyResolved(SpecListener listener, SpecEvent evt) { void notifyResolved(SpecListener listener, SpecEvent evt) {
listener.exceptionInterceptResolved(evt); listener.exceptionInterceptResolved(evt);
} }
@Override
void notifyDeleted(SpecListener listener, SpecEvent evt) { void notifyDeleted(SpecListener listener, SpecEvent evt) {
listener.exceptionInterceptDeleted(evt); listener.exceptionInterceptDeleted(evt);
} }
@Override
void notifyError(SpecListener listener, SpecErrorEvent evt) { void notifyError(SpecListener listener, SpecErrorEvent evt) {
listener.exceptionInterceptError(evt); listener.exceptionInterceptError(evt);
} }
...@@ -68,16 +68,19 @@ public class ExceptionSpec extends EventRequestSpec { ...@@ -68,16 +68,19 @@ public class ExceptionSpec extends EventRequestSpec {
/** /**
* The 'refType' is known to match. * The 'refType' is known to match.
*/ */
@Override
void resolve(ReferenceType refType) { void resolve(ReferenceType refType) {
setRequest(refType.virtualMachine().eventRequestManager() setRequest(refType.virtualMachine().eventRequestManager()
.createExceptionRequest(refType, .createExceptionRequest(refType,
notifyCaught, notifyUncaught)); notifyCaught, notifyUncaught));
} }
@Override
public int hashCode() { public int hashCode() {
return refSpec.hashCode(); return refSpec.hashCode();
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof ExceptionSpec) { if (obj instanceof ExceptionSpec) {
ExceptionSpec es = (ExceptionSpec)obj; ExceptionSpec es = (ExceptionSpec)obj;
...@@ -88,6 +91,7 @@ public class ExceptionSpec extends EventRequestSpec { ...@@ -88,6 +91,7 @@ public class ExceptionSpec extends EventRequestSpec {
} }
} }
@Override
public String toString() { public String toString() {
StringBuffer buffer = new StringBuffer("exception catch "); StringBuffer buffer = new StringBuffer("exception catch ");
buffer.append(refSpec.toString()); buffer.append(refSpec.toString());
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.event.*;
import com.sun.jdi.request.*; import com.sun.jdi.request.*;
import com.sun.jdi.connect.*; import com.sun.jdi.connect.*;
import com.sun.tools.example.debug.expr.ExpressionParser; import com.sun.tools.example.debug.expr.ExpressionParser;
...@@ -56,7 +55,7 @@ public class ExecutionManager { ...@@ -56,7 +55,7 @@ public class ExecutionManager {
// Session Listeners // Session Listeners
Vector<SessionListener> sessionListeners = new Vector<SessionListener>(); ArrayList<SessionListener> sessionListeners = new ArrayList<SessionListener>();
public void addSessionListener(SessionListener listener) { public void addSessionListener(SessionListener listener) {
sessionListeners.add(listener); sessionListeners.add(listener);
...@@ -68,7 +67,7 @@ public class ExecutionManager { ...@@ -68,7 +67,7 @@ public class ExecutionManager {
// Spec Listeners // Spec Listeners
Vector<SpecListener> specListeners = new Vector<SpecListener>(); ArrayList<SpecListener> specListeners = new ArrayList<SpecListener>();
public void addSpecListener(SpecListener cl) { public void addSpecListener(SpecListener cl) {
specListeners.add(cl); specListeners.add(cl);
...@@ -80,7 +79,7 @@ public class ExecutionManager { ...@@ -80,7 +79,7 @@ public class ExecutionManager {
// JDI Listeners // JDI Listeners
Vector<JDIListener> jdiListeners = new Vector<JDIListener>(); ArrayList<JDIListener> jdiListeners = new ArrayList<JDIListener>();
/** /**
* Adds a JDIListener * Adds a JDIListener
...@@ -105,50 +104,50 @@ public class ExecutionManager { ...@@ -105,50 +104,50 @@ public class ExecutionManager {
// App Echo Listeners // App Echo Listeners
private Vector<OutputListener> appEchoListeners = new Vector<OutputListener>(); private ArrayList<OutputListener> appEchoListeners = new ArrayList<OutputListener>();
public void addApplicationEchoListener(OutputListener l) { public void addApplicationEchoListener(OutputListener l) {
appEchoListeners.addElement(l); appEchoListeners.add(l);
} }
public void removeApplicationEchoListener(OutputListener l) { public void removeApplicationEchoListener(OutputListener l) {
appEchoListeners.removeElement(l); appEchoListeners.remove(l);
} }
// App Output Listeners // App Output Listeners
private Vector<OutputListener> appOutputListeners = new Vector<OutputListener>(); private ArrayList<OutputListener> appOutputListeners = new ArrayList<OutputListener>();
public void addApplicationOutputListener(OutputListener l) { public void addApplicationOutputListener(OutputListener l) {
appOutputListeners.addElement(l); appOutputListeners.add(l);
} }
public void removeApplicationOutputListener(OutputListener l) { public void removeApplicationOutputListener(OutputListener l) {
appOutputListeners.removeElement(l); appOutputListeners.remove(l);
} }
// App Error Listeners // App Error Listeners
private Vector<OutputListener> appErrorListeners = new Vector<OutputListener>(); private ArrayList<OutputListener> appErrorListeners = new ArrayList<OutputListener>();
public void addApplicationErrorListener(OutputListener l) { public void addApplicationErrorListener(OutputListener l) {
appErrorListeners.addElement(l); appErrorListeners.add(l);
} }
public void removeApplicationErrorListener(OutputListener l) { public void removeApplicationErrorListener(OutputListener l) {
appErrorListeners.removeElement(l); appErrorListeners.remove(l);
} }
// Diagnostic Listeners // Diagnostic Listeners
private Vector<OutputListener> diagnosticsListeners = new Vector<OutputListener>(); private ArrayList<OutputListener> diagnosticsListeners = new ArrayList<OutputListener>();
public void addDiagnosticsListener(OutputListener l) { public void addDiagnosticsListener(OutputListener l) {
diagnosticsListeners.addElement(l); diagnosticsListeners.add(l);
} }
public void removeDiagnosticsListener(OutputListener l) { public void removeDiagnosticsListener(OutputListener l) {
diagnosticsListeners.removeElement(l); diagnosticsListeners.remove(l);
} }
/////////// End Listener Registration ////////////// /////////// End Listener Registration //////////////
...@@ -159,7 +158,9 @@ public class ExecutionManager { ...@@ -159,7 +158,9 @@ public class ExecutionManager {
} }
void ensureActiveSession() throws NoSessionException { void ensureActiveSession() throws NoSessionException {
if (session == null) throw new NoSessionException(); if (session == null) {
throw new NoSessionException();
}
} }
public EventRequestManager eventRequestManager() { public EventRequestManager eventRequestManager() {
...@@ -293,6 +294,7 @@ public class ExecutionManager { ...@@ -293,6 +294,7 @@ public class ExecutionManager {
ensureActiveSession(); ensureActiveSession();
if (f != null) { if (f != null) {
frameGetter = new ExpressionParser.GetFrame() { frameGetter = new ExpressionParser.GetFrame() {
@Override
public StackFrame get() /* throws IncompatibleThreadStateException */ { public StackFrame get() /* throws IncompatibleThreadStateException */ {
return f; return f;
} }
...@@ -628,35 +630,35 @@ public class ExecutionManager { ...@@ -628,35 +630,35 @@ public class ExecutionManager {
*/ */
private void notifyInterrupted() { private void notifyInterrupted() {
Vector l = (Vector)sessionListeners.clone(); ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
EventObject evt = new EventObject(this); EventObject evt = new EventObject(this);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((SessionListener)l.elementAt(i)).sessionInterrupt(evt); l.get(i).sessionInterrupt(evt);
} }
} }
private void notifyContinued() { private void notifyContinued() {
Vector l = (Vector)sessionListeners.clone(); ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
EventObject evt = new EventObject(this); EventObject evt = new EventObject(this);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((SessionListener)l.elementAt(i)).sessionContinue(evt); l.get(i).sessionContinue(evt);
} }
} }
private void notifySessionStart() { private void notifySessionStart() {
Vector l = (Vector)sessionListeners.clone(); ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
EventObject evt = new EventObject(this); EventObject evt = new EventObject(this);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((SessionListener)l.elementAt(i)).sessionStart(evt); l.get(i).sessionStart(evt);
} }
} }
private void notifySessionDeath() { private void notifySessionDeath() {
/*** noop for now /*** noop for now
Vector l = (Vector)sessionListeners.clone(); ArrayList<SessionListener> l = new ArrayList<SessionListener>(sessionListeners);
EventObject evt = new EventObject(this); EventObject evt = new EventObject(this);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((SessionListener)l.elementAt(i)).sessionDeath(evt); ((SessionListener)l.get(i)).sessionDeath(evt);
} }
****/ ****/
} }
...@@ -684,6 +686,7 @@ public class ExecutionManager { ...@@ -684,6 +686,7 @@ public class ExecutionManager {
} }
private InputListener appInput = new InputListener() { private InputListener appInput = new InputListener() {
@Override
public String getLine() { public String getLine() {
// Don't allow reader to be interrupted -- catch and retry. // Don't allow reader to be interrupted -- catch and retry.
String line = null; String line = null;
...@@ -703,6 +706,7 @@ public class ExecutionManager { ...@@ -703,6 +706,7 @@ public class ExecutionManager {
// Run in Swing event dispatcher thread. // Run in Swing event dispatcher thread.
final String input = line; final String input = line;
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() { public void run() {
echoInputLine(input); echoInputLine(input);
} }
...@@ -714,37 +718,40 @@ public class ExecutionManager { ...@@ -714,37 +718,40 @@ public class ExecutionManager {
private static String newline = System.getProperty("line.separator"); private static String newline = System.getProperty("line.separator");
private void echoInputLine(String line) { private void echoInputLine(String line) {
Vector l = (Vector)appEchoListeners.clone(); ArrayList<OutputListener> l = new ArrayList<OutputListener>(appEchoListeners);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
OutputListener ol = (OutputListener)l.elementAt(i); OutputListener ol = l.get(i);
ol.putString(line); ol.putString(line);
ol.putString(newline); ol.putString(newline);
} }
} }
private OutputListener appOutput = new OutputListener() { private OutputListener appOutput = new OutputListener() {
@Override
public void putString(String string) { public void putString(String string) {
Vector l = (Vector)appOutputListeners.clone(); ArrayList<OutputListener> l = new ArrayList<OutputListener>(appEchoListeners);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((OutputListener)l.elementAt(i)).putString(string); l.get(i).putString(string);
} }
} }
}; };
private OutputListener appError = new OutputListener() { private OutputListener appError = new OutputListener() {
@Override
public void putString(String string) { public void putString(String string) {
Vector l = (Vector)appErrorListeners.clone(); ArrayList<OutputListener> l = new ArrayList<OutputListener>(appEchoListeners);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((OutputListener)l.elementAt(i)).putString(string); l.get(i).putString(string);
} }
} }
}; };
private OutputListener diagnostics = new OutputListener() { private OutputListener diagnostics = new OutputListener() {
@Override
public void putString(String string) { public void putString(String string) {
Vector l = (Vector)diagnosticsListeners.clone(); ArrayList<OutputListener> l = new ArrayList<OutputListener>(diagnosticsListeners);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((OutputListener)l.elementAt(i)).putString(string); l.get(i).putString(string);
} }
} }
}; };
......
...@@ -25,4 +25,7 @@ ...@@ -25,4 +25,7 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
public class FrameIndexOutOfBoundsException extends IndexOutOfBoundsException {} public class FrameIndexOutOfBoundsException extends IndexOutOfBoundsException {
private static final long serialVersionUID = -4870148107027371437L;
}
...@@ -28,8 +28,6 @@ package com.sun.tools.example.debug.bdi; ...@@ -28,8 +28,6 @@ package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.event.*; import com.sun.jdi.event.*;
import java.util.*;
import com.sun.tools.example.debug.event.*; import com.sun.tools.example.debug.event.*;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
...@@ -55,6 +53,7 @@ class JDIEventSource extends Thread { ...@@ -55,6 +53,7 @@ class JDIEventSource extends Thread {
this.queue = session.vm.eventQueue(); this.queue = session.vm.eventQueue();
} }
@Override
public void run() { public void run() {
try { try {
runLoop(); runLoop();
...@@ -78,6 +77,7 @@ class JDIEventSource extends Thread { ...@@ -78,6 +77,7 @@ class JDIEventSource extends Thread {
//### Gross foul hackery! //### Gross foul hackery!
private void dispatchEventSet(final AbstractEventSet es) { private void dispatchEventSet(final AbstractEventSet es) {
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() { public void run() {
boolean interrupted = es.suspendedAll(); boolean interrupted = es.suspendedAll();
es.notify(firstListener); es.notify(firstListener);
...@@ -117,54 +117,65 @@ class JDIEventSource extends Thread { ...@@ -117,54 +117,65 @@ class JDIEventSource extends Thread {
//### This is a Hack, deal with it //### This is a Hack, deal with it
private class FirstListener implements JDIListener { private class FirstListener implements JDIListener {
@Override
public void accessWatchpoint(AccessWatchpointEventSet e) { public void accessWatchpoint(AccessWatchpointEventSet e) {
session.runtime.validateThreadInfo(); session.runtime.validateThreadInfo();
wantInterrupt = true; wantInterrupt = true;
} }
@Override
public void classPrepare(ClassPrepareEventSet e) { public void classPrepare(ClassPrepareEventSet e) {
wantInterrupt = false; wantInterrupt = false;
runtime.resolve(e.getReferenceType()); runtime.resolve(e.getReferenceType());
} }
@Override
public void classUnload(ClassUnloadEventSet e) { public void classUnload(ClassUnloadEventSet e) {
wantInterrupt = false; wantInterrupt = false;
} }
@Override
public void exception(ExceptionEventSet e) { public void exception(ExceptionEventSet e) {
wantInterrupt = true; wantInterrupt = true;
} }
@Override
public void locationTrigger(LocationTriggerEventSet e) { public void locationTrigger(LocationTriggerEventSet e) {
session.runtime.validateThreadInfo(); session.runtime.validateThreadInfo();
wantInterrupt = true; wantInterrupt = true;
} }
@Override
public void modificationWatchpoint(ModificationWatchpointEventSet e) { public void modificationWatchpoint(ModificationWatchpointEventSet e) {
session.runtime.validateThreadInfo(); session.runtime.validateThreadInfo();
wantInterrupt = true; wantInterrupt = true;
} }
@Override
public void threadDeath(ThreadDeathEventSet e) { public void threadDeath(ThreadDeathEventSet e) {
wantInterrupt = false; wantInterrupt = false;
} }
@Override
public void threadStart(ThreadStartEventSet e) { public void threadStart(ThreadStartEventSet e) {
wantInterrupt = false; wantInterrupt = false;
} }
@Override
public void vmDeath(VMDeathEventSet e) { public void vmDeath(VMDeathEventSet e) {
//### Should have some way to notify user //### Should have some way to notify user
//### that VM died before the session ended. //### that VM died before the session ended.
wantInterrupt = false; wantInterrupt = false;
} }
@Override
public void vmDisconnect(VMDisconnectEventSet e) { public void vmDisconnect(VMDisconnectEventSet e) {
//### Notify user? //### Notify user?
wantInterrupt = false; wantInterrupt = false;
session.runtime.endSession(); session.runtime.endSession();
} }
@Override
public void vmStart(VMStartEventSet e) { public void vmStart(VMStartEventSet e) {
//### Do we need to do anything with it? //### Do we need to do anything with it?
wantInterrupt = false; wantInterrupt = false;
......
...@@ -26,11 +26,7 @@ ...@@ -26,11 +26,7 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.request.*;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Iterator;
public class LineBreakpointSpec extends BreakpointSpec { public class LineBreakpointSpec extends BreakpointSpec {
int lineNumber; int lineNumber;
...@@ -44,6 +40,7 @@ public class LineBreakpointSpec extends BreakpointSpec { ...@@ -44,6 +40,7 @@ public class LineBreakpointSpec extends BreakpointSpec {
/** /**
* The 'refType' is known to match. * The 'refType' is known to match.
*/ */
@Override
void resolve(ReferenceType refType) throws InvalidTypeException, void resolve(ReferenceType refType) throws InvalidTypeException,
LineNotFoundException { LineNotFoundException {
if (!(refType instanceof ClassType)) { if (!(refType instanceof ClassType)) {
...@@ -81,10 +78,12 @@ public class LineBreakpointSpec extends BreakpointSpec { ...@@ -81,10 +78,12 @@ public class LineBreakpointSpec extends BreakpointSpec {
return lineNumber; return lineNumber;
} }
@Override
public int hashCode() { public int hashCode() {
return refSpec.hashCode() + lineNumber; return refSpec.hashCode() + lineNumber;
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof LineBreakpointSpec) { if (obj instanceof LineBreakpointSpec) {
LineBreakpointSpec breakpoint = (LineBreakpointSpec)obj; LineBreakpointSpec breakpoint = (LineBreakpointSpec)obj;
...@@ -96,6 +95,7 @@ public class LineBreakpointSpec extends BreakpointSpec { ...@@ -96,6 +95,7 @@ public class LineBreakpointSpec extends BreakpointSpec {
} }
} }
@Override
public String errorMessageFor(Exception e) { public String errorMessageFor(Exception e) {
if (e instanceof LineNotFoundException) { if (e instanceof LineNotFoundException) {
return ("No code at line " + lineNumber() + " in " + refSpec); return ("No code at line " + lineNumber() + " in " + refSpec);
...@@ -107,6 +107,7 @@ public class LineBreakpointSpec extends BreakpointSpec { ...@@ -107,6 +107,7 @@ public class LineBreakpointSpec extends BreakpointSpec {
} }
} }
@Override
public String toString() { public String toString() {
StringBuffer buffer = new StringBuffer("breakpoint "); StringBuffer buffer = new StringBuffer("breakpoint ");
buffer.append(refSpec.toString()); buffer.append(refSpec.toString());
......
...@@ -27,6 +27,9 @@ package com.sun.tools.example.debug.bdi; ...@@ -27,6 +27,9 @@ package com.sun.tools.example.debug.bdi;
public class LineNotFoundException extends Exception public class LineNotFoundException extends Exception
{ {
private static final long serialVersionUID = -5630418117861587582L;
public LineNotFoundException() public LineNotFoundException()
{ {
super(); super();
......
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
class MalformedMemberNameException extends Exception { class MalformedMemberNameException extends Exception {
private static final long serialVersionUID = -7726664097374844485L;
public MalformedMemberNameException() { public MalformedMemberNameException() {
super(); super();
} }
......
...@@ -26,11 +26,8 @@ ...@@ -26,11 +26,8 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.request.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Iterator;
public class MethodBreakpointSpec extends BreakpointSpec { public class MethodBreakpointSpec extends BreakpointSpec {
String methodId; String methodId;
...@@ -47,6 +44,7 @@ public class MethodBreakpointSpec extends BreakpointSpec { ...@@ -47,6 +44,7 @@ public class MethodBreakpointSpec extends BreakpointSpec {
/** /**
* The 'refType' is known to match. * The 'refType' is known to match.
*/ */
@Override
void resolve(ReferenceType refType) throws MalformedMemberNameException, void resolve(ReferenceType refType) throws MalformedMemberNameException,
AmbiguousMethodException, AmbiguousMethodException,
InvalidTypeException, InvalidTypeException,
...@@ -80,12 +78,14 @@ public class MethodBreakpointSpec extends BreakpointSpec { ...@@ -80,12 +78,14 @@ public class MethodBreakpointSpec extends BreakpointSpec {
return methodArgs; return methodArgs;
} }
@Override
public int hashCode() { public int hashCode() {
return refSpec.hashCode() + return refSpec.hashCode() +
((methodId != null) ? methodId.hashCode() : 0) + ((methodId != null) ? methodId.hashCode() : 0) +
((methodArgs != null) ? methodArgs.hashCode() : 0); ((methodArgs != null) ? methodArgs.hashCode() : 0);
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof MethodBreakpointSpec) { if (obj instanceof MethodBreakpointSpec) {
MethodBreakpointSpec breakpoint = (MethodBreakpointSpec)obj; MethodBreakpointSpec breakpoint = (MethodBreakpointSpec)obj;
...@@ -98,6 +98,7 @@ public class MethodBreakpointSpec extends BreakpointSpec { ...@@ -98,6 +98,7 @@ public class MethodBreakpointSpec extends BreakpointSpec {
} }
} }
@Override
public String errorMessageFor(Exception e) { public String errorMessageFor(Exception e) {
if (e instanceof AmbiguousMethodException) { if (e instanceof AmbiguousMethodException) {
return ("Method " + methodName() + " is overloaded; specify arguments"); return ("Method " + methodName() + " is overloaded; specify arguments");
...@@ -114,6 +115,7 @@ public class MethodBreakpointSpec extends BreakpointSpec { ...@@ -114,6 +115,7 @@ public class MethodBreakpointSpec extends BreakpointSpec {
} }
} }
@Override
public String toString() { public String toString() {
StringBuffer buffer = new StringBuffer("breakpoint "); StringBuffer buffer = new StringBuffer("breakpoint ");
buffer.append(refSpec.toString()); buffer.append(refSpec.toString());
...@@ -257,7 +259,7 @@ public class MethodBreakpointSpec extends BreakpointSpec { ...@@ -257,7 +259,7 @@ public class MethodBreakpointSpec extends BreakpointSpec {
*/ */
if ((name.indexOf('.') == -1) || name.startsWith("*.")) { if ((name.indexOf('.') == -1) || name.startsWith("*.")) {
try { try {
List refs = specs.runtime.findClassesMatchingPattern(name); List<?> refs = specs.runtime.findClassesMatchingPattern(name);
if (refs.size() > 0) { //### ambiguity??? if (refs.size() > 0) { //### ambiguity???
name = ((ReferenceType)(refs.get(0))).name(); name = ((ReferenceType)(refs.get(0))).name();
} }
......
...@@ -27,6 +27,8 @@ package com.sun.tools.example.debug.bdi; ...@@ -27,6 +27,8 @@ package com.sun.tools.example.debug.bdi;
public class MethodNotFoundException extends Exception public class MethodNotFoundException extends Exception
{ {
private static final long serialVersionUID = -2064968107599632609L;
public MethodNotFoundException() public MethodNotFoundException()
{ {
super(); super();
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.request.*;
public class ModificationWatchpointSpec extends WatchpointSpec { public class ModificationWatchpointSpec extends WatchpointSpec {
...@@ -38,6 +37,7 @@ public class ModificationWatchpointSpec extends WatchpointSpec { ...@@ -38,6 +37,7 @@ public class ModificationWatchpointSpec extends WatchpointSpec {
/** /**
* The 'refType' is known to match. * The 'refType' is known to match.
*/ */
@Override
void resolve(ReferenceType refType) throws InvalidTypeException, void resolve(ReferenceType refType) throws InvalidTypeException,
NoSuchFieldException { NoSuchFieldException {
if (!(refType instanceof ClassType)) { if (!(refType instanceof ClassType)) {
...@@ -51,6 +51,7 @@ public class ModificationWatchpointSpec extends WatchpointSpec { ...@@ -51,6 +51,7 @@ public class ModificationWatchpointSpec extends WatchpointSpec {
.createModificationWatchpointRequest(field)); .createModificationWatchpointRequest(field));
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
return (obj instanceof ModificationWatchpointSpec) && return (obj instanceof ModificationWatchpointSpec) &&
super.equals(obj); super.equals(obj);
......
...@@ -25,4 +25,7 @@ ...@@ -25,4 +25,7 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
public class NoSessionException extends Exception {} public class NoSessionException extends Exception {
private static final long serialVersionUID = -7324357828115128603L;
}
...@@ -25,4 +25,8 @@ ...@@ -25,4 +25,8 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
public class NoThreadException extends Exception {} public class NoThreadException extends Exception {
private static final long serialVersionUID = 1846613539928921998L;
}
...@@ -47,6 +47,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -47,6 +47,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec {
/** /**
* Does the specified ReferenceType match this spec. * Does the specified ReferenceType match this spec.
*/ */
@Override
public boolean matches(ReferenceType refType) { public boolean matches(ReferenceType refType) {
if (isWild) { if (isWild) {
return refType.name().endsWith(classId); return refType.name().endsWith(classId);
...@@ -55,10 +56,12 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -55,10 +56,12 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec {
} }
} }
@Override
public int hashCode() { public int hashCode() {
return classId.hashCode(); return classId.hashCode();
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof PatternReferenceTypeSpec) { if (obj instanceof PatternReferenceTypeSpec) {
PatternReferenceTypeSpec spec = (PatternReferenceTypeSpec)obj; PatternReferenceTypeSpec spec = (PatternReferenceTypeSpec)obj;
...@@ -89,6 +92,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -89,6 +92,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec {
} }
} }
@Override
public String toString() { public String toString() {
return isWild? "*" + classId : classId; return isWild? "*" + classId : classId;
} }
......
...@@ -33,7 +33,9 @@ interface ReferenceTypeSpec { ...@@ -33,7 +33,9 @@ interface ReferenceTypeSpec {
*/ */
boolean matches(ReferenceType refType); boolean matches(ReferenceType refType);
@Override
int hashCode(); int hashCode();
@Override
boolean equals(Object obj); boolean equals(Object obj);
} }
...@@ -27,7 +27,6 @@ package com.sun.tools.example.debug.bdi; ...@@ -27,7 +27,6 @@ package com.sun.tools.example.debug.bdi;
import com.sun.jdi.VirtualMachine; import com.sun.jdi.VirtualMachine;
import com.sun.jdi.VMDisconnectedException; import com.sun.jdi.VMDisconnectedException;
import com.sun.jdi.event.EventSet;
/** /**
* Our repository of what we know about the state of one * Our repository of what we know about the state of one
......
...@@ -39,6 +39,7 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -39,6 +39,7 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec {
/** /**
* Does the specified ReferenceType match this spec. * Does the specified ReferenceType match this spec.
*/ */
@Override
public boolean matches(ReferenceType refType) { public boolean matches(ReferenceType refType) {
try { try {
if (refType.sourceName().equals(sourceName)) { if (refType.sourceName().equals(sourceName)) {
...@@ -48,9 +49,6 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -48,9 +49,6 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec {
return true; return true;
} catch(AbsentInformationException exc) { } catch(AbsentInformationException exc) {
} catch(ObjectCollectedException exc) { } catch(ObjectCollectedException exc) {
} catch(InvalidLineNumberException exc) {
// } catch(ClassNotPreparedException exc) {
// -- should not happen, so don't catch this ---
} }
} }
} catch(AbsentInformationException exc) { } catch(AbsentInformationException exc) {
...@@ -59,10 +57,12 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -59,10 +57,12 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec {
return false; return false;
} }
@Override
public int hashCode() { public int hashCode() {
return sourceName.hashCode() + linenumber; return sourceName.hashCode() + linenumber;
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof SourceNameReferenceTypeSpec) { if (obj instanceof SourceNameReferenceTypeSpec) {
SourceNameReferenceTypeSpec spec = (SourceNameReferenceTypeSpec)obj; SourceNameReferenceTypeSpec spec = (SourceNameReferenceTypeSpec)obj;
...@@ -74,6 +74,7 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -74,6 +74,7 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec {
} }
} }
@Override
public String toString() { public String toString() {
return sourceName + "@" + linenumber; return sourceName + "@" + linenumber;
} }
......
...@@ -25,10 +25,9 @@ ...@@ -25,10 +25,9 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import java.util.EventObject;
public class SpecErrorEvent extends SpecEvent { public class SpecErrorEvent extends SpecEvent {
private static final long serialVersionUID = 8162634387866409578L;
private Exception reason; private Exception reason;
public SpecErrorEvent(EventRequestSpec eventRequestSpec, public SpecErrorEvent(EventRequestSpec eventRequestSpec,
......
...@@ -31,6 +31,7 @@ import com.sun.jdi.request.EventRequest; ...@@ -31,6 +31,7 @@ import com.sun.jdi.request.EventRequest;
public class SpecEvent extends EventObject { public class SpecEvent extends EventObject {
private static final long serialVersionUID = 4820735456787276230L;
private EventRequestSpec eventRequestSpec; private EventRequestSpec eventRequestSpec;
public SpecEvent(EventRequestSpec eventRequestSpec) { public SpecEvent(EventRequestSpec eventRequestSpec) {
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.ThreadGroupReference; import com.sun.jdi.ThreadGroupReference;
import com.sun.jdi.ThreadReference;
import java.util.List; import java.util.List;
import java.util.Stack; import java.util.Stack;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -73,10 +72,12 @@ public class ThreadGroupIterator implements Iterator<ThreadGroupReference> { ...@@ -73,10 +72,12 @@ public class ThreadGroupIterator implements Iterator<ThreadGroupReference> {
} }
} }
@Override
public boolean hasNext() { public boolean hasNext() {
return !stack.isEmpty(); return !stack.isEmpty();
} }
@Override
public ThreadGroupReference next() { public ThreadGroupReference next() {
return nextThreadGroup(); return nextThreadGroup();
} }
...@@ -87,6 +88,7 @@ public class ThreadGroupIterator implements Iterator<ThreadGroupReference> { ...@@ -87,6 +88,7 @@ public class ThreadGroupIterator implements Iterator<ThreadGroupReference> {
return tg; return tg;
} }
@Override
public void remove() { public void remove() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
......
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*; import com.sun.jdi.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
//### Should handle target VM death or connection failure cleanly. //### Should handle target VM death or connection failure cleanly.
......
...@@ -43,6 +43,7 @@ public class ThreadIterator implements Iterator<ThreadReference> { ...@@ -43,6 +43,7 @@ public class ThreadIterator implements Iterator<ThreadReference> {
tgi = new ThreadGroupIterator(tgl); tgi = new ThreadGroupIterator(tgl);
} }
@Override
public boolean hasNext() { public boolean hasNext() {
while (it == null || !it.hasNext()) { while (it == null || !it.hasNext()) {
if (!tgi.hasNext()) { if (!tgi.hasNext()) {
...@@ -53,6 +54,7 @@ public class ThreadIterator implements Iterator<ThreadReference> { ...@@ -53,6 +54,7 @@ public class ThreadIterator implements Iterator<ThreadReference> {
return true; return true;
} }
@Override
public ThreadReference next() { public ThreadReference next() {
return it.next(); return it.next();
} }
...@@ -61,6 +63,7 @@ public class ThreadIterator implements Iterator<ThreadReference> { ...@@ -61,6 +63,7 @@ public class ThreadIterator implements Iterator<ThreadReference> {
return next(); return next();
} }
@Override
public void remove() { public void remove() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
......
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
package com.sun.tools.example.debug.bdi; //### does it belong here? package com.sun.tools.example.debug.bdi; //### does it belong here?
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.tools.jdi.*;
import java.util.*;
import java.io.*;
public class Utils { public class Utils {
......
...@@ -25,4 +25,7 @@ ...@@ -25,4 +25,7 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
public class VMLaunchFailureException extends Exception {} public class VMLaunchFailureException extends Exception {
private static final long serialVersionUID = -2439646729274310108L;
}
...@@ -25,4 +25,7 @@ ...@@ -25,4 +25,7 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
public class VMNotInterruptedException extends Exception {} public class VMNotInterruptedException extends Exception {
private static final long serialVersionUID = 8111074582188765600L;
}
...@@ -25,9 +25,6 @@ ...@@ -25,9 +25,6 @@
package com.sun.tools.example.debug.bdi; package com.sun.tools.example.debug.bdi;
import com.sun.jdi.*;
import com.sun.jdi.request.*;
public abstract class WatchpointSpec extends EventRequestSpec { public abstract class WatchpointSpec extends EventRequestSpec {
final String fieldId; final String fieldId;
...@@ -40,31 +37,38 @@ public abstract class WatchpointSpec extends EventRequestSpec { ...@@ -40,31 +37,38 @@ public abstract class WatchpointSpec extends EventRequestSpec {
// } // }
} }
@Override
void notifySet(SpecListener listener, SpecEvent evt) { void notifySet(SpecListener listener, SpecEvent evt) {
listener.watchpointSet(evt); listener.watchpointSet(evt);
} }
@Override
void notifyDeferred(SpecListener listener, SpecEvent evt) { void notifyDeferred(SpecListener listener, SpecEvent evt) {
listener.watchpointDeferred(evt); listener.watchpointDeferred(evt);
} }
@Override
void notifyResolved(SpecListener listener, SpecEvent evt) { void notifyResolved(SpecListener listener, SpecEvent evt) {
listener.watchpointResolved(evt); listener.watchpointResolved(evt);
} }
@Override
void notifyDeleted(SpecListener listener, SpecEvent evt) { void notifyDeleted(SpecListener listener, SpecEvent evt) {
listener.watchpointDeleted(evt); listener.watchpointDeleted(evt);
} }
@Override
void notifyError(SpecListener listener, SpecErrorEvent evt) { void notifyError(SpecListener listener, SpecErrorEvent evt) {
listener.watchpointError(evt); listener.watchpointError(evt);
} }
@Override
public int hashCode() { public int hashCode() {
return refSpec.hashCode() + fieldId.hashCode() + return refSpec.hashCode() + fieldId.hashCode() +
getClass().hashCode(); getClass().hashCode();
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof WatchpointSpec) { if (obj instanceof WatchpointSpec) {
WatchpointSpec watchpoint = (WatchpointSpec)obj; WatchpointSpec watchpoint = (WatchpointSpec)obj;
...@@ -77,6 +81,7 @@ public abstract class WatchpointSpec extends EventRequestSpec { ...@@ -77,6 +81,7 @@ public abstract class WatchpointSpec extends EventRequestSpec {
} }
} }
@Override
public String errorMessageFor(Exception e) { public String errorMessageFor(Exception e) {
if (e instanceof NoSuchFieldException) { if (e instanceof NoSuchFieldException) {
return ("No field " + fieldId + " in " + refSpec); return ("No field " + fieldId + " in " + refSpec);
......
...@@ -33,6 +33,7 @@ import java.util.*; ...@@ -33,6 +33,7 @@ import java.util.*;
public abstract class AbstractEventSet extends EventObject implements EventSet { public abstract class AbstractEventSet extends EventObject implements EventSet {
private static final long serialVersionUID = 2772717574222076977L;
private final EventSet jdiEventSet; private final EventSet jdiEventSet;
final Event oneEvent; final Event oneEvent;
...@@ -81,6 +82,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -81,6 +82,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
// Implement Mirror // Implement Mirror
@Override
public VirtualMachine virtualMachine() { public VirtualMachine virtualMachine() {
return jdiEventSet.virtualMachine(); return jdiEventSet.virtualMachine();
} }
...@@ -105,10 +107,12 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -105,10 +107,12 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
return jdiEventSet.suspendPolicy(); return jdiEventSet.suspendPolicy();
} }
@Override
public void resume() { public void resume() {
jdiEventSet.resume(); jdiEventSet.resume();
} }
@Override
public int suspendPolicy() { public int suspendPolicy() {
return jdiEventSet.suspendPolicy(); return jdiEventSet.suspendPolicy();
} }
...@@ -128,6 +132,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -128,6 +132,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
/** /**
* Return an iterator specific to {@link Event} objects. * Return an iterator specific to {@link Event} objects.
*/ */
@Override
public EventIterator eventIterator() { public EventIterator eventIterator() {
return jdiEventSet.eventIterator(); return jdiEventSet.eventIterator();
} }
...@@ -142,6 +147,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -142,6 +147,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
* *
* @return the number of elements in this set (its cardinality). * @return the number of elements in this set (its cardinality).
*/ */
@Override
public int size() { public int size() {
return jdiEventSet.size(); return jdiEventSet.size();
} }
...@@ -151,6 +157,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -151,6 +157,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
* *
* @return <tt>true</tt> if this set contains no elements. * @return <tt>true</tt> if this set contains no elements.
*/ */
@Override
public boolean isEmpty() { public boolean isEmpty() {
return jdiEventSet.isEmpty(); return jdiEventSet.isEmpty();
} }
...@@ -163,6 +170,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -163,6 +170,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
* *
* @return <tt>true</tt> if this set contains the specified element. * @return <tt>true</tt> if this set contains the specified element.
*/ */
@Override
public boolean contains(Object o) { public boolean contains(Object o) {
return jdiEventSet.contains(o); return jdiEventSet.contains(o);
} }
...@@ -174,6 +182,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -174,6 +182,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
* *
* @return an iterator over the elements in this set. * @return an iterator over the elements in this set.
*/ */
@Override
public Iterator<Event> iterator() { public Iterator<Event> iterator() {
return jdiEventSet.iterator(); return jdiEventSet.iterator();
} }
...@@ -184,6 +193,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -184,6 +193,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
* *
* @return an array containing all of the elements in this set. * @return an array containing all of the elements in this set.
*/ */
@Override
public Object[] toArray() { public Object[] toArray() {
return jdiEventSet.toArray(); return jdiEventSet.toArray();
} }
...@@ -202,6 +212,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -202,6 +212,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
* @throws ArrayStoreException the runtime type of a is not a supertype * @throws ArrayStoreException the runtime type of a is not a supertype
* of the runtime type of every element in this set. * of the runtime type of every element in this set.
*/ */
@Override
public <T> T[] toArray(T a[]) { public <T> T[] toArray(T a[]) {
return jdiEventSet.toArray(a); return jdiEventSet.toArray(a);
} }
...@@ -217,6 +228,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -217,6 +228,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
* @return <tt>true</tt> if this set contains all of the elements of the * @return <tt>true</tt> if this set contains all of the elements of the
* specified collection. * specified collection.
*/ */
@Override
public boolean containsAll(Collection<?> c) { public boolean containsAll(Collection<?> c) {
return jdiEventSet.containsAll(c); return jdiEventSet.containsAll(c);
} }
...@@ -224,21 +236,27 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { ...@@ -224,21 +236,27 @@ public abstract class AbstractEventSet extends EventObject implements EventSet {
// Make the rest of Set unmodifiable // Make the rest of Set unmodifiable
@Override
public boolean add(Event e){ public boolean add(Event e){
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public boolean remove(Object o) { public boolean remove(Object o) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public boolean addAll(Collection<? extends Event> coll) { public boolean addAll(Collection<? extends Event> coll) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public boolean removeAll(Collection<?> coll) { public boolean removeAll(Collection<?> coll) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public boolean retainAll(Collection<?> coll) { public boolean retainAll(Collection<?> coll) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public void clear() { public void clear() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
......
...@@ -25,15 +25,17 @@ ...@@ -25,15 +25,17 @@
package com.sun.tools.example.debug.event; package com.sun.tools.example.debug.event;
import com.sun.jdi.*;
import com.sun.jdi.event.*; import com.sun.jdi.event.*;
public class AccessWatchpointEventSet extends WatchpointEventSet { public class AccessWatchpointEventSet extends WatchpointEventSet {
private static final long serialVersionUID = -2620394219156607673L;
AccessWatchpointEventSet(EventSet jdiEventSet) { AccessWatchpointEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.accessWatchpoint(this); listener.accessWatchpoint(this);
} }
......
...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*; ...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*;
public class ClassPrepareEventSet extends AbstractEventSet { public class ClassPrepareEventSet extends AbstractEventSet {
private static final long serialVersionUID = 5958493423581010491L;
ClassPrepareEventSet(EventSet jdiEventSet) { ClassPrepareEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
...@@ -55,6 +57,7 @@ public class ClassPrepareEventSet extends AbstractEventSet { ...@@ -55,6 +57,7 @@ public class ClassPrepareEventSet extends AbstractEventSet {
return ((ClassPrepareEvent)oneEvent).referenceType(); return ((ClassPrepareEvent)oneEvent).referenceType();
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.classPrepare(this); listener.classPrepare(this);
} }
......
...@@ -25,11 +25,12 @@ ...@@ -25,11 +25,12 @@
package com.sun.tools.example.debug.event; package com.sun.tools.example.debug.event;
import com.sun.jdi.*;
import com.sun.jdi.event.*; import com.sun.jdi.event.*;
public class ClassUnloadEventSet extends AbstractEventSet { public class ClassUnloadEventSet extends AbstractEventSet {
private static final long serialVersionUID = 8370341450345835866L;
ClassUnloadEventSet(EventSet jdiEventSet) { ClassUnloadEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
...@@ -48,6 +49,7 @@ public class ClassUnloadEventSet extends AbstractEventSet { ...@@ -48,6 +49,7 @@ public class ClassUnloadEventSet extends AbstractEventSet {
return ((ClassUnloadEvent)oneEvent).classSignature(); return ((ClassUnloadEvent)oneEvent).classSignature();
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.classUnload(this); listener.classUnload(this);
} }
......
...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*; ...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*;
public class ExceptionEventSet extends LocatableEventSet { public class ExceptionEventSet extends LocatableEventSet {
private static final long serialVersionUID = 5328140167954640711L;
ExceptionEventSet(EventSet jdiEventSet) { ExceptionEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
...@@ -75,6 +77,7 @@ public class ExceptionEventSet extends LocatableEventSet { ...@@ -75,6 +77,7 @@ public class ExceptionEventSet extends LocatableEventSet {
return ((ExceptionEvent)oneEvent).catchLocation(); return ((ExceptionEvent)oneEvent).catchLocation();
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.exception(this); listener.exception(this);
} }
......
...@@ -33,36 +33,47 @@ package com.sun.tools.example.debug.event; ...@@ -33,36 +33,47 @@ package com.sun.tools.example.debug.event;
*/ */
public class JDIAdapter implements JDIListener { public class JDIAdapter implements JDIListener {
@Override
public void accessWatchpoint(AccessWatchpointEventSet e) { public void accessWatchpoint(AccessWatchpointEventSet e) {
} }
@Override
public void classPrepare(ClassPrepareEventSet e) { public void classPrepare(ClassPrepareEventSet e) {
} }
@Override
public void classUnload(ClassUnloadEventSet e) { public void classUnload(ClassUnloadEventSet e) {
} }
@Override
public void exception(ExceptionEventSet e) { public void exception(ExceptionEventSet e) {
} }
@Override
public void locationTrigger(LocationTriggerEventSet e) { public void locationTrigger(LocationTriggerEventSet e) {
} }
@Override
public void modificationWatchpoint(ModificationWatchpointEventSet e) { public void modificationWatchpoint(ModificationWatchpointEventSet e) {
} }
@Override
public void threadDeath(ThreadDeathEventSet e) { public void threadDeath(ThreadDeathEventSet e) {
} }
@Override
public void threadStart(ThreadStartEventSet e) { public void threadStart(ThreadStartEventSet e) {
} }
@Override
public void vmDeath(VMDeathEventSet e) { public void vmDeath(VMDeathEventSet e) {
} }
@Override
public void vmDisconnect(VMDisconnectEventSet e) { public void vmDisconnect(VMDisconnectEventSet e) {
} }
@Override
public void vmStart(VMStartEventSet e) { public void vmStart(VMStartEventSet e) {
} }
......
...@@ -33,6 +33,8 @@ import com.sun.jdi.event.*; ...@@ -33,6 +33,8 @@ import com.sun.jdi.event.*;
*/ */
public abstract class LocatableEventSet extends AbstractEventSet { public abstract class LocatableEventSet extends AbstractEventSet {
private static final long serialVersionUID = 1027131209997915620L;
LocatableEventSet(EventSet jdiEventSet) { LocatableEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
......
...@@ -25,15 +25,17 @@ ...@@ -25,15 +25,17 @@
package com.sun.tools.example.debug.event; package com.sun.tools.example.debug.event;
import com.sun.jdi.*;
import com.sun.jdi.event.*; import com.sun.jdi.event.*;
public class LocationTriggerEventSet extends LocatableEventSet { public class LocationTriggerEventSet extends LocatableEventSet {
private static final long serialVersionUID = -3674631710485872487L;
LocationTriggerEventSet(EventSet jdiEventSet) { LocationTriggerEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.locationTrigger(this); listener.locationTrigger(this);
} }
......
...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*; ...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*;
public class ModificationWatchpointEventSet extends WatchpointEventSet { public class ModificationWatchpointEventSet extends WatchpointEventSet {
private static final long serialVersionUID = -680889300856154719L;
ModificationWatchpointEventSet(EventSet jdiEventSet) { ModificationWatchpointEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
...@@ -42,6 +44,7 @@ public class ModificationWatchpointEventSet extends WatchpointEventSet { ...@@ -42,6 +44,7 @@ public class ModificationWatchpointEventSet extends WatchpointEventSet {
return ((ModificationWatchpointEvent)oneEvent).valueToBe(); return ((ModificationWatchpointEvent)oneEvent).valueToBe();
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.modificationWatchpoint(this); listener.modificationWatchpoint(this);
} }
......
...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*; ...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*;
public class ThreadDeathEventSet extends AbstractEventSet { public class ThreadDeathEventSet extends AbstractEventSet {
private static final long serialVersionUID = -8801604712308151331L;
ThreadDeathEventSet(EventSet jdiEventSet) { ThreadDeathEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
...@@ -44,6 +46,7 @@ public class ThreadDeathEventSet extends AbstractEventSet { ...@@ -44,6 +46,7 @@ public class ThreadDeathEventSet extends AbstractEventSet {
return ((ThreadDeathEvent)oneEvent).thread(); return ((ThreadDeathEvent)oneEvent).thread();
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.threadDeath(this); listener.threadDeath(this);
} }
......
...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*; ...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*;
public class ThreadStartEventSet extends AbstractEventSet { public class ThreadStartEventSet extends AbstractEventSet {
private static final long serialVersionUID = -3802096132294933502L;
ThreadStartEventSet(EventSet jdiEventSet) { ThreadStartEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
...@@ -44,6 +46,7 @@ public class ThreadStartEventSet extends AbstractEventSet { ...@@ -44,6 +46,7 @@ public class ThreadStartEventSet extends AbstractEventSet {
return ((ThreadStartEvent)oneEvent).thread(); return ((ThreadStartEvent)oneEvent).thread();
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.threadStart(this); listener.threadStart(this);
} }
......
...@@ -29,10 +29,13 @@ import com.sun.jdi.event.*; ...@@ -29,10 +29,13 @@ import com.sun.jdi.event.*;
public class VMDeathEventSet extends AbstractEventSet { public class VMDeathEventSet extends AbstractEventSet {
private static final long serialVersionUID = 1163097303940092229L;
VMDeathEventSet(EventSet jdiEventSet) { VMDeathEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.vmDeath(this); listener.vmDeath(this);
} }
......
...@@ -29,10 +29,13 @@ import com.sun.jdi.event.*; ...@@ -29,10 +29,13 @@ import com.sun.jdi.event.*;
public class VMDisconnectEventSet extends AbstractEventSet { public class VMDisconnectEventSet extends AbstractEventSet {
private static final long serialVersionUID = 7968123152344675342L;
VMDisconnectEventSet(EventSet jdiEventSet) { VMDisconnectEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.vmDisconnect(this); listener.vmDisconnect(this);
} }
......
...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*; ...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*;
public class VMStartEventSet extends AbstractEventSet { public class VMStartEventSet extends AbstractEventSet {
private static final long serialVersionUID = -3384957227835478191L;
VMStartEventSet(EventSet jdiEventSet) { VMStartEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
...@@ -44,6 +46,7 @@ public class VMStartEventSet extends AbstractEventSet { ...@@ -44,6 +46,7 @@ public class VMStartEventSet extends AbstractEventSet {
return ((VMStartEvent)oneEvent).thread(); return ((VMStartEvent)oneEvent).thread();
} }
@Override
public void notify(JDIListener listener) { public void notify(JDIListener listener) {
listener.vmStart(this); listener.vmStart(this);
} }
......
...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*; ...@@ -30,6 +30,8 @@ import com.sun.jdi.event.*;
public abstract class WatchpointEventSet extends LocatableEventSet { public abstract class WatchpointEventSet extends LocatableEventSet {
private static final long serialVersionUID = 5606285209703845409L;
WatchpointEventSet(EventSet jdiEventSet) { WatchpointEventSet(EventSet jdiEventSet) {
super(jdiEventSet); super(jdiEventSet);
} }
......
...@@ -27,25 +27,25 @@ ...@@ -27,25 +27,25 @@
package com.sun.tools.example.debug.expr; package com.sun.tools.example.debug.expr;
import com.sun.jdi.*; import com.sun.jdi.*;
import java.util.Stack; import java.util.Stack;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
@SuppressWarnings("unchecked")
public class ExpressionParser implements ExpressionParserConstants { public class ExpressionParser implements ExpressionParserConstants {
Stack stack = new Stack(); Stack<LValue> stack = new Stack<LValue>();
VirtualMachine vm = null; VirtualMachine vm = null;
GetFrame frameGetter = null; GetFrame frameGetter = null;
private static GetFrame lastFrameGetter; private static GetFrame lastFrameGetter;
private static LValue lastLValue; private static LValue lastLValue;
LValue peek() { LValue peek() {
return (LValue)stack.peek(); return stack.peek();
} }
LValue pop() { LValue pop() {
return (LValue)stack.pop(); return stack.pop();
} }
void push(LValue lval) { void push(LValue lval) {
...@@ -61,17 +61,14 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -61,17 +61,14 @@ public class ExpressionParser implements ExpressionParserConstants {
} }
public static Value evaluate(String expr, VirtualMachine vm, public static Value evaluate(String expr, VirtualMachine vm,
GetFrame frameGetter) throws ParseException, GetFrame frameGetter) throws ParseException, InvocationException,
InvocationException, InvalidTypeException, ClassNotLoadedException,
InvalidTypeException,
ClassNotLoadedException,
IncompatibleThreadStateException { IncompatibleThreadStateException {
// TODO StringBufferInputStream is deprecated. // TODO StringBufferInputStream is deprecated.
java.io.InputStream in = new java.io.StringBufferInputStream(expr); java.io.InputStream in = new java.io.StringBufferInputStream(expr);
ExpressionParser parser = new ExpressionParser(in); ExpressionParser parser = new ExpressionParser(in);
parser.vm = vm; parser.vm = vm;
parser.frameGetter = frameGetter; parser.frameGetter = frameGetter;
Value value = null;
parser.Expression(); parser.Expression();
lastFrameGetter = frameGetter; lastFrameGetter = frameGetter;
lastLValue = parser.pop(); lastLValue = parser.pop();
...@@ -89,8 +86,8 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -89,8 +86,8 @@ public class ExpressionParser implements ExpressionParserConstants {
try { try {
parser = new ExpressionParser(new java.io.FileInputStream(args[0])); parser = new ExpressionParser(new java.io.FileInputStream(args[0]));
} catch (java.io.FileNotFoundException e) { } catch (java.io.FileNotFoundException e) {
System.out.println("Java Parser Version 1.0.2: File " + System.out.println("Java Parser Version 1.0.2: File " + args[0]
args[0] + " not found."); + " not found.");
return; return;
} }
} else { } else {
...@@ -137,8 +134,7 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -137,8 +134,7 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_consume_token(-1); jj_consume_token(-1);
throw new ParseException(); throw new ParseException();
} }
label_1: label_1: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET: case LBRACKET:
; ;
...@@ -189,8 +185,7 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -189,8 +185,7 @@ public class ExpressionParser implements ExpressionParserConstants {
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
jj_consume_token(IDENTIFIER); jj_consume_token(IDENTIFIER);
sb.append(token); sb.append(token);
label_2: label_2: while (true) {
while (true) {
if (jj_2_1(2)) { if (jj_2_1(2)) {
; ;
} else { } else {
...@@ -198,16 +193,18 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -198,16 +193,18 @@ public class ExpressionParser implements ExpressionParserConstants {
} }
jj_consume_token(DOT); jj_consume_token(DOT);
jj_consume_token(IDENTIFIER); jj_consume_token(IDENTIFIER);
sb.append('.'); sb.append(token); sb.append('.');
} sb.append(token);
{if (true) return sb.toString();} }
if (true) {
return sb.toString();
}
throw new Error("Missing return statement in function"); throw new Error("Missing return statement in function");
} }
final public void NameList() throws ParseException { final public void NameList() throws ParseException {
Name(); Name();
label_3: label_3: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA: case COMMA:
; ;
...@@ -261,7 +258,9 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -261,7 +258,9 @@ public class ExpressionParser implements ExpressionParserConstants {
PrimaryExpression(); PrimaryExpression();
AssignmentOperator(); AssignmentOperator();
Expression(); Expression();
LValue exprVal = pop(); pop().setValue(exprVal); push(exprVal); LValue exprVal = pop();
pop().setValue(exprVal);
push(exprVal);
} }
final public void AssignmentOperator() throws ParseException { final public void AssignmentOperator() throws ParseException {
...@@ -317,13 +316,18 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -317,13 +316,18 @@ public class ExpressionParser implements ExpressionParserConstants {
Expression(); Expression();
jj_consume_token(COLON); jj_consume_token(COLON);
ConditionalExpression(); ConditionalExpression();
LValue falseBranch = pop(); LValue trueBranch = pop(); LValue falseBranch = pop();
LValue trueBranch = pop();
Value cond = pop().interiorGetValue(); Value cond = pop().interiorGetValue();
if (cond instanceof BooleanValue) { if (cond instanceof BooleanValue) {
push(((BooleanValue)cond).booleanValue()? push(((BooleanValue) cond).booleanValue() ? trueBranch
trueBranch : falseBranch); : falseBranch);
} else { } else {
{if (true) throw new ParseException("Condition must be boolean");} {
if (true) {
throw new ParseException("Condition must be boolean");
}
}
} }
break; break;
default: default:
...@@ -334,8 +338,7 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -334,8 +338,7 @@ public class ExpressionParser implements ExpressionParserConstants {
final public void ConditionalOrExpression() throws ParseException { final public void ConditionalOrExpression() throws ParseException {
ConditionalAndExpression(); ConditionalAndExpression();
label_4: label_4: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case SC_OR: case SC_OR:
; ;
...@@ -346,14 +349,17 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -346,14 +349,17 @@ public class ExpressionParser implements ExpressionParserConstants {
} }
jj_consume_token(SC_OR); jj_consume_token(SC_OR);
ConditionalAndExpression(); ConditionalAndExpression();
{if (true) throw new ParseException("operation not yet supported");} {
if (true) {
throw new ParseException("operation not yet supported");
}
}
} }
} }
final public void ConditionalAndExpression() throws ParseException { final public void ConditionalAndExpression() throws ParseException {
InclusiveOrExpression(); InclusiveOrExpression();
label_5: label_5: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case SC_AND: case SC_AND:
; ;
...@@ -364,14 +370,17 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -364,14 +370,17 @@ public class ExpressionParser implements ExpressionParserConstants {
} }
jj_consume_token(SC_AND); jj_consume_token(SC_AND);
InclusiveOrExpression(); InclusiveOrExpression();
{if (true) throw new ParseException("operation not yet supported");} {
if (true) {
throw new ParseException("operation not yet supported");
}
}
} }
} }
final public void InclusiveOrExpression() throws ParseException { final public void InclusiveOrExpression() throws ParseException {
ExclusiveOrExpression(); ExclusiveOrExpression();
label_6: label_6: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BIT_OR: case BIT_OR:
; ;
...@@ -382,14 +391,17 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -382,14 +391,17 @@ public class ExpressionParser implements ExpressionParserConstants {
} }
jj_consume_token(BIT_OR); jj_consume_token(BIT_OR);
ExclusiveOrExpression(); ExclusiveOrExpression();
{if (true) throw new ParseException("operation not yet supported");} {
if (true) {
throw new ParseException("operation not yet supported");
}
}
} }
} }
final public void ExclusiveOrExpression() throws ParseException { final public void ExclusiveOrExpression() throws ParseException {
AndExpression(); AndExpression();
label_7: label_7: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case XOR: case XOR:
; ;
...@@ -400,14 +412,17 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -400,14 +412,17 @@ public class ExpressionParser implements ExpressionParserConstants {
} }
jj_consume_token(XOR); jj_consume_token(XOR);
AndExpression(); AndExpression();
{if (true) throw new ParseException("operation not yet supported");} {
if (true) {
throw new ParseException("operation not yet supported");
}
}
} }
} }
final public void AndExpression() throws ParseException { final public void AndExpression() throws ParseException {
EqualityExpression(); EqualityExpression();
label_8: label_8: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case BIT_AND: case BIT_AND:
; ;
...@@ -418,15 +433,18 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -418,15 +433,18 @@ public class ExpressionParser implements ExpressionParserConstants {
} }
jj_consume_token(BIT_AND); jj_consume_token(BIT_AND);
EqualityExpression(); EqualityExpression();
{if (true) throw new ParseException("operation not yet supported");} {
if (true) {
throw new ParseException("operation not yet supported");
}
}
} }
} }
final public void EqualityExpression() throws ParseException { final public void EqualityExpression() throws ParseException {
Token tok; Token tok;
InstanceOfExpression(); InstanceOfExpression();
label_9: label_9: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case EQ: case EQ:
case NE: case NE:
...@@ -460,7 +478,11 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -460,7 +478,11 @@ public class ExpressionParser implements ExpressionParserConstants {
case INSTANCEOF: case INSTANCEOF:
jj_consume_token(INSTANCEOF); jj_consume_token(INSTANCEOF);
Type(); Type();
{if (true) throw new ParseException("operation not yet supported");} {
if (true) {
throw new ParseException("operation not yet supported");
}
}
break; break;
default: default:
jj_la1[14] = jj_gen; jj_la1[14] = jj_gen;
...@@ -471,8 +493,7 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -471,8 +493,7 @@ public class ExpressionParser implements ExpressionParserConstants {
final public void RelationalExpression() throws ParseException { final public void RelationalExpression() throws ParseException {
Token tok; Token tok;
ShiftExpression(); ShiftExpression();
label_10: label_10: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case GT: case GT:
case LT: case LT:
...@@ -510,8 +531,7 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -510,8 +531,7 @@ public class ExpressionParser implements ExpressionParserConstants {
final public void ShiftExpression() throws ParseException { final public void ShiftExpression() throws ParseException {
AdditiveExpression(); AdditiveExpression();
label_11: label_11: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LSHIFT: case LSHIFT:
case RSIGNEDSHIFT: case RSIGNEDSHIFT:
...@@ -538,15 +558,18 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -538,15 +558,18 @@ public class ExpressionParser implements ExpressionParserConstants {
throw new ParseException(); throw new ParseException();
} }
AdditiveExpression(); AdditiveExpression();
{if (true) throw new ParseException("operation not yet supported");} {
if (true) {
throw new ParseException("operation not yet supported");
}
}
} }
} }
final public void AdditiveExpression() throws ParseException { final public void AdditiveExpression() throws ParseException {
Token tok; Token tok;
MultiplicativeExpression(); MultiplicativeExpression();
label_12: label_12: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case PLUS: case PLUS:
case MINUS: case MINUS:
...@@ -577,8 +600,7 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -577,8 +600,7 @@ public class ExpressionParser implements ExpressionParserConstants {
final public void MultiplicativeExpression() throws ParseException { final public void MultiplicativeExpression() throws ParseException {
Token tok; Token tok;
UnaryExpression(); UnaryExpression();
label_13: label_13: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case STAR: case STAR:
case SLASH: case SLASH:
...@@ -627,7 +649,11 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -627,7 +649,11 @@ public class ExpressionParser implements ExpressionParserConstants {
throw new ParseException(); throw new ParseException();
} }
UnaryExpression(); UnaryExpression();
{if (true) throw new ParseException("operation not yet supported");} {
if (true) {
throw new ParseException("operation not yet supported");
}
}
break; break;
case INCR: case INCR:
PreIncrementExpression(); PreIncrementExpression();
...@@ -661,13 +687,21 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -661,13 +687,21 @@ public class ExpressionParser implements ExpressionParserConstants {
final public void PreIncrementExpression() throws ParseException { final public void PreIncrementExpression() throws ParseException {
jj_consume_token(INCR); jj_consume_token(INCR);
PrimaryExpression(); PrimaryExpression();
{if (true) throw new ParseException("operation not yet supported");} {
if (true) {
throw new ParseException("operation not yet supported");
}
}
} }
final public void PreDecrementExpression() throws ParseException { final public void PreDecrementExpression() throws ParseException {
jj_consume_token(DECR); jj_consume_token(DECR);
PrimaryExpression(); PrimaryExpression();
{if (true) throw new ParseException("operation not yet supported");} {
if (true) {
throw new ParseException("operation not yet supported");
}
}
} }
final public void UnaryExpressionNotPlusMinus() throws ParseException { final public void UnaryExpressionNotPlusMinus() throws ParseException {
...@@ -687,7 +721,11 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -687,7 +721,11 @@ public class ExpressionParser implements ExpressionParserConstants {
throw new ParseException(); throw new ParseException();
} }
UnaryExpression(); UnaryExpression();
{if (true) throw new ParseException("operation not yet supported");} {
if (true) {
throw new ParseException("operation not yet supported");
}
}
break; break;
default: default:
jj_la1[26] = jj_gen; jj_la1[26] = jj_gen;
...@@ -718,8 +756,10 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -718,8 +756,10 @@ public class ExpressionParser implements ExpressionParserConstants {
} }
} }
// This production is to determine lookahead only. The LOOKAHEAD specifications // This production is to determine lookahead only. The LOOKAHEAD
// below are not used, but they are there just to indicate that we know about // specifications
// below are not used, but they are there just to indicate that we know
// about
// this. // this.
final public void CastLookahead() throws ParseException { final public void CastLookahead() throws ParseException {
if (jj_2_4(2)) { if (jj_2_4(2)) {
...@@ -792,7 +832,11 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -792,7 +832,11 @@ public class ExpressionParser implements ExpressionParserConstants {
break; break;
case DECR: case DECR:
jj_consume_token(DECR); jj_consume_token(DECR);
{if (true) throw new ParseException("operation not yet supported");} {
if (true) {
throw new ParseException("operation not yet supported");
}
}
break; break;
default: default:
jj_la1[30] = jj_gen; jj_la1[30] = jj_gen;
...@@ -810,8 +854,7 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -810,8 +854,7 @@ public class ExpressionParser implements ExpressionParserConstants {
if (jj_2_6(2)) { if (jj_2_6(2)) {
jj_consume_token(LPAREN); jj_consume_token(LPAREN);
PrimitiveType(); PrimitiveType();
label_14: label_14: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET: case LBRACKET:
; ;
...@@ -830,8 +873,7 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -830,8 +873,7 @@ public class ExpressionParser implements ExpressionParserConstants {
case LPAREN: case LPAREN:
jj_consume_token(LPAREN); jj_consume_token(LPAREN);
Name(); Name();
label_15: label_15: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET: case LBRACKET:
; ;
...@@ -856,8 +898,7 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -856,8 +898,7 @@ public class ExpressionParser implements ExpressionParserConstants {
final public void PrimaryExpression() throws ParseException { final public void PrimaryExpression() throws ParseException {
PrimaryPrefix(); PrimaryPrefix();
label_16: label_16: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LPAREN: case LPAREN:
case LBRACKET: case LBRACKET:
...@@ -896,7 +937,11 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -896,7 +937,11 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_consume_token(SUPER); jj_consume_token(SUPER);
jj_consume_token(DOT); jj_consume_token(DOT);
jj_consume_token(IDENTIFIER); jj_consume_token(IDENTIFIER);
{if (true) throw new ParseException("operation not yet supported");} {
if (true) {
throw new ParseException("operation not yet supported");
}
}
break; break;
case LPAREN: case LPAREN:
jj_consume_token(LPAREN); jj_consume_token(LPAREN);
...@@ -914,7 +959,7 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -914,7 +959,7 @@ public class ExpressionParser implements ExpressionParserConstants {
} }
final public void PrimarySuffix() throws ParseException { final public void PrimarySuffix() throws ParseException {
List argList; List<Value> argList;
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case LBRACKET: case LBRACKET:
jj_consume_token(LBRACKET); jj_consume_token(LBRACKET);
...@@ -992,8 +1037,8 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -992,8 +1037,8 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_consume_token(NULL); jj_consume_token(NULL);
} }
final public List Arguments() throws ParseException { final public List<Value> Arguments() throws ParseException {
List argList = new ArrayList(); List<Value> argList = new ArrayList<Value>();
jj_consume_token(LPAREN); jj_consume_token(LPAREN);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case FALSE: case FALSE:
...@@ -1021,15 +1066,18 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1021,15 +1066,18 @@ public class ExpressionParser implements ExpressionParserConstants {
; ;
} }
jj_consume_token(RPAREN); jj_consume_token(RPAREN);
{if (true) return argList;} {
if (true) {
return argList;
}
}
throw new Error("Missing return statement in function"); throw new Error("Missing return statement in function");
} }
final public void ArgumentList(List argList) throws ParseException { final public void ArgumentList(List<Value> argList) throws ParseException {
Expression(); Expression();
argList.add(pop().interiorGetValue()); argList.add(pop().interiorGetValue());
label_17: label_17: while (true) {
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case COMMA: case COMMA:
; ;
...@@ -1045,7 +1093,8 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1045,7 +1093,8 @@ public class ExpressionParser implements ExpressionParserConstants {
} }
final public void AllocationExpression() throws ParseException { final public void AllocationExpression() throws ParseException {
List argList; String className; List<Value> argList;
String className;
if (jj_2_7(2)) { if (jj_2_7(2)) {
jj_consume_token(NEW); jj_consume_token(NEW);
PrimitiveType(); PrimitiveType();
...@@ -1062,7 +1111,11 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1062,7 +1111,11 @@ public class ExpressionParser implements ExpressionParserConstants {
break; break;
case LBRACKET: case LBRACKET:
ArrayDimensions(); ArrayDimensions();
{if (true) throw new ParseException("operation not yet supported");} {
if (true) {
throw new ParseException("operation not yet supported");
}
}
break; break;
default: default:
jj_la1[42] = jj_gen; jj_la1[42] = jj_gen;
...@@ -1079,12 +1132,11 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1079,12 +1132,11 @@ public class ExpressionParser implements ExpressionParserConstants {
} }
/* /*
* The second LOOKAHEAD specification below is to parse to PrimarySuffix * The second LOOKAHEAD specification below is to parse to PrimarySuffix if
* if there is an expression between the "[...]". * there is an expression between the "[...]".
*/ */
final public void ArrayDimensions() throws ParseException { final public void ArrayDimensions() throws ParseException {
label_18: label_18: while (true) {
while (true) {
jj_consume_token(LBRACKET); jj_consume_token(LBRACKET);
Expression(); Expression();
jj_consume_token(RBRACKET); jj_consume_token(RBRACKET);
...@@ -1094,8 +1146,7 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1094,8 +1146,7 @@ public class ExpressionParser implements ExpressionParserConstants {
break label_18; break label_18;
} }
} }
label_19: label_19: while (true) {
while (true) {
if (jj_2_9(2)) { if (jj_2_9(2)) {
; ;
} else { } else {
...@@ -1107,71 +1158,84 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1107,71 +1158,84 @@ public class ExpressionParser implements ExpressionParserConstants {
} }
final private boolean jj_2_1(int xla) { final private boolean jj_2_1(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token; jj_la = xla;
jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_1(); boolean retval = !jj_3_1();
jj_save(0, xla); jj_save(0, xla);
return retval; return retval;
} }
final private boolean jj_2_2(int xla) { final private boolean jj_2_2(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token; jj_la = xla;
jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_2(); boolean retval = !jj_3_2();
jj_save(1, xla); jj_save(1, xla);
return retval; return retval;
} }
final private boolean jj_2_3(int xla) { final private boolean jj_2_3(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token; jj_la = xla;
jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_3(); boolean retval = !jj_3_3();
jj_save(2, xla); jj_save(2, xla);
return retval; return retval;
} }
final private boolean jj_2_4(int xla) { final private boolean jj_2_4(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token; jj_la = xla;
jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_4(); boolean retval = !jj_3_4();
jj_save(3, xla); jj_save(3, xla);
return retval; return retval;
} }
final private boolean jj_2_5(int xla) { final private boolean jj_2_5(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token; jj_la = xla;
jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_5(); boolean retval = !jj_3_5();
jj_save(4, xla); jj_save(4, xla);
return retval; return retval;
} }
final private boolean jj_2_6(int xla) { final private boolean jj_2_6(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token; jj_la = xla;
jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_6(); boolean retval = !jj_3_6();
jj_save(5, xla); jj_save(5, xla);
return retval; return retval;
} }
final private boolean jj_2_7(int xla) { final private boolean jj_2_7(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token; jj_la = xla;
jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_7(); boolean retval = !jj_3_7();
jj_save(6, xla); jj_save(6, xla);
return retval; return retval;
} }
final private boolean jj_2_8(int xla) { final private boolean jj_2_8(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token; jj_la = xla;
jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_8(); boolean retval = !jj_3_8();
jj_save(7, xla); jj_save(7, xla);
return retval; return retval;
} }
final private boolean jj_2_9(int xla) { final private boolean jj_2_9(int xla) {
jj_la = xla; jj_lastpos = jj_scanpos = token; jj_la = xla;
jj_lastpos = jj_scanpos = token;
boolean retval = !jj_3_9(); boolean retval = !jj_3_9();
jj_save(8, xla); jj_save(8, xla);
return retval; return retval;
} }
final private boolean jj_3R_154() { final private boolean jj_3R_154() {
if (jj_scan_token(INCR)) return true; if (jj_scan_token(INCR)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -1180,9 +1244,15 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1180,9 +1244,15 @@ public class ExpressionParser implements ExpressionParserConstants {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_154()) { if (jj_3R_154()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_155()) return true; if (jj_3R_155()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -1191,27 +1261,54 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1191,27 +1261,54 @@ public class ExpressionParser implements ExpressionParserConstants {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3_6()) { if (jj_3_6()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_150()) return true; if (jj_3R_150()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3_6() { final private boolean jj_3_6() {
if (jj_scan_token(LPAREN)) return true; if (jj_scan_token(LPAREN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_23()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_23()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_152()) { jj_scanpos = xsp; break; } if (jj_3R_152()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
} break;
if (jj_scan_token(RPAREN)) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_3R_115()) return true; return false;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
}
if (jj_scan_token(RPAREN)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_115()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -1220,45 +1317,86 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1220,45 +1317,86 @@ public class ExpressionParser implements ExpressionParserConstants {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_50()) { if (jj_3R_50()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_51()) return true; if (jj_3R_51()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_50() { final private boolean jj_3R_50() {
if (jj_3R_67()) return true; if (jj_3R_67()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3_5() { final private boolean jj_3_5() {
if (jj_scan_token(LPAREN)) return true; if (jj_scan_token(LPAREN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_24()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_scan_token(LBRACKET)) return true; return false;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_3R_24()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_scan_token(LBRACKET)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_149() { final private boolean jj_3R_149() {
if (jj_3R_20()) return true; if (jj_3R_20()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_151()) jj_scanpos = xsp; if (jj_3R_151()) {
else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_41() { final private boolean jj_3R_41() {
if (jj_scan_token(LPAREN)) return true; if (jj_scan_token(LPAREN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_24()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_scan_token(RPAREN)) return true; return false;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_3R_24()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_scan_token(RPAREN)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_59()) { if (jj_3R_59()) {
...@@ -1275,51 +1413,109 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1275,51 +1413,109 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_65()) { if (jj_3R_65()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_66()) return true; if (jj_3R_66()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_40() { final private boolean jj_3R_40() {
if (jj_scan_token(LPAREN)) return true; if (jj_scan_token(LPAREN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_24()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_scan_token(LBRACKET)) return true; return false;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_scan_token(RBRACKET)) return true; if (jj_3R_24()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_scan_token(LBRACKET)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_scan_token(RBRACKET)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_123() { final private boolean jj_3R_123() {
if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(LBRACKET)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_scan_token(RBRACKET)) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_scan_token(RBRACKET)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3_1() { final private boolean jj_3_1() {
if (jj_scan_token(DOT)) return true; if (jj_scan_token(DOT)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_scan_token(IDENTIFIER)) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_scan_token(IDENTIFIER)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3_4() { final private boolean jj_3_4() {
if (jj_scan_token(LPAREN)) return true; if (jj_scan_token(LPAREN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_23()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_23()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -1330,76 +1526,129 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1330,76 +1526,129 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_40()) { if (jj_3R_40()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_41()) return true; if (jj_3R_41()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3_3() { final private boolean jj_3_3() {
if (jj_3R_22()) return true; if (jj_3R_22()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_24() { final private boolean jj_3R_24() {
if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(IDENTIFIER)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3_1()) { jj_scanpos = xsp; break; } if (jj_3_1()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
return false; return false;
} }
final private boolean jj_3R_147() { final private boolean jj_3R_147() {
if (jj_scan_token(BANG)) return true; if (jj_scan_token(BANG)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_142() { final private boolean jj_3R_142() {
if (jj_3R_149()) return true; if (jj_3R_149()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_122() { final private boolean jj_3R_122() {
if (jj_3R_24()) return true; if (jj_3R_24()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_49() { final private boolean jj_3R_49() {
if (jj_scan_token(DOUBLE)) return true; if (jj_scan_token(DOUBLE)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_141() { final private boolean jj_3R_141() {
if (jj_3R_148()) return true; if (jj_3R_148()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_48() { final private boolean jj_3R_48() {
if (jj_scan_token(FLOAT)) return true; if (jj_scan_token(FLOAT)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_146() { final private boolean jj_3R_146() {
if (jj_scan_token(TILDE)) return true; if (jj_scan_token(TILDE)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_47() { final private boolean jj_3R_47() {
if (jj_scan_token(LONG)) return true; if (jj_scan_token(LONG)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -1408,11 +1657,21 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1408,11 +1657,21 @@ public class ExpressionParser implements ExpressionParserConstants {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_146()) { if (jj_3R_146()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_147()) return true; if (jj_3R_147()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_3R_115()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_115()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -1423,48 +1682,84 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1423,48 +1682,84 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_141()) { if (jj_3R_141()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_142()) return true; if (jj_3R_142()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_46() { final private boolean jj_3R_46() {
if (jj_scan_token(INT)) return true; if (jj_scan_token(INT)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_145() { final private boolean jj_3R_145() {
if (jj_scan_token(REM)) return true; if (jj_scan_token(REM)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_45() { final private boolean jj_3R_45() {
if (jj_scan_token(SHORT)) return true; if (jj_scan_token(SHORT)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_44() { final private boolean jj_3R_44() {
if (jj_scan_token(BYTE)) return true; if (jj_scan_token(BYTE)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_135() { final private boolean jj_3R_135() {
if (jj_scan_token(DECR)) return true; if (jj_scan_token(DECR)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_20()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_20()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_43() { final private boolean jj_3R_43() {
if (jj_scan_token(CHAR)) return true; if (jj_scan_token(CHAR)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -1485,49 +1780,95 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1485,49 +1780,95 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_48()) { if (jj_3R_48()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_49()) return true; if (jj_3R_49()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_42() { final private boolean jj_3R_42() {
if (jj_scan_token(BOOLEAN)) return true; if (jj_scan_token(BOOLEAN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3_9() { final private boolean jj_3_9() {
if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(LBRACKET)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_scan_token(RBRACKET)) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_scan_token(RBRACKET)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_121() { final private boolean jj_3R_121() {
if (jj_3R_23()) return true; if (jj_3R_23()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_144() { final private boolean jj_3R_144() {
if (jj_scan_token(SLASH)) return true; if (jj_scan_token(SLASH)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_134() { final private boolean jj_3R_134() {
if (jj_scan_token(INCR)) return true; if (jj_scan_token(INCR)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_20()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_20()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -1536,62 +1877,105 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1536,62 +1877,105 @@ public class ExpressionParser implements ExpressionParserConstants {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_121()) { if (jj_3R_121()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_122()) return true; if (jj_3R_122()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_123()) { jj_scanpos = xsp; break; } if (jj_3R_123()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
return false; return false;
} }
final private boolean jj_3R_120() { final private boolean jj_3R_120() {
if (jj_scan_token(GE)) return true; if (jj_scan_token(GE)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_133() { final private boolean jj_3R_133() {
if (jj_scan_token(MINUS)) return true; if (jj_scan_token(MINUS)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_127() { final private boolean jj_3R_127() {
if (jj_3R_136()) return true; if (jj_3R_136()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_126() { final private boolean jj_3R_126() {
if (jj_3R_135()) return true; if (jj_3R_135()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_139() { final private boolean jj_3R_139() {
if (jj_scan_token(MINUS)) return true; if (jj_scan_token(MINUS)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_125() { final private boolean jj_3R_125() {
if (jj_3R_134()) return true; if (jj_3R_134()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_132() { final private boolean jj_3R_132() {
if (jj_scan_token(PLUS)) return true; if (jj_scan_token(PLUS)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_143() { final private boolean jj_3R_143() {
if (jj_scan_token(STAR)) return true; if (jj_scan_token(STAR)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -1600,11 +1984,21 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1600,11 +1984,21 @@ public class ExpressionParser implements ExpressionParserConstants {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_132()) { if (jj_3R_132()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_133()) return true; if (jj_3R_133()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_3R_115()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_115()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -1617,11 +2011,21 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1617,11 +2011,21 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_126()) { if (jj_3R_126()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_127()) return true; if (jj_3R_127()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -1632,54 +2036,95 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1632,54 +2036,95 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_144()) { if (jj_3R_144()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_145()) return true; if (jj_3R_145()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_3R_115()) return true; return false;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_115()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_131() { final private boolean jj_3R_131() {
if (jj_scan_token(RUNSIGNEDSHIFT)) return true; if (jj_scan_token(RUNSIGNEDSHIFT)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_119() { final private boolean jj_3R_119() {
if (jj_scan_token(LE)) return true; if (jj_scan_token(LE)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_138() { final private boolean jj_3R_138() {
if (jj_scan_token(PLUS)) return true; if (jj_scan_token(PLUS)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_112() { final private boolean jj_3R_112() {
if (jj_3R_115()) return true; if (jj_3R_115()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_137()) { jj_scanpos = xsp; break; } if (jj_3R_137()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
return false; return false;
} }
final private boolean jj_3R_88() { final private boolean jj_3R_88() {
if (jj_3R_86()) return true; if (jj_3R_86()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_130() { final private boolean jj_3R_130() {
if (jj_scan_token(RSIGNEDSHIFT)) return true; if (jj_scan_token(RSIGNEDSHIFT)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -1688,29 +2133,51 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1688,29 +2133,51 @@ public class ExpressionParser implements ExpressionParserConstants {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_138()) { if (jj_3R_138()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_139()) return true; if (jj_3R_139()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_3R_112()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_112()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_87() { final private boolean jj_3R_87() {
if (jj_3R_82()) return true; if (jj_3R_82()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_118() { final private boolean jj_3R_118() {
if (jj_scan_token(GT)) return true; if (jj_scan_token(GT)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_129() { final private boolean jj_3R_129() {
if (jj_scan_token(LSHIFT)) return true; if (jj_scan_token(LSHIFT)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -1721,68 +2188,128 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1721,68 +2188,128 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_130()) { if (jj_3R_130()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_131()) return true; if (jj_3R_131()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_3R_108()) return true; return false;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_108()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_108() { final private boolean jj_3R_108() {
if (jj_3R_112()) return true; if (jj_3R_112()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_128()) { jj_scanpos = xsp; break; } if (jj_3R_128()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
return false; return false;
} }
final private boolean jj_3_8() { final private boolean jj_3_8() {
if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(LBRACKET)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_25()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_scan_token(RBRACKET)) return true; return false;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_3R_25()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_scan_token(RBRACKET)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_86() { final private boolean jj_3R_86() {
Token xsp; Token xsp;
if (jj_3_8()) return true; if (jj_3_8()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3_8()) { jj_scanpos = xsp; break; } if (jj_3_8()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3_9()) { jj_scanpos = xsp; break; } if (jj_3_9()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
return false; return false;
} }
final private boolean jj_3R_117() { final private boolean jj_3R_117() {
if (jj_scan_token(LT)) return true; if (jj_scan_token(LT)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_106() { final private boolean jj_3R_106() {
if (jj_3R_108()) return true; if (jj_3R_108()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_116()) { jj_scanpos = xsp; break; } if (jj_3R_116()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
return false; return false;
} }
...@@ -1796,64 +2323,125 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1796,64 +2323,125 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_119()) { if (jj_3R_119()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_120()) return true; if (jj_3R_120()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false;
if (jj_3R_106()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_106()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_111() { final private boolean jj_3R_111() {
if (jj_scan_token(NE)) return true; if (jj_scan_token(NE)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_109() { final private boolean jj_3R_109() {
if (jj_scan_token(INSTANCEOF)) return true; if (jj_scan_token(INSTANCEOF)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_114()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_114()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_104() { final private boolean jj_3R_104() {
if (jj_3R_106()) return true; if (jj_3R_106()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_113()) { jj_scanpos = xsp; break; } if (jj_3R_113()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
return false; return false;
} }
final private boolean jj_3R_81() { final private boolean jj_3R_81() {
if (jj_scan_token(NEW)) return true; if (jj_scan_token(NEW)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_24()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_24()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_87()) { if (jj_3R_87()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_88()) return true; if (jj_3R_88()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3_7() { final private boolean jj_3_7() {
if (jj_scan_token(NEW)) return true; if (jj_scan_token(NEW)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_23()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_3R_86()) return true; return false;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_3R_23()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_86()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -1862,39 +2450,68 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1862,39 +2450,68 @@ public class ExpressionParser implements ExpressionParserConstants {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3_7()) { if (jj_3_7()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_81()) return true; if (jj_3R_81()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_97() { final private boolean jj_3R_97() {
if (jj_scan_token(COMMA)) return true; if (jj_scan_token(COMMA)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_25()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_25()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_39() { final private boolean jj_3R_39() {
if (jj_scan_token(ORASSIGN)) return true; if (jj_scan_token(ORASSIGN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_110() { final private boolean jj_3R_110() {
if (jj_scan_token(EQ)) return true; if (jj_scan_token(EQ)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_102() { final private boolean jj_3R_102() {
if (jj_3R_104()) return true; if (jj_3R_104()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_109()) jj_scanpos = xsp; if (jj_3R_109()) {
else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -1903,117 +2520,209 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -1903,117 +2520,209 @@ public class ExpressionParser implements ExpressionParserConstants {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_110()) { if (jj_3R_110()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_111()) return true; if (jj_3R_111()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_3R_102()) return true; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_102()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_94() { final private boolean jj_3R_94() {
if (jj_3R_25()) return true; if (jj_3R_25()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_97()) { jj_scanpos = xsp; break; } if (jj_3R_97()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
return false; return false;
} }
final private boolean jj_3R_89() { final private boolean jj_3R_89() {
if (jj_3R_94()) return true; if (jj_3R_94()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_38() { final private boolean jj_3R_38() {
if (jj_scan_token(XORASSIGN)) return true; if (jj_scan_token(XORASSIGN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_82() { final private boolean jj_3R_82() {
if (jj_scan_token(LPAREN)) return true; if (jj_scan_token(LPAREN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_89()) jj_scanpos = xsp; if (jj_3R_89()) {
else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
if (jj_scan_token(RPAREN)) return true; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false;
}
if (jj_scan_token(RPAREN)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_105() { final private boolean jj_3R_105() {
if (jj_scan_token(BIT_AND)) return true; if (jj_scan_token(BIT_AND)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_100()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_100()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_100() { final private boolean jj_3R_100() {
if (jj_3R_102()) return true; if (jj_3R_102()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_107()) { jj_scanpos = xsp; break; } if (jj_3R_107()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
return false; return false;
} }
final private boolean jj_3R_37() { final private boolean jj_3R_37() {
if (jj_scan_token(ANDASSIGN)) return true; if (jj_scan_token(ANDASSIGN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_85() { final private boolean jj_3R_85() {
if (jj_scan_token(NULL)) return true; if (jj_scan_token(NULL)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_103() { final private boolean jj_3R_103() {
if (jj_scan_token(XOR)) return true; if (jj_scan_token(XOR)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_98()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_98()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_98() { final private boolean jj_3R_98() {
if (jj_3R_100()) return true; if (jj_3R_100()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_105()) { jj_scanpos = xsp; break; } if (jj_3R_105()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
return false; return false;
} }
final private boolean jj_3R_92() { final private boolean jj_3R_92() {
if (jj_scan_token(FALSE)) return true; if (jj_scan_token(FALSE)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_36() { final private boolean jj_3R_36() {
if (jj_scan_token(RUNSIGNEDSHIFTASSIGN)) return true; if (jj_scan_token(RUNSIGNEDSHIFTASSIGN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_91() { final private boolean jj_3R_91() {
if (jj_scan_token(TRUE)) return true; if (jj_scan_token(TRUE)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -2022,109 +2731,189 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2022,109 +2731,189 @@ public class ExpressionParser implements ExpressionParserConstants {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_91()) { if (jj_3R_91()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_92()) return true; if (jj_3R_92()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_101() { final private boolean jj_3R_101() {
if (jj_scan_token(BIT_OR)) return true; if (jj_scan_token(BIT_OR)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_95()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_95()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_95() { final private boolean jj_3R_95() {
if (jj_3R_98()) return true; if (jj_3R_98()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_103()) { jj_scanpos = xsp; break; } if (jj_3R_103()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
return false; return false;
} }
final private boolean jj_3R_35() { final private boolean jj_3R_35() {
if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true; if (jj_scan_token(RSIGNEDSHIFTASSIGN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_80() { final private boolean jj_3R_80() {
if (jj_3R_85()) return true; if (jj_3R_85()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_66() { final private boolean jj_3R_66() {
if (jj_3R_69()) return true; if (jj_3R_69()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_79() { final private boolean jj_3R_79() {
if (jj_3R_84()) return true; if (jj_3R_84()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_78() { final private boolean jj_3R_78() {
if (jj_scan_token(STRING_LITERAL)) return true; if (jj_scan_token(STRING_LITERAL)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_99() { final private boolean jj_3R_99() {
if (jj_scan_token(SC_AND)) return true; if (jj_scan_token(SC_AND)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_90()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_90()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_90() { final private boolean jj_3R_90() {
if (jj_3R_95()) return true; if (jj_3R_95()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_101()) { jj_scanpos = xsp; break; } if (jj_3R_101()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
return false; return false;
} }
final private boolean jj_3R_34() { final private boolean jj_3R_34() {
if (jj_scan_token(LSHIFTASSIGN)) return true; if (jj_scan_token(LSHIFTASSIGN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_65() { final private boolean jj_3R_65() {
if (jj_scan_token(NEW)) return true; if (jj_scan_token(NEW)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_77() { final private boolean jj_3R_77() {
if (jj_scan_token(CHARACTER_LITERAL)) return true; if (jj_scan_token(CHARACTER_LITERAL)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_76() { final private boolean jj_3R_76() {
if (jj_scan_token(FLOATING_POINT_LITERAL)) return true; if (jj_scan_token(FLOATING_POINT_LITERAL)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_33() { final private boolean jj_3R_33() {
if (jj_scan_token(MINUSASSIGN)) return true; if (jj_scan_token(MINUSASSIGN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -2141,89 +2930,161 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2141,89 +2930,161 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_79()) { if (jj_3R_79()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_80()) return true; if (jj_3R_80()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_75() { final private boolean jj_3R_75() {
if (jj_scan_token(INTEGER_LITERAL)) return true; if (jj_scan_token(INTEGER_LITERAL)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_96() { final private boolean jj_3R_96() {
if (jj_scan_token(SC_OR)) return true; if (jj_scan_token(SC_OR)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_83()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_83()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_83() { final private boolean jj_3R_83() {
if (jj_3R_90()) return true; if (jj_3R_90()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_99()) { jj_scanpos = xsp; break; } if (jj_3R_99()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
return false; return false;
} }
final private boolean jj_3R_64() { final private boolean jj_3R_64() {
if (jj_scan_token(SUPER)) return true; if (jj_scan_token(SUPER)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_32() { final private boolean jj_3R_32() {
if (jj_scan_token(PLUSASSIGN)) return true; if (jj_scan_token(PLUSASSIGN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_73() { final private boolean jj_3R_73() {
if (jj_3R_82()) return true; if (jj_3R_82()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_72() { final private boolean jj_3R_72() {
if (jj_scan_token(DOT)) return true; if (jj_scan_token(DOT)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_scan_token(IDENTIFIER)) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_scan_token(IDENTIFIER)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_74() { final private boolean jj_3R_74() {
if (jj_3R_83()) return true; if (jj_3R_83()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_96()) { jj_scanpos = xsp; break; } if (jj_3R_96()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
return false; return false;
} }
final private boolean jj_3R_63() { final private boolean jj_3R_63() {
if (jj_scan_token(THIS)) return true; if (jj_scan_token(THIS)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_31() { final private boolean jj_3R_31() {
if (jj_scan_token(REMASSIGN)) return true; if (jj_scan_token(REMASSIGN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -2234,120 +3095,231 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2234,120 +3095,231 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_72()) { if (jj_3R_72()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_73()) return true; if (jj_3R_73()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_71() { final private boolean jj_3R_71() {
if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(LBRACKET)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_25()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_scan_token(RBRACKET)) return true; return false;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_3R_25()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_scan_token(RBRACKET)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_93() { final private boolean jj_3R_93() {
if (jj_scan_token(HOOK)) return true; if (jj_scan_token(HOOK)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_25()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_scan_token(COLON)) return true; return false;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_3R_68()) return true; if (jj_3R_25()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_scan_token(COLON)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_68()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_57() { final private boolean jj_3R_57() {
if (jj_3R_70()) return true; if (jj_3R_70()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_30() { final private boolean jj_3R_30() {
if (jj_scan_token(SLASHASSIGN)) return true; if (jj_scan_token(SLASHASSIGN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_27() { final private boolean jj_3R_27() {
if (jj_3R_58()) return true; if (jj_3R_58()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_56() { final private boolean jj_3R_56() {
if (jj_scan_token(LPAREN)) return true; if (jj_scan_token(LPAREN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_25()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_scan_token(RPAREN)) return true; return false;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_3R_25()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_scan_token(RPAREN)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_152() { final private boolean jj_3R_152() {
if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(LBRACKET)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_scan_token(RBRACKET)) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_scan_token(RBRACKET)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_55() { final private boolean jj_3R_55() {
if (jj_scan_token(SUPER)) return true; if (jj_scan_token(SUPER)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_scan_token(DOT)) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_scan_token(IDENTIFIER)) return true; return false;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_scan_token(DOT)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_scan_token(IDENTIFIER)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_29() { final private boolean jj_3R_29() {
if (jj_scan_token(STARASSIGN)) return true; if (jj_scan_token(STARASSIGN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_68() { final private boolean jj_3R_68() {
if (jj_3R_74()) return true; if (jj_3R_74()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_93()) jj_scanpos = xsp; if (jj_3R_93()) {
else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_54() { final private boolean jj_3R_54() {
if (jj_scan_token(THIS)) return true; if (jj_scan_token(THIS)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_62() { final private boolean jj_3R_62() {
if (jj_scan_token(IDENTIFIER)) return true; if (jj_scan_token(IDENTIFIER)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_53() { final private boolean jj_3R_53() {
if (jj_3R_24()) return true; if (jj_3R_24()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_153() { final private boolean jj_3R_153() {
if (jj_scan_token(LBRACKET)) return true; if (jj_scan_token(LBRACKET)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_scan_token(RBRACKET)) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_scan_token(RBRACKET)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -2364,19 +3336,37 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2364,19 +3336,37 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_56()) { if (jj_3R_56()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_57()) return true; if (jj_3R_57()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_52() { final private boolean jj_3R_52() {
if (jj_3R_69()) return true; if (jj_3R_69()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -2405,103 +3395,206 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2405,103 +3395,206 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_38()) { if (jj_3R_38()) {
jj_scanpos = xsp; jj_scanpos = xsp;
if (jj_3R_39()) return true; if (jj_3R_39()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; && jj_scanpos == jj_lastpos) {
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; && jj_scanpos == jj_lastpos) {
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return false;
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; } else if (jj_la == 0
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} else if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_28() { final private boolean jj_3R_28() {
if (jj_scan_token(ASSIGN)) return true; if (jj_scan_token(ASSIGN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_61() { final private boolean jj_3R_61() {
if (jj_scan_token(LPAREN)) return true; if (jj_scan_token(LPAREN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3_2() { final private boolean jj_3_2() {
if (jj_3R_20()) return true; if (jj_3R_20()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_21()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_21()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_20() { final private boolean jj_3R_20() {
if (jj_3R_26()) return true; if (jj_3R_26()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_27()) { jj_scanpos = xsp; break; } if (jj_3R_27()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
break;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
} }
return false; return false;
} }
final private boolean jj_3R_60() { final private boolean jj_3R_60() {
if (jj_scan_token(BANG)) return true; if (jj_scan_token(BANG)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_155() { final private boolean jj_3R_155() {
if (jj_scan_token(DECR)) return true; if (jj_scan_token(DECR)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_67() { final private boolean jj_3R_67() {
if (jj_3R_20()) return true; if (jj_3R_20()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_21()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_3R_25()) return true; return false;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
if (jj_3R_21()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_25()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_150() { final private boolean jj_3R_150() {
if (jj_scan_token(LPAREN)) return true; if (jj_scan_token(LPAREN)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
if (jj_3R_24()) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_24()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
Token xsp; Token xsp;
while (true) { while (true) {
xsp = jj_scanpos; xsp = jj_scanpos;
if (jj_3R_153()) { jj_scanpos = xsp; break; } if (jj_3R_153()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; jj_scanpos = xsp;
} break;
if (jj_scan_token(RPAREN)) return true; }
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; if (jj_la == 0 && jj_scanpos == jj_lastpos) {
if (jj_3R_136()) return true; return false;
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; }
}
if (jj_scan_token(RPAREN)) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
if (jj_3R_136()) {
return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_59() { final private boolean jj_3R_59() {
if (jj_scan_token(TILDE)) return true; if (jj_scan_token(TILDE)) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
final private boolean jj_3R_51() { final private boolean jj_3R_51() {
if (jj_3R_68()) return true; if (jj_3R_68()) {
if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; return true;
}
if (jj_la == 0 && jj_scanpos == jj_lastpos) {
return false;
}
return false; return false;
} }
...@@ -2512,13 +3605,28 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2512,13 +3605,28 @@ public class ExpressionParser implements ExpressionParserConstants {
private Token jj_scanpos, jj_lastpos; private Token jj_scanpos, jj_lastpos;
private int jj_la; private int jj_la;
public boolean lookingAhead = false; public boolean lookingAhead = false;
private boolean jj_semLA;
private int jj_gen; private int jj_gen;
final private int[] jj_la1 = new int[44]; final private int[] jj_la1 = new int[44];
final private int[] jj_la1_0 = {0x8209400,0x0,0x8209400,0x0,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x1000000,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x0,0x1000000,0x1000000,0x1000000,0x0,0x0,0x0,}; final private int[] jj_la1_0 = { 0x8209400, 0x0, 0x8209400, 0x0, 0x1000000,
final private int[] jj_la1_1 = {0x2014,0x0,0x2014,0x0,0x884480c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x884480c0,0x0,0x0,0x884480c0,0x884480c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x884480c0,0x0,0x88400080,0x400000,0x884480c0,0x0,0x0,0x40,}; 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
final private int[] jj_la1_2 = {0x8,0x400,0x0,0x2000,0xf00c004e,0x8000,0x100000,0x4000000,0x8000000,0x0,0x0,0x0,0x2400000,0x2400000,0x0,0x1830000,0x1830000,0x0,0x0,0xc0000000,0xc0000000,0x0,0x0,0xc0000000,0xf00c004e,0xc0000,0xc0000,0x4e,0xc004e,0x40,0x30000000,0x30000000,0x400,0x400,0x40,0x4440,0x4e,0x4440,0x6,0x0,0xf00c004e,0x2000,0x440,0x0,}; 0x0, 0x0, 0x0, 0x0, 0x0, 0x1000000, 0x0, 0x0, 0x1000000, 0x1000000,
final private int[] jj_la1_3 = {0x0,0x0,0x0,0x0,0x0,0xffe00,0x0,0x0,0x0,0x8,0x10,0x4,0x0,0x0,0x0,0x0,0x0,0x1c0,0x1c0,0x0,0x0,0x23,0x23,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1000000, 0x0, 0x1000000,
0x1000000, 0x1000000, 0x0, 0x0, 0x0, };
final private int[] jj_la1_1 = { 0x2014, 0x0, 0x2014, 0x0, 0x884480c0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x884480c0, 0x0, 0x0, 0x884480c0, 0x884480c0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x884480c0, 0x0, 0x88400080, 0x400000,
0x884480c0, 0x0, 0x0, 0x40, };
final private int[] jj_la1_2 = { 0x8, 0x400, 0x0, 0x2000, 0xf00c004e,
0x8000, 0x100000, 0x4000000, 0x8000000, 0x0, 0x0, 0x0, 0x2400000,
0x2400000, 0x0, 0x1830000, 0x1830000, 0x0, 0x0, 0xc0000000,
0xc0000000, 0x0, 0x0, 0xc0000000, 0xf00c004e, 0xc0000, 0xc0000, 0x4e,
0xc004e, 0x40, 0x30000000, 0x30000000, 0x400, 0x400, 0x40, 0x4440,
0x4e, 0x4440, 0x6, 0x0, 0xf00c004e, 0x2000, 0x440, 0x0, };
final private int[] jj_la1_3 = { 0x0, 0x0, 0x0, 0x0, 0x0, 0xffe00, 0x0, 0x0,
0x0, 0x8, 0x10, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c0, 0x1c0, 0x0, 0x0,
0x23, 0x23, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, };
final private JJExpressionParserCalls[] jj_2_rtns = new JJExpressionParserCalls[9]; final private JJExpressionParserCalls[] jj_2_rtns = new JJExpressionParserCalls[9];
private boolean jj_rescan = false; private boolean jj_rescan = false;
private int jj_gc = 0; private int jj_gc = 0;
...@@ -2529,8 +3637,12 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2529,8 +3637,12 @@ public class ExpressionParser implements ExpressionParserConstants {
token = new Token(); token = new Token();
jj_ntk = -1; jj_ntk = -1;
jj_gen = 0; jj_gen = 0;
for (int i = 0; i < 44; i++) jj_la1[i] = -1; for (int i = 0; i < 44; i++) {
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJExpressionParserCalls(); jj_la1[i] = -1;
}
for (int i = 0; i < jj_2_rtns.length; i++) {
jj_2_rtns[i] = new JJExpressionParserCalls();
}
} }
public void ReInit(java.io.InputStream stream) { public void ReInit(java.io.InputStream stream) {
...@@ -2539,8 +3651,12 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2539,8 +3651,12 @@ public class ExpressionParser implements ExpressionParserConstants {
token = new Token(); token = new Token();
jj_ntk = -1; jj_ntk = -1;
jj_gen = 0; jj_gen = 0;
for (int i = 0; i < 44; i++) jj_la1[i] = -1; for (int i = 0; i < 44; i++) {
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJExpressionParserCalls(); jj_la1[i] = -1;
}
for (int i = 0; i < jj_2_rtns.length; i++) {
jj_2_rtns[i] = new JJExpressionParserCalls();
}
} }
public ExpressionParser(ExpressionParserTokenManager tm) { public ExpressionParser(ExpressionParserTokenManager tm) {
...@@ -2548,8 +3664,12 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2548,8 +3664,12 @@ public class ExpressionParser implements ExpressionParserConstants {
token = new Token(); token = new Token();
jj_ntk = -1; jj_ntk = -1;
jj_gen = 0; jj_gen = 0;
for (int i = 0; i < 44; i++) jj_la1[i] = -1; for (int i = 0; i < 44; i++) {
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJExpressionParserCalls(); jj_la1[i] = -1;
}
for (int i = 0; i < jj_2_rtns.length; i++) {
jj_2_rtns[i] = new JJExpressionParserCalls();
}
} }
public void ReInit(ExpressionParserTokenManager tm) { public void ReInit(ExpressionParserTokenManager tm) {
...@@ -2557,23 +3677,32 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2557,23 +3677,32 @@ public class ExpressionParser implements ExpressionParserConstants {
token = new Token(); token = new Token();
jj_ntk = -1; jj_ntk = -1;
jj_gen = 0; jj_gen = 0;
for (int i = 0; i < 44; i++) jj_la1[i] = -1; for (int i = 0; i < 44; i++) {
for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJExpressionParserCalls(); jj_la1[i] = -1;
}
for (int i = 0; i < jj_2_rtns.length; i++) {
jj_2_rtns[i] = new JJExpressionParserCalls();
}
} }
final private Token jj_consume_token(int kind) throws ParseException { final private Token jj_consume_token(int kind) throws ParseException {
Token oldToken; Token oldToken;
if ((oldToken = token).next != null) token = token.next; if ((oldToken = token).next != null) {
else token = token.next = token_source.getNextToken(); token = token.next;
} else {
token = token.next = token_source.getNextToken();
}
jj_ntk = -1; jj_ntk = -1;
if (token.kind == kind) { if (token.kind == kind) {
jj_gen++; jj_gen++;
if (++jj_gc > 100) { if (++jj_gc > 100) {
jj_gc = 0; jj_gc = 0;
for (int i = 0; i < jj_2_rtns.length; i++) { for (JJExpressionParserCalls jj_2_rtn : jj_2_rtns) {
JJExpressionParserCalls c = jj_2_rtns[i]; JJExpressionParserCalls c = jj_2_rtn;
while (c != null) { while (c != null) {
if (c.gen < jj_gen) c.first = null; if (c.gen < jj_gen) {
c.first = null;
}
c = c.next; c = c.next;
} }
} }
...@@ -2589,7 +3718,8 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2589,7 +3718,8 @@ public class ExpressionParser implements ExpressionParserConstants {
if (jj_scanpos == jj_lastpos) { if (jj_scanpos == jj_lastpos) {
jj_la--; jj_la--;
if (jj_scanpos.next == null) { if (jj_scanpos.next == null) {
jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); jj_lastpos = jj_scanpos = jj_scanpos.next = token_source
.getNextToken();
} else { } else {
jj_lastpos = jj_scanpos = jj_scanpos.next; jj_lastpos = jj_scanpos = jj_scanpos.next;
} }
...@@ -2597,16 +3727,25 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2597,16 +3727,25 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_scanpos = jj_scanpos.next; jj_scanpos = jj_scanpos.next;
} }
if (jj_rescan) { if (jj_rescan) {
int i = 0; Token tok = token; int i = 0;
while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } Token tok = token;
if (tok != null) jj_add_error_token(kind, i); while (tok != null && tok != jj_scanpos) {
i++;
tok = tok.next;
}
if (tok != null) {
jj_add_error_token(kind, i);
}
} }
return (jj_scanpos.kind != kind); return (jj_scanpos.kind != kind);
} }
final public Token getNextToken() { final public Token getNextToken() {
if (token.next != null) token = token.next; if (token.next != null) {
else token = token.next = token_source.getNextToken(); token = token.next;
} else {
token = token.next = token_source.getNextToken();
}
jj_ntk = -1; jj_ntk = -1;
jj_gen++; jj_gen++;
return token; return token;
...@@ -2615,27 +3754,33 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2615,27 +3754,33 @@ public class ExpressionParser implements ExpressionParserConstants {
final public Token getToken(int index) { final public Token getToken(int index) {
Token t = lookingAhead ? jj_scanpos : token; Token t = lookingAhead ? jj_scanpos : token;
for (int i = 0; i < index; i++) { for (int i = 0; i < index; i++) {
if (t.next != null) t = t.next; if (t.next != null) {
else t = t.next = token_source.getNextToken(); t = t.next;
} else {
t = t.next = token_source.getNextToken();
}
} }
return t; return t;
} }
final private int jj_ntk() { final private int jj_ntk() {
if ((jj_nt=token.next) == null) if ((jj_nt = token.next) == null) {
return (jj_ntk = (token.next=token_source.getNextToken()).kind); return (jj_ntk = (token.next=token_source.getNextToken()).kind);
else } else {
return (jj_ntk = jj_nt.kind); return (jj_ntk = jj_nt.kind);
} }
}
private java.util.Vector jj_expentries = new java.util.Vector(); private java.util.Vector<int[]> jj_expentries = new java.util.Vector<int[]>();
private int[] jj_expentry; private int[] jj_expentry;
private int jj_kind = -1; private int jj_kind = -1;
private int[] jj_lasttokens = new int[100]; private int[] jj_lasttokens = new int[100];
private int jj_endpos; private int jj_endpos;
private void jj_add_error_token(int kind, int pos) { private void jj_add_error_token(int kind, int pos) {
if (pos >= 100) return; if (pos >= 100) {
return;
}
if (pos == jj_endpos + 1) { if (pos == jj_endpos + 1) {
jj_lasttokens[jj_endpos++] = kind; jj_lasttokens[jj_endpos++] = kind;
} else if (jj_endpos != 0) { } else if (jj_endpos != 0) {
...@@ -2644,8 +3789,9 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2644,8 +3789,9 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_expentry[i] = jj_lasttokens[i]; jj_expentry[i] = jj_lasttokens[i];
} }
boolean exists = false; boolean exists = false;
for (java.util.Enumeration enum_ = jj_expentries.elements(); enum_.hasMoreElements();) { for (java.util.Enumeration<int[]> enum_ = jj_expentries.elements(); enum_
int[] oldentry = (int[])(enum_.nextElement()); .hasMoreElements();) {
int[] oldentry = (enum_.nextElement());
if (oldentry.length == jj_expentry.length) { if (oldentry.length == jj_expentry.length) {
exists = true; exists = true;
for (int i = 0; i < jj_expentry.length; i++) { for (int i = 0; i < jj_expentry.length; i++) {
...@@ -2654,11 +3800,17 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2654,11 +3800,17 @@ public class ExpressionParser implements ExpressionParserConstants {
break; break;
} }
} }
if (exists) break; if (exists) {
} break;
} }
if (!exists) jj_expentries.addElement(jj_expentry); }
if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; }
if (!exists) {
jj_expentries.addElement(jj_expentry);
}
if (pos != 0) {
jj_lasttokens[(jj_endpos = pos) - 1] = kind;
}
} }
} }
...@@ -2702,7 +3854,7 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2702,7 +3854,7 @@ public class ExpressionParser implements ExpressionParserConstants {
jj_add_error_token(0, 0); jj_add_error_token(0, 0);
int[][] exptokseq = new int[jj_expentries.size()][]; int[][] exptokseq = new int[jj_expentries.size()][];
for (int i = 0; i < jj_expentries.size(); i++) { for (int i = 0; i < jj_expentries.size(); i++) {
exptokseq[i] = (int[])jj_expentries.elementAt(i); exptokseq[i] = jj_expentries.elementAt(i);
} }
return new ParseException(token, exptokseq, tokenImage); return new ParseException(token, exptokseq, tokenImage);
} }
...@@ -2719,17 +3871,36 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2719,17 +3871,36 @@ public class ExpressionParser implements ExpressionParserConstants {
JJExpressionParserCalls p = jj_2_rtns[i]; JJExpressionParserCalls p = jj_2_rtns[i];
do { do {
if (p.gen > jj_gen) { if (p.gen > jj_gen) {
jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; jj_la = p.arg;
jj_lastpos = jj_scanpos = p.first;
switch (i) { switch (i) {
case 0: jj_3_1(); break; case 0:
case 1: jj_3_2(); break; jj_3_1();
case 2: jj_3_3(); break; break;
case 3: jj_3_4(); break; case 1:
case 4: jj_3_5(); break; jj_3_2();
case 5: jj_3_6(); break; break;
case 6: jj_3_7(); break; case 2:
case 7: jj_3_8(); break; jj_3_3();
case 8: jj_3_9(); break; break;
case 3:
jj_3_4();
break;
case 4:
jj_3_5();
break;
case 5:
jj_3_6();
break;
case 6:
jj_3_7();
break;
case 7:
jj_3_8();
break;
case 8:
jj_3_9();
break;
} }
} }
p = p.next; p = p.next;
...@@ -2741,10 +3912,15 @@ public class ExpressionParser implements ExpressionParserConstants { ...@@ -2741,10 +3912,15 @@ public class ExpressionParser implements ExpressionParserConstants {
final private void jj_save(int index, int xla) { final private void jj_save(int index, int xla) {
JJExpressionParserCalls p = jj_2_rtns[index]; JJExpressionParserCalls p = jj_2_rtns[index];
while (p.gen > jj_gen) { while (p.gen > jj_gen) {
if (p.next == null) { p = p.next = new JJExpressionParserCalls(); break; } if (p.next == null) {
p = p.next = new JJExpressionParserCalls();
break;
}
p = p.next; p = p.next;
} }
p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; p.gen = jj_gen + xla - jj_la;
p.first = token;
p.arg = xla;
} }
} }
......
...@@ -25,10 +25,6 @@ ...@@ -25,10 +25,6 @@
/* Generated By:JavaCC: Do not edit this line. ExpressionParserTokenManager.java */ /* Generated By:JavaCC: Do not edit this line. ExpressionParserTokenManager.java */
package com.sun.tools.example.debug.expr; package com.sun.tools.example.debug.expr;
import com.sun.jdi.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
public class ExpressionParserTokenManager implements ExpressionParserConstants public class ExpressionParserTokenManager implements ExpressionParserConstants
{ {
...@@ -37,15 +33,17 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) ...@@ -37,15 +33,17 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
switch (pos) switch (pos)
{ {
case 0: case 0:
if ((active1 & 0x4000L) != 0L) if ((active1 & 0x4000L) != 0L) {
return 4; return 4;
}
if ((active0 & 0x7fffffffffffe00L) != 0L) if ((active0 & 0x7fffffffffffe00L) != 0L)
{ {
jjmatchedKind = 67; jjmatchedKind = 67;
return 28; return 28;
} }
if ((active1 & 0x100200000000L) != 0L) if ((active1 & 0x100200000000L) != 0L) {
return 49; return 49;
}
return -1; return -1;
case 1: case 1:
if ((active0 & 0x7ffffffbfcffe00L) != 0L) if ((active0 & 0x7ffffffbfcffe00L) != 0L)
...@@ -57,8 +55,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) ...@@ -57,8 +55,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
} }
return 28; return 28;
} }
if ((active0 & 0x40300000L) != 0L) if ((active0 & 0x40300000L) != 0L) {
return 28; return 28;
}
return -1; return -1;
case 2: case 2:
if ((active0 & 0x77fffb3afeffe00L) != 0L) if ((active0 & 0x77fffb3afeffe00L) != 0L)
...@@ -70,8 +69,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) ...@@ -70,8 +69,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
} }
return 28; return 28;
} }
if ((active0 & 0x80004c10000000L) != 0L) if ((active0 & 0x80004c10000000L) != 0L) {
return 28; return 28;
}
return -1; return -1;
case 3: case 3:
if ((active0 & 0x63bff2b8faf4e00L) != 0L) if ((active0 & 0x63bff2b8faf4e00L) != 0L)
...@@ -80,8 +80,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) ...@@ -80,8 +80,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
jjmatchedPos = 3; jjmatchedPos = 3;
return 28; return 28;
} }
if ((active0 & 0x14400902040b000L) != 0L) if ((active0 & 0x14400902040b000L) != 0L) {
return 28; return 28;
}
return -1; return -1;
case 4: case 4:
if ((active0 & 0x2235f2b80ac0600L) != 0L) if ((active0 & 0x2235f2b80ac0600L) != 0L)
...@@ -93,8 +94,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) ...@@ -93,8 +94,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
} }
return 28; return 28;
} }
if ((active0 & 0x418a0000f034800L) != 0L) if ((active0 & 0x418a0000f034800L) != 0L) {
return 28; return 28;
}
return -1; return -1;
case 5: case 5:
if ((active0 & 0x222070a848c0600L) != 0L) if ((active0 & 0x222070a848c0600L) != 0L)
...@@ -103,8 +105,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) ...@@ -103,8 +105,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
jjmatchedPos = 5; jjmatchedPos = 5;
return 28; return 28;
} }
if ((active0 & 0x11582100200000L) != 0L) if ((active0 & 0x11582100200000L) != 0L) {
return 28; return 28;
}
return -1; return -1;
case 6: case 6:
if ((active0 & 0x222040a80040200L) != 0L) if ((active0 & 0x222040a80040200L) != 0L)
...@@ -113,8 +116,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) ...@@ -113,8 +116,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
jjmatchedPos = 6; jjmatchedPos = 6;
return 28; return 28;
} }
if ((active0 & 0x30004880400L) != 0L) if ((active0 & 0x30004880400L) != 0L) {
return 28; return 28;
}
return -1; return -1;
case 7: case 7:
if ((active0 & 0x22040a80000000L) != 0L) if ((active0 & 0x22040a80000000L) != 0L)
...@@ -123,8 +127,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) ...@@ -123,8 +127,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
jjmatchedPos = 7; jjmatchedPos = 7;
return 28; return 28;
} }
if ((active0 & 0x200000000040200L) != 0L) if ((active0 & 0x200000000040200L) != 0L) {
return 28; return 28;
}
return -1; return -1;
case 8: case 8:
if ((active0 & 0x2000280000000L) != 0L) if ((active0 & 0x2000280000000L) != 0L)
...@@ -133,8 +138,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) ...@@ -133,8 +138,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
jjmatchedPos = 8; jjmatchedPos = 8;
return 28; return 28;
} }
if ((active0 & 0x20040800000000L) != 0L) if ((active0 & 0x20040800000000L) != 0L) {
return 28; return 28;
}
return -1; return -1;
case 9: case 9:
if ((active0 & 0x2000000000000L) != 0L) if ((active0 & 0x2000000000000L) != 0L)
...@@ -143,8 +149,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) ...@@ -143,8 +149,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
jjmatchedPos = 9; jjmatchedPos = 9;
return 28; return 28;
} }
if ((active0 & 0x280000000L) != 0L) if ((active0 & 0x280000000L) != 0L) {
return 28; return 28;
}
return -1; return -1;
case 10: case 10:
if ((active0 & 0x2000000000000L) != 0L) if ((active0 & 0x2000000000000L) != 0L)
...@@ -286,16 +293,19 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1) ...@@ -286,16 +293,19 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1)
switch(curChar) switch(curChar)
{ {
case 38: case 38:
if ((active1 & 0x8000000L) != 0L) if ((active1 & 0x8000000L) != 0L) {
return jjStopAtPos(1, 91); return jjStopAtPos(1, 91);
}
break; break;
case 43: case 43:
if ((active1 & 0x10000000L) != 0L) if ((active1 & 0x10000000L) != 0L) {
return jjStopAtPos(1, 92); return jjStopAtPos(1, 92);
}
break; break;
case 45: case 45:
if ((active1 & 0x20000000L) != 0L) if ((active1 & 0x20000000L) != 0L) {
return jjStopAtPos(1, 93); return jjStopAtPos(1, 93);
}
break; break;
case 60: case 60:
if ((active1 & 0x4000000000L) != 0L) if ((active1 & 0x4000000000L) != 0L)
...@@ -305,30 +315,31 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1) ...@@ -305,30 +315,31 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1)
} }
return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x2000000000000L); return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x2000000000000L);
case 61: case 61:
if ((active1 & 0x400000L) != 0L) if ((active1 & 0x400000L) != 0L) {
return jjStopAtPos(1, 86); return jjStopAtPos(1, 86);
else if ((active1 & 0x800000L) != 0L) } else if ((active1 & 0x800000L) != 0L) {
return jjStopAtPos(1, 87); return jjStopAtPos(1, 87);
else if ((active1 & 0x1000000L) != 0L) } else if ((active1 & 0x1000000L) != 0L) {
return jjStopAtPos(1, 88); return jjStopAtPos(1, 88);
else if ((active1 & 0x2000000L) != 0L) } else if ((active1 & 0x2000000L) != 0L) {
return jjStopAtPos(1, 89); return jjStopAtPos(1, 89);
else if ((active1 & 0x20000000000L) != 0L) } else if ((active1 & 0x20000000000L) != 0L) {
return jjStopAtPos(1, 105); return jjStopAtPos(1, 105);
else if ((active1 & 0x40000000000L) != 0L) } else if ((active1 & 0x40000000000L) != 0L) {
return jjStopAtPos(1, 106); return jjStopAtPos(1, 106);
else if ((active1 & 0x80000000000L) != 0L) } else if ((active1 & 0x80000000000L) != 0L) {
return jjStopAtPos(1, 107); return jjStopAtPos(1, 107);
else if ((active1 & 0x100000000000L) != 0L) } else if ((active1 & 0x100000000000L) != 0L) {
return jjStopAtPos(1, 108); return jjStopAtPos(1, 108);
else if ((active1 & 0x200000000000L) != 0L) } else if ((active1 & 0x200000000000L) != 0L) {
return jjStopAtPos(1, 109); return jjStopAtPos(1, 109);
else if ((active1 & 0x400000000000L) != 0L) } else if ((active1 & 0x400000000000L) != 0L) {
return jjStopAtPos(1, 110); return jjStopAtPos(1, 110);
else if ((active1 & 0x800000000000L) != 0L) } else if ((active1 & 0x800000000000L) != 0L) {
return jjStopAtPos(1, 111); return jjStopAtPos(1, 111);
else if ((active1 & 0x1000000000000L) != 0L) } else if ((active1 & 0x1000000000000L) != 0L) {
return jjStopAtPos(1, 112); return jjStopAtPos(1, 112);
}
break; break;
case 62: case 62:
if ((active1 & 0x8000000000L) != 0L) if ((active1 & 0x8000000000L) != 0L)
...@@ -344,8 +355,9 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1) ...@@ -344,8 +355,9 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1)
case 101: case 101:
return jjMoveStringLiteralDfa2_0(active0, 0x104000080000L, active1, 0L); return jjMoveStringLiteralDfa2_0(active0, 0x104000080000L, active1, 0L);
case 102: case 102:
if ((active0 & 0x40000000L) != 0L) if ((active0 & 0x40000000L) != 0L) {
return jjStartNfaWithStates_0(1, 30, 28); return jjStartNfaWithStates_0(1, 30, 28);
}
break; break;
case 104: case 104:
return jjMoveStringLiteralDfa2_0(active0, 0x41c200000008000L, active1, 0L); return jjMoveStringLiteralDfa2_0(active0, 0x41c200000008000L, active1, 0L);
...@@ -377,8 +389,9 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1) ...@@ -377,8 +389,9 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1)
case 121: case 121:
return jjMoveStringLiteralDfa2_0(active0, 0x2000000001000L, active1, 0L); return jjMoveStringLiteralDfa2_0(active0, 0x2000000001000L, active1, 0L);
case 124: case 124:
if ((active1 & 0x4000000L) != 0L) if ((active1 & 0x4000000L) != 0L) {
return jjStopAtPos(1, 90); return jjStopAtPos(1, 90);
}
break; break;
default : default :
break; break;
...@@ -387,8 +400,9 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1) ...@@ -387,8 +400,9 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1)
} }
private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1) private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1)
{ {
if (((active0 &= old0) | (active1 &= old1)) == 0L) if (((active0 &= old0) | (active1 &= old1)) == 0L) {
return jjStartNfa_0(0, old0, old1); return jjStartNfa_0(0, old0, old1);
}
try { curChar = input_stream.readChar(); } try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(1, active0, active1); jjStopStringLiteralDfa_0(1, active0, active1);
...@@ -397,10 +411,11 @@ private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, ...@@ -397,10 +411,11 @@ private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1,
switch(curChar) switch(curChar)
{ {
case 61: case 61:
if ((active1 & 0x2000000000000L) != 0L) if ((active1 & 0x2000000000000L) != 0L) {
return jjStopAtPos(2, 113); return jjStopAtPos(2, 113);
else if ((active1 & 0x4000000000000L) != 0L) } else if ((active1 & 0x4000000000000L) != 0L) {
return jjStopAtPos(2, 114); return jjStopAtPos(2, 114);
}
break; break;
case 62: case 62:
if ((active1 & 0x10000000000L) != 0L) if ((active1 & 0x10000000000L) != 0L)
...@@ -430,8 +445,9 @@ private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, ...@@ -430,8 +445,9 @@ private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1,
case 112: case 112:
return jjMoveStringLiteralDfa3_0(active0, 0x800180000000L, active1, 0L); return jjMoveStringLiteralDfa3_0(active0, 0x800180000000L, active1, 0L);
case 114: case 114:
if ((active0 & 0x10000000L) != 0L) if ((active0 & 0x10000000L) != 0L) {
return jjStartNfaWithStates_0(2, 28, 28); return jjStartNfaWithStates_0(2, 28, 28);
}
return jjMoveStringLiteralDfa3_0(active0, 0x18000000000000L, active1, 0L); return jjMoveStringLiteralDfa3_0(active0, 0x18000000000000L, active1, 0L);
case 115: case 115:
return jjMoveStringLiteralDfa3_0(active0, 0x200402200L, active1, 0L); return jjMoveStringLiteralDfa3_0(active0, 0x200402200L, active1, 0L);
...@@ -445,12 +461,14 @@ private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, ...@@ -445,12 +461,14 @@ private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1,
case 117: case 117:
return jjMoveStringLiteralDfa3_0(active0, 0x40000000200000L, active1, 0L); return jjMoveStringLiteralDfa3_0(active0, 0x40000000200000L, active1, 0L);
case 119: case 119:
if ((active0 & 0x4000000000L) != 0L) if ((active0 & 0x4000000000L) != 0L) {
return jjStartNfaWithStates_0(2, 38, 28); return jjStartNfaWithStates_0(2, 38, 28);
}
break; break;
case 121: case 121:
if ((active0 & 0x80000000000000L) != 0L) if ((active0 & 0x80000000000000L) != 0L) {
return jjStartNfaWithStates_0(2, 55, 28); return jjStartNfaWithStates_0(2, 55, 28);
}
break; break;
default : default :
break; break;
...@@ -459,8 +477,9 @@ private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, ...@@ -459,8 +477,9 @@ private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1,
} }
private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1) private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1)
{ {
if (((active0 &= old0) | (active1 &= old1)) == 0L) if (((active0 &= old0) | (active1 &= old1)) == 0L) {
return jjStartNfa_0(1, old0, old1); return jjStartNfa_0(1, old0, old1);
}
try { curChar = input_stream.readChar(); } try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(2, active0, active1); jjStopStringLiteralDfa_0(2, active0, active1);
...@@ -469,8 +488,9 @@ private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, ...@@ -469,8 +488,9 @@ private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1,
switch(curChar) switch(curChar)
{ {
case 61: case 61:
if ((active1 & 0x8000000000000L) != 0L) if ((active1 & 0x8000000000000L) != 0L) {
return jjStopAtPos(3, 115); return jjStopAtPos(3, 115);
}
break; break;
case 97: case 97:
return jjMoveStringLiteralDfa4_0(active0, 0x20000000e080800L, active1, 0L); return jjMoveStringLiteralDfa4_0(active0, 0x20000000e080800L, active1, 0L);
...@@ -479,44 +499,51 @@ private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, ...@@ -479,44 +499,51 @@ private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1,
case 99: case 99:
return jjMoveStringLiteralDfa4_0(active0, 0x2000000004000L, active1, 0L); return jjMoveStringLiteralDfa4_0(active0, 0x2000000004000L, active1, 0L);
case 100: case 100:
if ((active0 & 0x100000000000000L) != 0L) if ((active0 & 0x100000000000000L) != 0L) {
return jjStartNfaWithStates_0(3, 56, 28); return jjStartNfaWithStates_0(3, 56, 28);
}
break; break;
case 101: case 101:
if ((active0 & 0x1000L) != 0L) if ((active0 & 0x1000L) != 0L) {
return jjStartNfaWithStates_0(3, 12, 28); return jjStartNfaWithStates_0(3, 12, 28);
else if ((active0 & 0x2000L) != 0L) } else if ((active0 & 0x2000L) != 0L) {
return jjStartNfaWithStates_0(3, 13, 28); return jjStartNfaWithStates_0(3, 13, 28);
else if ((active0 & 0x400000L) != 0L) } else if ((active0 & 0x400000L) != 0L) {
return jjStartNfaWithStates_0(3, 22, 28); return jjStartNfaWithStates_0(3, 22, 28);
else if ((active0 & 0x40000000000000L) != 0L) } else if ((active0 & 0x40000000000000L) != 0L) {
return jjStartNfaWithStates_0(3, 54, 28); return jjStartNfaWithStates_0(3, 54, 28);
}
return jjMoveStringLiteralDfa4_0(active0, 0x800800800000L, active1, 0L); return jjMoveStringLiteralDfa4_0(active0, 0x800800800000L, active1, 0L);
case 103: case 103:
if ((active0 & 0x1000000000L) != 0L) if ((active0 & 0x1000000000L) != 0L) {
return jjStartNfaWithStates_0(3, 36, 28); return jjStartNfaWithStates_0(3, 36, 28);
}
break; break;
case 105: case 105:
return jjMoveStringLiteralDfa4_0(active0, 0x2000000000L, active1, 0L); return jjMoveStringLiteralDfa4_0(active0, 0x2000000000L, active1, 0L);
case 107: case 107:
return jjMoveStringLiteralDfa4_0(active0, 0x10000000000L, active1, 0L); return jjMoveStringLiteralDfa4_0(active0, 0x10000000000L, active1, 0L);
case 108: case 108:
if ((active0 & 0x8000000000L) != 0L) if ((active0 & 0x8000000000L) != 0L) {
return jjStartNfaWithStates_0(3, 39, 28); return jjStartNfaWithStates_0(3, 39, 28);
}
return jjMoveStringLiteralDfa4_0(active0, 0x400080080000400L, active1, 0L); return jjMoveStringLiteralDfa4_0(active0, 0x400080080000400L, active1, 0L);
case 110: case 110:
return jjMoveStringLiteralDfa4_0(active0, 0x20000000000000L, active1, 0L); return jjMoveStringLiteralDfa4_0(active0, 0x20000000000000L, active1, 0L);
case 111: case 111:
if ((active0 & 0x20000000L) != 0L) if ((active0 & 0x20000000L) != 0L) {
return jjStartNfaWithStates_0(3, 29, 28); return jjStartNfaWithStates_0(3, 29, 28);
}
return jjMoveStringLiteralDfa4_0(active0, 0x18000100000000L, active1, 0L); return jjMoveStringLiteralDfa4_0(active0, 0x18000100000000L, active1, 0L);
case 114: case 114:
if ((active0 & 0x8000L) != 0L) if ((active0 & 0x8000L) != 0L) {
return jjStartNfaWithStates_0(3, 15, 28); return jjStartNfaWithStates_0(3, 15, 28);
}
return jjMoveStringLiteralDfa4_0(active0, 0x200000000000L, active1, 0L); return jjMoveStringLiteralDfa4_0(active0, 0x200000000000L, active1, 0L);
case 115: case 115:
if ((active0 & 0x4000000000000L) != 0L) if ((active0 & 0x4000000000000L) != 0L) {
return jjStartNfaWithStates_0(3, 50, 28); return jjStartNfaWithStates_0(3, 50, 28);
}
return jjMoveStringLiteralDfa4_0(active0, 0x1030000L, active1, 0L); return jjMoveStringLiteralDfa4_0(active0, 0x1030000L, active1, 0L);
case 116: case 116:
return jjMoveStringLiteralDfa4_0(active0, 0x1440200040200L, active1, 0L); return jjMoveStringLiteralDfa4_0(active0, 0x1440200040200L, active1, 0L);
...@@ -531,8 +558,9 @@ private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, ...@@ -531,8 +558,9 @@ private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1,
} }
private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1) private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1)
{ {
if (((active0 &= old0) | (active1 &= old1)) == 0L) if (((active0 &= old0) | (active1 &= old1)) == 0L) {
return jjStartNfa_0(2, old0, old1); return jjStartNfa_0(2, old0, old1);
}
try { curChar = input_stream.readChar(); } try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(3, active0, 0L); jjStopStringLiteralDfa_0(3, active0, 0L);
...@@ -545,20 +573,23 @@ private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, ...@@ -545,20 +573,23 @@ private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1,
case 99: case 99:
return jjMoveStringLiteralDfa5_0(active0, 0x1000000000000L); return jjMoveStringLiteralDfa5_0(active0, 0x1000000000000L);
case 101: case 101:
if ((active0 & 0x1000000L) != 0L) if ((active0 & 0x1000000L) != 0L) {
return jjStartNfaWithStates_0(4, 24, 28); return jjStartNfaWithStates_0(4, 24, 28);
else if ((active0 & 0x400000000000000L) != 0L) } else if ((active0 & 0x400000000000000L) != 0L) {
return jjStartNfaWithStates_0(4, 58, 28); return jjStartNfaWithStates_0(4, 58, 28);
}
return jjMoveStringLiteralDfa5_0(active0, 0x40080000400L); return jjMoveStringLiteralDfa5_0(active0, 0x40080000400L);
case 104: case 104:
if ((active0 & 0x4000L) != 0L) if ((active0 & 0x4000L) != 0L) {
return jjStartNfaWithStates_0(4, 14, 28); return jjStartNfaWithStates_0(4, 14, 28);
}
return jjMoveStringLiteralDfa5_0(active0, 0x2000000000000L); return jjMoveStringLiteralDfa5_0(active0, 0x2000000000000L);
case 105: case 105:
return jjMoveStringLiteralDfa5_0(active0, 0x480000040000L); return jjMoveStringLiteralDfa5_0(active0, 0x480000040000L);
case 107: case 107:
if ((active0 & 0x800L) != 0L) if ((active0 & 0x800L) != 0L) {
return jjStartNfaWithStates_0(4, 11, 28); return jjStartNfaWithStates_0(4, 11, 28);
}
break; break;
case 108: case 108:
if ((active0 & 0x2000000L) != 0L) if ((active0 & 0x2000000L) != 0L)
...@@ -570,20 +601,23 @@ private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, ...@@ -570,20 +601,23 @@ private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1,
case 110: case 110:
return jjMoveStringLiteralDfa5_0(active0, 0x800000L); return jjMoveStringLiteralDfa5_0(active0, 0x800000L);
case 114: case 114:
if ((active0 & 0x800000000000L) != 0L) if ((active0 & 0x800000000000L) != 0L) {
return jjStartNfaWithStates_0(4, 47, 28); return jjStartNfaWithStates_0(4, 47, 28);
}
return jjMoveStringLiteralDfa5_0(active0, 0x100900000200L); return jjMoveStringLiteralDfa5_0(active0, 0x100900000200L);
case 115: case 115:
if ((active0 & 0x10000L) != 0L) if ((active0 & 0x10000L) != 0L) {
return jjStartNfaWithStates_0(4, 16, 28); return jjStartNfaWithStates_0(4, 16, 28);
}
return jjMoveStringLiteralDfa5_0(active0, 0x20000000000000L); return jjMoveStringLiteralDfa5_0(active0, 0x20000000000000L);
case 116: case 116:
if ((active0 & 0x20000L) != 0L) if ((active0 & 0x20000L) != 0L) {
return jjStartNfaWithStates_0(4, 17, 28); return jjStartNfaWithStates_0(4, 17, 28);
else if ((active0 & 0x8000000L) != 0L) } else if ((active0 & 0x8000000L) != 0L) {
return jjStartNfaWithStates_0(4, 27, 28); return jjStartNfaWithStates_0(4, 27, 28);
else if ((active0 & 0x200000000000L) != 0L) } else if ((active0 & 0x200000000000L) != 0L) {
return jjStartNfaWithStates_0(4, 45, 28); return jjStartNfaWithStates_0(4, 45, 28);
}
return jjMoveStringLiteralDfa5_0(active0, 0x200000000000000L); return jjMoveStringLiteralDfa5_0(active0, 0x200000000000000L);
case 117: case 117:
return jjMoveStringLiteralDfa5_0(active0, 0x80000L); return jjMoveStringLiteralDfa5_0(active0, 0x80000L);
...@@ -603,8 +637,9 @@ private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, ...@@ -603,8 +637,9 @@ private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1,
} }
private final int jjMoveStringLiteralDfa5_0(long old0, long active0) private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
{ {
if (((active0 &= old0)) == 0L) if (((active0 &= old0)) == 0L) {
return jjStartNfa_0(3, old0, 0L); return jjStartNfa_0(3, old0, 0L);
}
try { curChar = input_stream.readChar(); } try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(4, active0, 0L); jjStopStringLiteralDfa_0(4, active0, 0L);
...@@ -615,26 +650,29 @@ private final int jjMoveStringLiteralDfa5_0(long old0, long active0) ...@@ -615,26 +650,29 @@ private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
case 97: case 97:
return jjMoveStringLiteralDfa6_0(active0, 0x600L); return jjMoveStringLiteralDfa6_0(active0, 0x600L);
case 99: case 99:
if ((active0 & 0x80000000000L) != 0L) if ((active0 & 0x80000000000L) != 0L) {
return jjStartNfaWithStates_0(5, 43, 28); return jjStartNfaWithStates_0(5, 43, 28);
else if ((active0 & 0x400000000000L) != 0L) } else if ((active0 & 0x400000000000L) != 0L) {
return jjStartNfaWithStates_0(5, 46, 28); return jjStartNfaWithStates_0(5, 46, 28);
}
return jjMoveStringLiteralDfa6_0(active0, 0x40000000000L); return jjMoveStringLiteralDfa6_0(active0, 0x40000000000L);
case 100: case 100:
return jjMoveStringLiteralDfa6_0(active0, 0x800000L); return jjMoveStringLiteralDfa6_0(active0, 0x800000L);
case 101: case 101:
if ((active0 & 0x200000L) != 0L) if ((active0 & 0x200000L) != 0L) {
return jjStartNfaWithStates_0(5, 21, 28); return jjStartNfaWithStates_0(5, 21, 28);
else if ((active0 & 0x2000000000L) != 0L) } else if ((active0 & 0x2000000000L) != 0L) {
return jjStartNfaWithStates_0(5, 37, 28); return jjStartNfaWithStates_0(5, 37, 28);
}
break; break;
case 102: case 102:
return jjMoveStringLiteralDfa6_0(active0, 0x800000000L); return jjMoveStringLiteralDfa6_0(active0, 0x800000000L);
case 103: case 103:
return jjMoveStringLiteralDfa6_0(active0, 0x10000000000L); return jjMoveStringLiteralDfa6_0(active0, 0x10000000000L);
case 104: case 104:
if ((active0 & 0x1000000000000L) != 0L) if ((active0 & 0x1000000000000L) != 0L) {
return jjStartNfaWithStates_0(5, 48, 28); return jjStartNfaWithStates_0(5, 48, 28);
}
break; break;
case 105: case 105:
return jjMoveStringLiteralDfa6_0(active0, 0x220000000000000L); return jjMoveStringLiteralDfa6_0(active0, 0x220000000000000L);
...@@ -643,18 +681,21 @@ private final int jjMoveStringLiteralDfa5_0(long old0, long active0) ...@@ -643,18 +681,21 @@ private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
case 109: case 109:
return jjMoveStringLiteralDfa6_0(active0, 0x80000000L); return jjMoveStringLiteralDfa6_0(active0, 0x80000000L);
case 110: case 110:
if ((active0 & 0x100000000000L) != 0L) if ((active0 & 0x100000000000L) != 0L) {
return jjStartNfaWithStates_0(5, 44, 28); return jjStartNfaWithStates_0(5, 44, 28);
}
return jjMoveStringLiteralDfa6_0(active0, 0x200040000L); return jjMoveStringLiteralDfa6_0(active0, 0x200040000L);
case 114: case 114:
return jjMoveStringLiteralDfa6_0(active0, 0x2000000000000L); return jjMoveStringLiteralDfa6_0(active0, 0x2000000000000L);
case 115: case 115:
if ((active0 & 0x10000000000000L) != 0L) if ((active0 & 0x10000000000000L) != 0L) {
return jjStartNfaWithStates_0(5, 52, 28); return jjStartNfaWithStates_0(5, 52, 28);
}
break; break;
case 116: case 116:
if ((active0 & 0x100000000L) != 0L) if ((active0 & 0x100000000L) != 0L) {
return jjStartNfaWithStates_0(5, 32, 28); return jjStartNfaWithStates_0(5, 32, 28);
}
return jjMoveStringLiteralDfa6_0(active0, 0x20000000000L); return jjMoveStringLiteralDfa6_0(active0, 0x20000000000L);
default : default :
break; break;
...@@ -663,8 +704,9 @@ private final int jjMoveStringLiteralDfa5_0(long old0, long active0) ...@@ -663,8 +704,9 @@ private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
} }
private final int jjMoveStringLiteralDfa6_0(long old0, long active0) private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
{ {
if (((active0 &= old0)) == 0L) if (((active0 &= old0)) == 0L) {
return jjStartNfa_0(4, old0, 0L); return jjStartNfa_0(4, old0, 0L);
}
try { curChar = input_stream.readChar(); } try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(5, active0, 0L); jjStopStringLiteralDfa_0(5, active0, 0L);
...@@ -677,32 +719,37 @@ private final int jjMoveStringLiteralDfa6_0(long old0, long active0) ...@@ -677,32 +719,37 @@ private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
case 99: case 99:
return jjMoveStringLiteralDfa7_0(active0, 0x200000200L); return jjMoveStringLiteralDfa7_0(active0, 0x200000200L);
case 101: case 101:
if ((active0 & 0x10000000000L) != 0L) if ((active0 & 0x10000000000L) != 0L) {
return jjStartNfaWithStates_0(6, 40, 28); return jjStartNfaWithStates_0(6, 40, 28);
else if ((active0 & 0x20000000000L) != 0L) } else if ((active0 & 0x20000000000L) != 0L) {
return jjStartNfaWithStates_0(6, 41, 28); return jjStartNfaWithStates_0(6, 41, 28);
}
return jjMoveStringLiteralDfa7_0(active0, 0x20000080000000L); return jjMoveStringLiteralDfa7_0(active0, 0x20000080000000L);
case 108: case 108:
return jjMoveStringLiteralDfa7_0(active0, 0x200000000000000L); return jjMoveStringLiteralDfa7_0(active0, 0x200000000000000L);
case 110: case 110:
if ((active0 & 0x400L) != 0L) if ((active0 & 0x400L) != 0L) {
return jjStartNfaWithStates_0(6, 10, 28); return jjStartNfaWithStates_0(6, 10, 28);
}
break; break;
case 111: case 111:
return jjMoveStringLiteralDfa7_0(active0, 0x2000000000000L); return jjMoveStringLiteralDfa7_0(active0, 0x2000000000000L);
case 115: case 115:
if ((active0 & 0x800000L) != 0L) if ((active0 & 0x800000L) != 0L) {
return jjStartNfaWithStates_0(6, 23, 28); return jjStartNfaWithStates_0(6, 23, 28);
}
break; break;
case 116: case 116:
if ((active0 & 0x80000L) != 0L) if ((active0 & 0x80000L) != 0L) {
return jjStartNfaWithStates_0(6, 19, 28); return jjStartNfaWithStates_0(6, 19, 28);
}
return jjMoveStringLiteralDfa7_0(active0, 0x40000000000L); return jjMoveStringLiteralDfa7_0(active0, 0x40000000000L);
case 117: case 117:
return jjMoveStringLiteralDfa7_0(active0, 0x40000L); return jjMoveStringLiteralDfa7_0(active0, 0x40000L);
case 121: case 121:
if ((active0 & 0x4000000L) != 0L) if ((active0 & 0x4000000L) != 0L) {
return jjStartNfaWithStates_0(6, 26, 28); return jjStartNfaWithStates_0(6, 26, 28);
}
break; break;
default : default :
break; break;
...@@ -711,8 +758,9 @@ private final int jjMoveStringLiteralDfa6_0(long old0, long active0) ...@@ -711,8 +758,9 @@ private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
} }
private final int jjMoveStringLiteralDfa7_0(long old0, long active0) private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
{ {
if (((active0 &= old0)) == 0L) if (((active0 &= old0)) == 0L) {
return jjStartNfa_0(5, old0, 0L); return jjStartNfa_0(5, old0, 0L);
}
try { curChar = input_stream.readChar(); } try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(6, active0, 0L); jjStopStringLiteralDfa_0(6, active0, 0L);
...@@ -723,16 +771,18 @@ private final int jjMoveStringLiteralDfa7_0(long old0, long active0) ...@@ -723,16 +771,18 @@ private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
case 99: case 99:
return jjMoveStringLiteralDfa8_0(active0, 0x800000000L); return jjMoveStringLiteralDfa8_0(active0, 0x800000000L);
case 101: case 101:
if ((active0 & 0x40000L) != 0L) if ((active0 & 0x40000L) != 0L) {
return jjStartNfaWithStates_0(7, 18, 28); return jjStartNfaWithStates_0(7, 18, 28);
else if ((active0 & 0x200000000000000L) != 0L) } else if ((active0 & 0x200000000000000L) != 0L) {
return jjStartNfaWithStates_0(7, 57, 28); return jjStartNfaWithStates_0(7, 57, 28);
}
return jjMoveStringLiteralDfa8_0(active0, 0x40200000000L); return jjMoveStringLiteralDfa8_0(active0, 0x40200000000L);
case 110: case 110:
return jjMoveStringLiteralDfa8_0(active0, 0x22000080000000L); return jjMoveStringLiteralDfa8_0(active0, 0x22000080000000L);
case 116: case 116:
if ((active0 & 0x200L) != 0L) if ((active0 & 0x200L) != 0L) {
return jjStartNfaWithStates_0(7, 9, 28); return jjStartNfaWithStates_0(7, 9, 28);
}
break; break;
default : default :
break; break;
...@@ -741,8 +791,9 @@ private final int jjMoveStringLiteralDfa7_0(long old0, long active0) ...@@ -741,8 +791,9 @@ private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
} }
private final int jjMoveStringLiteralDfa8_0(long old0, long active0) private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
{ {
if (((active0 &= old0)) == 0L) if (((active0 &= old0)) == 0L) {
return jjStartNfa_0(6, old0, 0L); return jjStartNfa_0(6, old0, 0L);
}
try { curChar = input_stream.readChar(); } try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(7, active0, 0L); jjStopStringLiteralDfa_0(7, active0, 0L);
...@@ -751,20 +802,23 @@ private final int jjMoveStringLiteralDfa8_0(long old0, long active0) ...@@ -751,20 +802,23 @@ private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
switch(curChar) switch(curChar)
{ {
case 100: case 100:
if ((active0 & 0x40000000000L) != 0L) if ((active0 & 0x40000000000L) != 0L) {
return jjStartNfaWithStates_0(8, 42, 28); return jjStartNfaWithStates_0(8, 42, 28);
}
break; break;
case 101: case 101:
if ((active0 & 0x800000000L) != 0L) if ((active0 & 0x800000000L) != 0L) {
return jjStartNfaWithStates_0(8, 35, 28); return jjStartNfaWithStates_0(8, 35, 28);
}
break; break;
case 105: case 105:
return jjMoveStringLiteralDfa9_0(active0, 0x2000000000000L); return jjMoveStringLiteralDfa9_0(active0, 0x2000000000000L);
case 111: case 111:
return jjMoveStringLiteralDfa9_0(active0, 0x200000000L); return jjMoveStringLiteralDfa9_0(active0, 0x200000000L);
case 116: case 116:
if ((active0 & 0x20000000000000L) != 0L) if ((active0 & 0x20000000000000L) != 0L) {
return jjStartNfaWithStates_0(8, 53, 28); return jjStartNfaWithStates_0(8, 53, 28);
}
return jjMoveStringLiteralDfa9_0(active0, 0x80000000L); return jjMoveStringLiteralDfa9_0(active0, 0x80000000L);
default : default :
break; break;
...@@ -773,8 +827,9 @@ private final int jjMoveStringLiteralDfa8_0(long old0, long active0) ...@@ -773,8 +827,9 @@ private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
} }
private final int jjMoveStringLiteralDfa9_0(long old0, long active0) private final int jjMoveStringLiteralDfa9_0(long old0, long active0)
{ {
if (((active0 &= old0)) == 0L) if (((active0 &= old0)) == 0L) {
return jjStartNfa_0(7, old0, 0L); return jjStartNfa_0(7, old0, 0L);
}
try { curChar = input_stream.readChar(); } try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(8, active0, 0L); jjStopStringLiteralDfa_0(8, active0, 0L);
...@@ -783,12 +838,14 @@ private final int jjMoveStringLiteralDfa9_0(long old0, long active0) ...@@ -783,12 +838,14 @@ private final int jjMoveStringLiteralDfa9_0(long old0, long active0)
switch(curChar) switch(curChar)
{ {
case 102: case 102:
if ((active0 & 0x200000000L) != 0L) if ((active0 & 0x200000000L) != 0L) {
return jjStartNfaWithStates_0(9, 33, 28); return jjStartNfaWithStates_0(9, 33, 28);
}
break; break;
case 115: case 115:
if ((active0 & 0x80000000L) != 0L) if ((active0 & 0x80000000L) != 0L) {
return jjStartNfaWithStates_0(9, 31, 28); return jjStartNfaWithStates_0(9, 31, 28);
}
break; break;
case 122: case 122:
return jjMoveStringLiteralDfa10_0(active0, 0x2000000000000L); return jjMoveStringLiteralDfa10_0(active0, 0x2000000000000L);
...@@ -799,8 +856,9 @@ private final int jjMoveStringLiteralDfa9_0(long old0, long active0) ...@@ -799,8 +856,9 @@ private final int jjMoveStringLiteralDfa9_0(long old0, long active0)
} }
private final int jjMoveStringLiteralDfa10_0(long old0, long active0) private final int jjMoveStringLiteralDfa10_0(long old0, long active0)
{ {
if (((active0 &= old0)) == 0L) if (((active0 &= old0)) == 0L) {
return jjStartNfa_0(8, old0, 0L); return jjStartNfa_0(8, old0, 0L);
}
try { curChar = input_stream.readChar(); } try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(9, active0, 0L); jjStopStringLiteralDfa_0(9, active0, 0L);
...@@ -817,8 +875,9 @@ private final int jjMoveStringLiteralDfa10_0(long old0, long active0) ...@@ -817,8 +875,9 @@ private final int jjMoveStringLiteralDfa10_0(long old0, long active0)
} }
private final int jjMoveStringLiteralDfa11_0(long old0, long active0) private final int jjMoveStringLiteralDfa11_0(long old0, long active0)
{ {
if (((active0 &= old0)) == 0L) if (((active0 &= old0)) == 0L) {
return jjStartNfa_0(9, old0, 0L); return jjStartNfa_0(9, old0, 0L);
}
try { curChar = input_stream.readChar(); } try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { catch(java.io.IOException e) {
jjStopStringLiteralDfa_0(10, active0, 0L); jjStopStringLiteralDfa_0(10, active0, 0L);
...@@ -827,8 +886,9 @@ private final int jjMoveStringLiteralDfa11_0(long old0, long active0) ...@@ -827,8 +886,9 @@ private final int jjMoveStringLiteralDfa11_0(long old0, long active0)
switch(curChar) switch(curChar)
{ {
case 100: case 100:
if ((active0 & 0x2000000000000L) != 0L) if ((active0 & 0x2000000000000L) != 0L) {
return jjStartNfaWithStates_0(11, 49, 28); return jjStartNfaWithStates_0(11, 49, 28);
}
break; break;
default : default :
break; break;
...@@ -891,320 +951,395 @@ static final long[] jjbitVec8 = { ...@@ -891,320 +951,395 @@ static final long[] jjbitVec8 = {
}; };
private final int jjMoveNfa_0(int startState, int curPos) private final int jjMoveNfa_0(int startState, int curPos)
{ {
int[] nextStates;
int startsAt = 0; int startsAt = 0;
jjnewStateCnt = 67; jjnewStateCnt = 67;
int i = 1; int i = 1;
jjstateSet[0] = startState; jjstateSet[0] = startState;
int j, kind = 0x7fffffff; int kind = 0x7fffffff;
for (;;) for (;;)
{ {
if (++jjround == 0x7fffffff) if (++jjround == 0x7fffffff) {
ReInitRounds(); ReInitRounds();
}
if (curChar < 64) if (curChar < 64)
{ {
long l = 1L << curChar; long l = 1L << curChar;
MatchLoop: do //MatchLoop
do
{ {
switch(jjstateSet[--i]) switch(jjstateSet[--i])
{ {
case 0: case 0:
if ((0x3ff000000000000L & l) != 0L) if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddStates(0, 6); jjCheckNAddStates(0, 6);
else if (curChar == 47) } else if (curChar == 47) {
jjAddStates(7, 9); jjAddStates(7, 9);
else if (curChar == 36) } else if (curChar == 36)
{ {
if (kind > 67) if (kind > 67) {
kind = 67; kind = 67;
}
jjCheckNAdd(28); jjCheckNAdd(28);
} }
else if (curChar == 34) else if (curChar == 34) {
jjCheckNAddStates(10, 12); jjCheckNAddStates(10, 12);
else if (curChar == 39) } else if (curChar == 39) {
jjAddStates(13, 14); jjAddStates(13, 14);
else if (curChar == 46) } else if (curChar == 46) {
jjCheckNAdd(4); jjCheckNAdd(4);
}
if ((0x3fe000000000000L & l) != 0L) if ((0x3fe000000000000L & l) != 0L)
{ {
if (kind > 59) if (kind > 59) {
kind = 59; kind = 59;
}
jjCheckNAddTwoStates(1, 2); jjCheckNAddTwoStates(1, 2);
} }
else if (curChar == 48) else if (curChar == 48)
{ {
if (kind > 59) if (kind > 59) {
kind = 59; kind = 59;
}
jjCheckNAddStates(15, 17); jjCheckNAddStates(15, 17);
} }
break; break;
case 49: case 49:
if (curChar == 42) if (curChar == 42) {
jjCheckNAddTwoStates(62, 63); jjCheckNAddTwoStates(62, 63);
else if (curChar == 47) } else if (curChar == 47) {
jjCheckNAddStates(18, 20); jjCheckNAddStates(18, 20);
if (curChar == 42) }
if (curChar == 42) {
jjstateSet[jjnewStateCnt++] = 54; jjstateSet[jjnewStateCnt++] = 54;
}
break; break;
case 1: case 1:
if ((0x3ff000000000000L & l) == 0L) if ((0x3ff000000000000L & l) == 0L) {
break; break;
if (kind > 59) }
if (kind > 59) {
kind = 59; kind = 59;
}
jjCheckNAddTwoStates(1, 2); jjCheckNAddTwoStates(1, 2);
break; break;
case 3: case 3:
if (curChar == 46) if (curChar == 46) {
jjCheckNAdd(4); jjCheckNAdd(4);
}
break; break;
case 4: case 4:
if ((0x3ff000000000000L & l) == 0L) if ((0x3ff000000000000L & l) == 0L) {
break; break;
if (kind > 63) }
if (kind > 63) {
kind = 63; kind = 63;
}
jjCheckNAddStates(21, 23); jjCheckNAddStates(21, 23);
break; break;
case 6: case 6:
if ((0x280000000000L & l) != 0L) if ((0x280000000000L & l) != 0L) {
jjCheckNAdd(7); jjCheckNAdd(7);
}
break; break;
case 7: case 7:
if ((0x3ff000000000000L & l) == 0L) if ((0x3ff000000000000L & l) == 0L) {
break; break;
if (kind > 63) }
if (kind > 63) {
kind = 63; kind = 63;
}
jjCheckNAddTwoStates(7, 8); jjCheckNAddTwoStates(7, 8);
break; break;
case 9: case 9:
if (curChar == 39) if (curChar == 39) {
jjAddStates(13, 14); jjAddStates(13, 14);
}
break; break;
case 10: case 10:
if ((0xffffff7fffffdbffL & l) != 0L) if ((0xffffff7fffffdbffL & l) != 0L) {
jjCheckNAdd(11); jjCheckNAdd(11);
}
break; break;
case 11: case 11:
if (curChar == 39 && kind > 65) if (curChar == 39 && kind > 65) {
kind = 65; kind = 65;
}
break; break;
case 13: case 13:
if ((0x8400000000L & l) != 0L) if ((0x8400000000L & l) != 0L) {
jjCheckNAdd(11); jjCheckNAdd(11);
}
break; break;
case 14: case 14:
if ((0xff000000000000L & l) != 0L) if ((0xff000000000000L & l) != 0L) {
jjCheckNAddTwoStates(15, 11); jjCheckNAddTwoStates(15, 11);
}
break; break;
case 15: case 15:
if ((0xff000000000000L & l) != 0L) if ((0xff000000000000L & l) != 0L) {
jjCheckNAdd(11); jjCheckNAdd(11);
}
break; break;
case 16: case 16:
if ((0xf000000000000L & l) != 0L) if ((0xf000000000000L & l) != 0L) {
jjstateSet[jjnewStateCnt++] = 17; jjstateSet[jjnewStateCnt++] = 17;
}
break; break;
case 17: case 17:
if ((0xff000000000000L & l) != 0L) if ((0xff000000000000L & l) != 0L) {
jjCheckNAdd(15); jjCheckNAdd(15);
}
break; break;
case 18: case 18:
if (curChar == 34) if (curChar == 34) {
jjCheckNAddStates(10, 12); jjCheckNAddStates(10, 12);
}
break; break;
case 19: case 19:
if ((0xfffffffbffffdbffL & l) != 0L) if ((0xfffffffbffffdbffL & l) != 0L) {
jjCheckNAddStates(10, 12); jjCheckNAddStates(10, 12);
}
break; break;
case 21: case 21:
if ((0x8400000000L & l) != 0L) if ((0x8400000000L & l) != 0L) {
jjCheckNAddStates(10, 12); jjCheckNAddStates(10, 12);
}
break; break;
case 22: case 22:
if (curChar == 34 && kind > 66) if (curChar == 34 && kind > 66) {
kind = 66; kind = 66;
}
break; break;
case 23: case 23:
if ((0xff000000000000L & l) != 0L) if ((0xff000000000000L & l) != 0L) {
jjCheckNAddStates(24, 27); jjCheckNAddStates(24, 27);
}
break; break;
case 24: case 24:
if ((0xff000000000000L & l) != 0L) if ((0xff000000000000L & l) != 0L) {
jjCheckNAddStates(10, 12); jjCheckNAddStates(10, 12);
}
break; break;
case 25: case 25:
if ((0xf000000000000L & l) != 0L) if ((0xf000000000000L & l) != 0L) {
jjstateSet[jjnewStateCnt++] = 26; jjstateSet[jjnewStateCnt++] = 26;
}
break; break;
case 26: case 26:
if ((0xff000000000000L & l) != 0L) if ((0xff000000000000L & l) != 0L) {
jjCheckNAdd(24); jjCheckNAdd(24);
}
break; break;
case 27: case 27:
if (curChar != 36) if (curChar != 36) {
break; break;
if (kind > 67) }
if (kind > 67) {
kind = 67; kind = 67;
}
jjCheckNAdd(28); jjCheckNAdd(28);
break; break;
case 28: case 28:
if ((0x3ff001000000000L & l) == 0L) if ((0x3ff001000000000L & l) == 0L) {
break; break;
if (kind > 67) }
if (kind > 67) {
kind = 67; kind = 67;
}
jjCheckNAdd(28); jjCheckNAdd(28);
break; break;
case 29: case 29:
if ((0x3ff000000000000L & l) != 0L) if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddStates(0, 6); jjCheckNAddStates(0, 6);
}
break; break;
case 30: case 30:
if ((0x3ff000000000000L & l) != 0L) if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddTwoStates(30, 31); jjCheckNAddTwoStates(30, 31);
}
break; break;
case 31: case 31:
if (curChar != 46) if (curChar != 46) {
break; break;
if (kind > 63) }
if (kind > 63) {
kind = 63; kind = 63;
}
jjCheckNAddStates(28, 30); jjCheckNAddStates(28, 30);
break; break;
case 32: case 32:
if ((0x3ff000000000000L & l) == 0L) if ((0x3ff000000000000L & l) == 0L) {
break; break;
if (kind > 63) }
if (kind > 63) {
kind = 63; kind = 63;
}
jjCheckNAddStates(28, 30); jjCheckNAddStates(28, 30);
break; break;
case 34: case 34:
if ((0x280000000000L & l) != 0L) if ((0x280000000000L & l) != 0L) {
jjCheckNAdd(35); jjCheckNAdd(35);
}
break; break;
case 35: case 35:
if ((0x3ff000000000000L & l) == 0L) if ((0x3ff000000000000L & l) == 0L) {
break; break;
if (kind > 63) }
if (kind > 63) {
kind = 63; kind = 63;
}
jjCheckNAddTwoStates(35, 8); jjCheckNAddTwoStates(35, 8);
break; break;
case 36: case 36:
if ((0x3ff000000000000L & l) != 0L) if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddTwoStates(36, 37); jjCheckNAddTwoStates(36, 37);
}
break; break;
case 38: case 38:
if ((0x280000000000L & l) != 0L) if ((0x280000000000L & l) != 0L) {
jjCheckNAdd(39); jjCheckNAdd(39);
}
break; break;
case 39: case 39:
if ((0x3ff000000000000L & l) == 0L) if ((0x3ff000000000000L & l) == 0L) {
break; break;
if (kind > 63) }
if (kind > 63) {
kind = 63; kind = 63;
}
jjCheckNAddTwoStates(39, 8); jjCheckNAddTwoStates(39, 8);
break; break;
case 40: case 40:
if ((0x3ff000000000000L & l) != 0L) if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddStates(31, 33); jjCheckNAddStates(31, 33);
}
break; break;
case 42: case 42:
if ((0x280000000000L & l) != 0L) if ((0x280000000000L & l) != 0L) {
jjCheckNAdd(43); jjCheckNAdd(43);
}
break; break;
case 43: case 43:
if ((0x3ff000000000000L & l) != 0L) if ((0x3ff000000000000L & l) != 0L) {
jjCheckNAddTwoStates(43, 8); jjCheckNAddTwoStates(43, 8);
}
break; break;
case 44: case 44:
if (curChar != 48) if (curChar != 48) {
break; break;
if (kind > 59) }
if (kind > 59) {
kind = 59; kind = 59;
}
jjCheckNAddStates(15, 17); jjCheckNAddStates(15, 17);
break; break;
case 46: case 46:
if ((0x3ff000000000000L & l) == 0L) if ((0x3ff000000000000L & l) == 0L) {
break; break;
if (kind > 59) }
if (kind > 59) {
kind = 59; kind = 59;
}
jjCheckNAddTwoStates(46, 2); jjCheckNAddTwoStates(46, 2);
break; break;
case 47: case 47:
if ((0xff000000000000L & l) == 0L) if ((0xff000000000000L & l) == 0L) {
break; break;
if (kind > 59) }
if (kind > 59) {
kind = 59; kind = 59;
}
jjCheckNAddTwoStates(47, 2); jjCheckNAddTwoStates(47, 2);
break; break;
case 48: case 48:
if (curChar == 47) if (curChar == 47) {
jjAddStates(7, 9); jjAddStates(7, 9);
}
break; break;
case 50: case 50:
if ((0xffffffffffffdbffL & l) != 0L) if ((0xffffffffffffdbffL & l) != 0L) {
jjCheckNAddStates(18, 20); jjCheckNAddStates(18, 20);
}
break; break;
case 51: case 51:
if ((0x2400L & l) != 0L && kind > 6) if ((0x2400L & l) != 0L && kind > 6) {
kind = 6; kind = 6;
}
break; break;
case 52: case 52:
if (curChar == 10 && kind > 6) if (curChar == 10 && kind > 6) {
kind = 6; kind = 6;
}
break; break;
case 53: case 53:
if (curChar == 13) if (curChar == 13) {
jjstateSet[jjnewStateCnt++] = 52; jjstateSet[jjnewStateCnt++] = 52;
}
break; break;
case 54: case 54:
if (curChar == 42) if (curChar == 42) {
jjCheckNAddTwoStates(55, 56); jjCheckNAddTwoStates(55, 56);
}
break; break;
case 55: case 55:
if ((0xfffffbffffffffffL & l) != 0L) if ((0xfffffbffffffffffL & l) != 0L) {
jjCheckNAddTwoStates(55, 56); jjCheckNAddTwoStates(55, 56);
}
break; break;
case 56: case 56:
if (curChar == 42) if (curChar == 42) {
jjCheckNAddStates(34, 36); jjCheckNAddStates(34, 36);
}
break; break;
case 57: case 57:
if ((0xffff7bffffffffffL & l) != 0L) if ((0xffff7bffffffffffL & l) != 0L) {
jjCheckNAddTwoStates(58, 56); jjCheckNAddTwoStates(58, 56);
}
break; break;
case 58: case 58:
if ((0xfffffbffffffffffL & l) != 0L) if ((0xfffffbffffffffffL & l) != 0L) {
jjCheckNAddTwoStates(58, 56); jjCheckNAddTwoStates(58, 56);
}
break; break;
case 59: case 59:
if (curChar == 47 && kind > 7) if (curChar == 47 && kind > 7) {
kind = 7; kind = 7;
}
break; break;
case 60: case 60:
if (curChar == 42) if (curChar == 42) {
jjstateSet[jjnewStateCnt++] = 54; jjstateSet[jjnewStateCnt++] = 54;
}
break; break;
case 61: case 61:
if (curChar == 42) if (curChar == 42) {
jjCheckNAddTwoStates(62, 63); jjCheckNAddTwoStates(62, 63);
}
break; break;
case 62: case 62:
if ((0xfffffbffffffffffL & l) != 0L) if ((0xfffffbffffffffffL & l) != 0L) {
jjCheckNAddTwoStates(62, 63); jjCheckNAddTwoStates(62, 63);
}
break; break;
case 63: case 63:
if (curChar == 42) if (curChar == 42) {
jjCheckNAddStates(37, 39); jjCheckNAddStates(37, 39);
}
break; break;
case 64: case 64:
if ((0xffff7bffffffffffL & l) != 0L) if ((0xffff7bffffffffffL & l) != 0L) {
jjCheckNAddTwoStates(65, 63); jjCheckNAddTwoStates(65, 63);
}
break; break;
case 65: case 65:
if ((0xfffffbffffffffffL & l) != 0L) if ((0xfffffbffffffffffL & l) != 0L) {
jjCheckNAddTwoStates(65, 63); jjCheckNAddTwoStates(65, 63);
}
break; break;
case 66: case 66:
if (curChar == 47 && kind > 8) if (curChar == 47 && kind > 8) {
kind = 8; kind = 8;
}
break; break;
default : break; default : break;
} }
...@@ -1213,75 +1348,93 @@ private final int jjMoveNfa_0(int startState, int curPos) ...@@ -1213,75 +1348,93 @@ private final int jjMoveNfa_0(int startState, int curPos)
else if (curChar < 128) else if (curChar < 128)
{ {
long l = 1L << (curChar & 077); long l = 1L << (curChar & 077);
MatchLoop: do //MatchLoop
do
{ {
switch(jjstateSet[--i]) switch(jjstateSet[--i])
{ {
case 0: case 0:
case 28: case 28:
if ((0x7fffffe87fffffeL & l) == 0L) if ((0x7fffffe87fffffeL & l) == 0L) {
break; break;
if (kind > 67) }
if (kind > 67) {
kind = 67; kind = 67;
}
jjCheckNAdd(28); jjCheckNAdd(28);
break; break;
case 2: case 2:
if ((0x100000001000L & l) != 0L && kind > 59) if ((0x100000001000L & l) != 0L && kind > 59) {
kind = 59; kind = 59;
}
break; break;
case 5: case 5:
if ((0x2000000020L & l) != 0L) if ((0x2000000020L & l) != 0L) {
jjAddStates(40, 41); jjAddStates(40, 41);
}
break; break;
case 8: case 8:
if ((0x5000000050L & l) != 0L && kind > 63) if ((0x5000000050L & l) != 0L && kind > 63) {
kind = 63; kind = 63;
}
break; break;
case 10: case 10:
if ((0xffffffffefffffffL & l) != 0L) if ((0xffffffffefffffffL & l) != 0L) {
jjCheckNAdd(11); jjCheckNAdd(11);
}
break; break;
case 12: case 12:
if (curChar == 92) if (curChar == 92) {
jjAddStates(42, 44); jjAddStates(42, 44);
}
break; break;
case 13: case 13:
if ((0x14404410000000L & l) != 0L) if ((0x14404410000000L & l) != 0L) {
jjCheckNAdd(11); jjCheckNAdd(11);
}
break; break;
case 19: case 19:
if ((0xffffffffefffffffL & l) != 0L) if ((0xffffffffefffffffL & l) != 0L) {
jjCheckNAddStates(10, 12); jjCheckNAddStates(10, 12);
}
break; break;
case 20: case 20:
if (curChar == 92) if (curChar == 92) {
jjAddStates(45, 47); jjAddStates(45, 47);
}
break; break;
case 21: case 21:
if ((0x14404410000000L & l) != 0L) if ((0x14404410000000L & l) != 0L) {
jjCheckNAddStates(10, 12); jjCheckNAddStates(10, 12);
}
break; break;
case 33: case 33:
if ((0x2000000020L & l) != 0L) if ((0x2000000020L & l) != 0L) {
jjAddStates(48, 49); jjAddStates(48, 49);
}
break; break;
case 37: case 37:
if ((0x2000000020L & l) != 0L) if ((0x2000000020L & l) != 0L) {
jjAddStates(50, 51); jjAddStates(50, 51);
}
break; break;
case 41: case 41:
if ((0x2000000020L & l) != 0L) if ((0x2000000020L & l) != 0L) {
jjAddStates(52, 53); jjAddStates(52, 53);
}
break; break;
case 45: case 45:
if ((0x100000001000000L & l) != 0L) if ((0x100000001000000L & l) != 0L) {
jjCheckNAdd(46); jjCheckNAdd(46);
}
break; break;
case 46: case 46:
if ((0x7e0000007eL & l) == 0L) if ((0x7e0000007eL & l) == 0L) {
break; break;
if (kind > 59) }
if (kind > 59) {
kind = 59; kind = 59;
}
jjCheckNAddTwoStates(46, 2); jjCheckNAddTwoStates(46, 2);
break; break;
case 50: case 50:
...@@ -1312,47 +1465,57 @@ private final int jjMoveNfa_0(int startState, int curPos) ...@@ -1312,47 +1465,57 @@ private final int jjMoveNfa_0(int startState, int curPos)
long l1 = 1L << (hiByte & 077); long l1 = 1L << (hiByte & 077);
int i2 = (curChar & 0xff) >> 6; int i2 = (curChar & 0xff) >> 6;
long l2 = 1L << (curChar & 077); long l2 = 1L << (curChar & 077);
MatchLoop: do //MatchLoop
do
{ {
switch(jjstateSet[--i]) switch(jjstateSet[--i])
{ {
case 0: case 0:
case 28: case 28:
if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) {
break; break;
if (kind > 67) }
if (kind > 67) {
kind = 67; kind = 67;
}
jjCheckNAdd(28); jjCheckNAdd(28);
break; break;
case 10: case 10:
if (jjCanMove_0(hiByte, i1, i2, l1, l2)) if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjstateSet[jjnewStateCnt++] = 11; jjstateSet[jjnewStateCnt++] = 11;
}
break; break;
case 19: case 19:
if (jjCanMove_0(hiByte, i1, i2, l1, l2)) if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjAddStates(10, 12); jjAddStates(10, 12);
}
break; break;
case 50: case 50:
if (jjCanMove_0(hiByte, i1, i2, l1, l2)) if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjAddStates(18, 20); jjAddStates(18, 20);
}
break; break;
case 55: case 55:
if (jjCanMove_0(hiByte, i1, i2, l1, l2)) if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjCheckNAddTwoStates(55, 56); jjCheckNAddTwoStates(55, 56);
}
break; break;
case 57: case 57:
case 58: case 58:
if (jjCanMove_0(hiByte, i1, i2, l1, l2)) if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjCheckNAddTwoStates(58, 56); jjCheckNAddTwoStates(58, 56);
}
break; break;
case 62: case 62:
if (jjCanMove_0(hiByte, i1, i2, l1, l2)) if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjCheckNAddTwoStates(62, 63); jjCheckNAddTwoStates(62, 63);
}
break; break;
case 64: case 64:
case 65: case 65:
if (jjCanMove_0(hiByte, i1, i2, l1, l2)) if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
jjCheckNAddTwoStates(65, 63); jjCheckNAddTwoStates(65, 63);
}
break; break;
default : break; default : break;
} }
...@@ -1365,8 +1528,9 @@ private final int jjMoveNfa_0(int startState, int curPos) ...@@ -1365,8 +1528,9 @@ private final int jjMoveNfa_0(int startState, int curPos)
kind = 0x7fffffff; kind = 0x7fffffff;
} }
++curPos; ++curPos;
if ((i = jjnewStateCnt) == (startsAt = 67 - (jjnewStateCnt = startsAt))) if ((i = jjnewStateCnt) == (startsAt = 67 - (jjnewStateCnt = startsAt))) {
return curPos; return curPos;
}
try { curChar = input_stream.readChar(); } try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { return curPos; } catch(java.io.IOException e) { return curPos; }
} }
...@@ -1384,8 +1548,9 @@ private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, lo ...@@ -1384,8 +1548,9 @@ private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, lo
case 0: case 0:
return ((jjbitVec2[i2] & l2) != 0L); return ((jjbitVec2[i2] & l2) != 0L);
default : default :
if ((jjbitVec0[i1] & l1) != 0L) if ((jjbitVec0[i1] & l1) != 0L) {
return true; return true;
}
return false; return false;
} }
} }
...@@ -1404,8 +1569,9 @@ private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, lo ...@@ -1404,8 +1569,9 @@ private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, lo
case 61: case 61:
return ((jjbitVec8[i2] & l2) != 0L); return ((jjbitVec8[i2] & l2) != 0L);
default : default :
if ((jjbitVec3[i1] & l1) != 0L) if ((jjbitVec3[i1] & l1) != 0L) {
return true; return true;
}
return false; return false;
} }
} }
...@@ -1449,8 +1615,9 @@ private final int[] jjstateSet = new int[134]; ...@@ -1449,8 +1615,9 @@ private final int[] jjstateSet = new int[134];
protected char curChar; protected char curChar;
public ExpressionParserTokenManager(ASCII_UCodeESC_CharStream stream) public ExpressionParserTokenManager(ASCII_UCodeESC_CharStream stream)
{ {
if (ASCII_UCodeESC_CharStream.staticFlag) if (ASCII_UCodeESC_CharStream.staticFlag) {
throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
}
input_stream = stream; input_stream = stream;
} }
public ExpressionParserTokenManager(ASCII_UCodeESC_CharStream stream, int lexState) public ExpressionParserTokenManager(ASCII_UCodeESC_CharStream stream, int lexState)
...@@ -1469,9 +1636,10 @@ private final void ReInitRounds() ...@@ -1469,9 +1636,10 @@ private final void ReInitRounds()
{ {
int i; int i;
jjround = 0x80000001; jjround = 0x80000001;
for (i = 67; i-- > 0;) for (i = 67; i-- > 0;) {
jjrounds[i] = 0x80000000; jjrounds[i] = 0x80000000;
} }
}
public void ReInit(ASCII_UCodeESC_CharStream stream, int lexState) public void ReInit(ASCII_UCodeESC_CharStream stream, int lexState)
{ {
ReInit(stream); ReInit(stream);
...@@ -1479,11 +1647,12 @@ public void ReInit(ASCII_UCodeESC_CharStream stream, int lexState) ...@@ -1479,11 +1647,12 @@ public void ReInit(ASCII_UCodeESC_CharStream stream, int lexState)
} }
public void SwitchTo(int lexState) public void SwitchTo(int lexState)
{ {
if (lexState >= 1 || lexState < 0) if (lexState >= 1 || lexState < 0) {
throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
else } else {
curLexState = lexState; curLexState = lexState;
} }
}
private final Token jjFillToken() private final Token jjFillToken()
{ {
...@@ -1507,7 +1676,6 @@ int jjmatchedKind; ...@@ -1507,7 +1676,6 @@ int jjmatchedKind;
public final Token getNextToken() public final Token getNextToken()
{ {
int kind;
Token specialToken = null; Token specialToken = null;
Token matchedToken; Token matchedToken;
int curPos = 0; int curPos = 0;
...@@ -1528,17 +1696,19 @@ public final Token getNextToken() ...@@ -1528,17 +1696,19 @@ public final Token getNextToken()
} }
try { try {
while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L) while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L) {
curChar = input_stream.BeginToken(); curChar = input_stream.BeginToken();
} }
}
catch (java.io.IOException e1) { continue EOFLoop; } catch (java.io.IOException e1) { continue EOFLoop; }
jjmatchedKind = 0x7fffffff; jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0; jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_0(); curPos = jjMoveStringLiteralDfa0_0();
if (jjmatchedKind != 0x7fffffff) if (jjmatchedKind != 0x7fffffff)
{ {
if (jjmatchedPos + 1 < curPos) if (jjmatchedPos + 1 < curPos) {
input_stream.backup(curPos - jjmatchedPos - 1); input_stream.backup(curPos - jjmatchedPos - 1);
}
if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
{ {
matchedToken = jjFillToken(); matchedToken = jjFillToken();
...@@ -1550,9 +1720,9 @@ public final Token getNextToken() ...@@ -1550,9 +1720,9 @@ public final Token getNextToken()
if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
{ {
matchedToken = jjFillToken(); matchedToken = jjFillToken();
if (specialToken == null) if (specialToken == null) {
specialToken = matchedToken; specialToken = matchedToken;
else } else
{ {
matchedToken.specialToken = specialToken; matchedToken.specialToken = specialToken;
specialToken = (specialToken.next = matchedToken); specialToken = (specialToken.next = matchedToken);
...@@ -1572,9 +1742,9 @@ public final Token getNextToken() ...@@ -1572,9 +1742,9 @@ public final Token getNextToken()
if (curChar == '\n' || curChar == '\r') { if (curChar == '\n' || curChar == '\r') {
error_line++; error_line++;
error_column = 0; error_column = 0;
} } else {
else
error_column++; error_column++;
}
} }
if (!EOFSeen) { if (!EOFSeen) {
input_stream.backup(1); input_stream.backup(1);
......
...@@ -156,6 +156,7 @@ abstract class LValue { ...@@ -156,6 +156,7 @@ abstract class LValue {
return new LValueArrayElement(interiorGetValue(), index); return new LValueArrayElement(interiorGetValue(), index);
} }
@Override
public String toString() { public String toString() {
try { try {
return interiorGetValue().toString(); return interiorGetValue().toString();
...@@ -419,6 +420,7 @@ abstract class LValue { ...@@ -419,6 +420,7 @@ abstract class LValue {
this.var = var; this.var = var;
} }
@Override
Value getValue() { Value getValue() {
if (jdiValue == null) { if (jdiValue == null) {
jdiValue = frame.getValue(var); jdiValue = frame.getValue(var);
...@@ -426,12 +428,14 @@ abstract class LValue { ...@@ -426,12 +428,14 @@ abstract class LValue {
return jdiValue; return jdiValue;
} }
@Override
void setValue0(Value val) throws InvalidTypeException, void setValue0(Value val) throws InvalidTypeException,
ClassNotLoadedException { ClassNotLoadedException {
frame.setValue(var, val); frame.setValue(var, val);
jdiValue = val; jdiValue = val;
} }
@Override
void invokeWith(List<Value> arguments) throws ParseException { void invokeWith(List<Value> arguments) throws ParseException {
throw new ParseException(var.name() + " is not a method"); throw new ParseException(var.name() + " is not a method");
} }
...@@ -469,6 +473,7 @@ abstract class LValue { ...@@ -469,6 +473,7 @@ abstract class LValue {
} }
} }
@Override
Value getValue() throws InvocationException, InvalidTypeException, Value getValue() throws InvocationException, InvalidTypeException,
ClassNotLoadedException, IncompatibleThreadStateException, ClassNotLoadedException, IncompatibleThreadStateException,
ParseException { ParseException {
...@@ -485,6 +490,7 @@ abstract class LValue { ...@@ -485,6 +490,7 @@ abstract class LValue {
} }
} }
@Override
void setValue0(Value val) throws ParseException, void setValue0(Value val) throws ParseException,
InvalidTypeException, InvalidTypeException,
ClassNotLoadedException { ClassNotLoadedException {
...@@ -495,6 +501,7 @@ abstract class LValue { ...@@ -495,6 +501,7 @@ abstract class LValue {
jdiValue = val; jdiValue = val;
} }
@Override
void invokeWith(List<Value> arguments) throws ParseException { void invokeWith(List<Value> arguments) throws ParseException {
if (matchingMethod != null) { if (matchingMethod != null) {
throw new ParseException("Invalid consecutive invocations"); throw new ParseException("Invalid consecutive invocations");
...@@ -531,6 +538,7 @@ abstract class LValue { ...@@ -531,6 +538,7 @@ abstract class LValue {
} }
} }
@Override
Value getValue() throws InvocationException, InvalidTypeException, Value getValue() throws InvocationException, InvalidTypeException,
ClassNotLoadedException, IncompatibleThreadStateException, ClassNotLoadedException, IncompatibleThreadStateException,
ParseException { ParseException {
...@@ -548,6 +556,7 @@ abstract class LValue { ...@@ -548,6 +556,7 @@ abstract class LValue {
} }
} }
@Override
void setValue0(Value val) void setValue0(Value val)
throws ParseException, InvalidTypeException, throws ParseException, InvalidTypeException,
ClassNotLoadedException { ClassNotLoadedException {
...@@ -562,6 +571,7 @@ abstract class LValue { ...@@ -562,6 +571,7 @@ abstract class LValue {
jdiValue = val; jdiValue = val;
} }
@Override
void invokeWith(List<Value> arguments) throws ParseException { void invokeWith(List<Value> arguments) throws ParseException {
if (matchingMethod != null) { if (matchingMethod != null) {
throw new ParseException("Invalid consecutive invocations"); throw new ParseException("Invalid consecutive invocations");
...@@ -589,6 +599,7 @@ abstract class LValue { ...@@ -589,6 +599,7 @@ abstract class LValue {
this.arrayRef = value; this.arrayRef = value;
} }
@Override
Value getValue() { Value getValue() {
if (jdiValue == null) { if (jdiValue == null) {
jdiValue = arrayRef.virtualMachine().mirrorOf(arrayRef.length()); jdiValue = arrayRef.virtualMachine().mirrorOf(arrayRef.length());
...@@ -596,10 +607,12 @@ abstract class LValue { ...@@ -596,10 +607,12 @@ abstract class LValue {
return jdiValue; return jdiValue;
} }
@Override
void setValue0(Value value) throws ParseException { void setValue0(Value value) throws ParseException {
throw new ParseException("Cannot set constant: " + value); throw new ParseException("Cannot set constant: " + value);
} }
@Override
void invokeWith(List<Value> arguments) throws ParseException { void invokeWith(List<Value> arguments) throws ParseException {
throw new ParseException("Array element is not a method"); throw new ParseException("Array element is not a method");
} }
...@@ -618,6 +631,7 @@ abstract class LValue { ...@@ -618,6 +631,7 @@ abstract class LValue {
this.index = index; this.index = index;
} }
@Override
Value getValue() { Value getValue() {
if (jdiValue == null) { if (jdiValue == null) {
jdiValue = array.getValue(index); jdiValue = array.getValue(index);
...@@ -625,12 +639,14 @@ abstract class LValue { ...@@ -625,12 +639,14 @@ abstract class LValue {
return jdiValue; return jdiValue;
} }
@Override
void setValue0(Value val) throws InvalidTypeException, void setValue0(Value val) throws InvalidTypeException,
ClassNotLoadedException { ClassNotLoadedException {
array.setValue(index, val); array.setValue(index, val);
jdiValue = val; jdiValue = val;
} }
@Override
void invokeWith(List<Value> arguments) throws ParseException { void invokeWith(List<Value> arguments) throws ParseException {
throw new ParseException("Array element is not a method"); throw new ParseException("Array element is not a method");
} }
...@@ -643,6 +659,7 @@ abstract class LValue { ...@@ -643,6 +659,7 @@ abstract class LValue {
this.value = value; this.value = value;
} }
@Override
Value getValue() { Value getValue() {
if (jdiValue == null) { if (jdiValue == null) {
jdiValue = value; jdiValue = value;
...@@ -650,10 +667,12 @@ abstract class LValue { ...@@ -650,10 +667,12 @@ abstract class LValue {
return jdiValue; return jdiValue;
} }
@Override
void setValue0(Value val) throws ParseException { void setValue0(Value val) throws ParseException {
throw new ParseException("Cannot set constant: " + value); throw new ParseException("Cannot set constant: " + value);
} }
@Override
void invokeWith(List<Value> arguments) throws ParseException { void invokeWith(List<Value> arguments) throws ParseException {
throw new ParseException("Constant is not a method"); throw new ParseException("Constant is not a method");
} }
......
...@@ -37,6 +37,8 @@ package com.sun.tools.example.debug.expr; ...@@ -37,6 +37,8 @@ package com.sun.tools.example.debug.expr;
*/ */
public class ParseException extends Exception { public class ParseException extends Exception {
private static final long serialVersionUID = 7978489144303647901L;
/** /**
* This constructor is used by the method "generateParseException" * This constructor is used by the method "generateParseException"
* in the generated parser. Calling this constructor generates * in the generated parser. Calling this constructor generates
...@@ -119,20 +121,21 @@ public class ParseException extends Exception { ...@@ -119,20 +121,21 @@ public class ParseException extends Exception {
* of the final stack trace, and hence the correct error message * of the final stack trace, and hence the correct error message
* gets displayed. * gets displayed.
*/ */
@Override
public String getMessage() { public String getMessage() {
if (!specialConstructor) { if (!specialConstructor) {
return super.getMessage(); return super.getMessage();
} }
String expected = ""; String expected = "";
int maxSize = 0; int maxSize = 0;
for (int i = 0; i < expectedTokenSequences.length; i++) { for (int[] expectedTokenSequence : expectedTokenSequences) {
if (maxSize < expectedTokenSequences[i].length) { if (maxSize < expectedTokenSequence.length) {
maxSize = expectedTokenSequences[i].length; maxSize = expectedTokenSequence.length;
} }
for (int j = 0; j < expectedTokenSequences[i].length; j++) { for (int j = 0; j < expectedTokenSequence.length; j++) {
expected += tokenImage[expectedTokenSequences[i][j]] + " "; expected += tokenImage[expectedTokenSequence[j]] + " ";
} }
if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { if (expectedTokenSequence[expectedTokenSequence.length - 1] != 0) {
expected += "..."; expected += "...";
} }
expected += eol + " "; expected += eol + " ";
...@@ -140,7 +143,9 @@ public class ParseException extends Exception { ...@@ -140,7 +143,9 @@ public class ParseException extends Exception {
String retval = "Encountered \""; String retval = "Encountered \"";
Token tok = currentToken.next; Token tok = currentToken.next;
for (int i = 0; i < maxSize; i++) { for (int i = 0; i < maxSize; i++) {
if (i != 0) retval += " "; if (i != 0) {
retval += " ";
}
if (tok.kind == 0) { if (tok.kind == 0) {
retval += tokenImage[0]; retval += tokenImage[0];
break; break;
......
...@@ -78,6 +78,7 @@ public class Token { ...@@ -78,6 +78,7 @@ public class Token {
/** /**
* Returns the image. * Returns the image.
*/ */
@Override
public final String toString() public final String toString()
{ {
return image; return image;
......
...@@ -32,6 +32,8 @@ public class TokenMgrError extends Error ...@@ -32,6 +32,8 @@ public class TokenMgrError extends Error
* Ordinals for various reasons why an Error of this type can be thrown. * Ordinals for various reasons why an Error of this type can be thrown.
*/ */
private static final long serialVersionUID = -6236440836177601522L;
/** /**
* Lexical error occured. * Lexical error occured.
*/ */
...@@ -136,6 +138,7 @@ public class TokenMgrError extends Error ...@@ -136,6 +138,7 @@ public class TokenMgrError extends Error
* *
* from this method for such cases in the release version of your parser. * from this method for such cases in the release version of your parser.
*/ */
@Override
public String getMessage() { public String getMessage() {
return super.getMessage(); return super.getMessage();
} }
......
...@@ -29,12 +29,12 @@ import javax.swing.*; ...@@ -29,12 +29,12 @@ import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
import com.sun.jdi.*;
import com.sun.tools.example.debug.bdi.*; import com.sun.tools.example.debug.bdi.*;
public class ApplicationTool extends JPanel { public class ApplicationTool extends JPanel {
private Environment env; private static final long serialVersionUID = 310966063293205714L;
private ExecutionManager runtime; private ExecutionManager runtime;
private TypeScript script; private TypeScript script;
...@@ -45,13 +45,13 @@ public class ApplicationTool extends JPanel { ...@@ -45,13 +45,13 @@ public class ApplicationTool extends JPanel {
super(new BorderLayout()); super(new BorderLayout());
this.env = env;
this.runtime = env.getExecutionManager(); this.runtime = env.getExecutionManager();
this.script = new TypeScript(PROMPT, false); // No implicit echo. this.script = new TypeScript(PROMPT, false); // No implicit echo.
this.add(script); this.add(script);
script.addActionListener(new ActionListener() { script.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
runtime.sendLineToApplication(script.readln()); runtime.sendLineToApplication(script.readln());
} }
......
...@@ -25,12 +25,10 @@ ...@@ -25,12 +25,10 @@
package com.sun.tools.example.debug.gui; package com.sun.tools.example.debug.gui;
import java.io.*;
import java.util.*; import java.util.*;
import javax.swing.*; import javax.swing.*;
import javax.swing.tree.*; import javax.swing.tree.*;
import javax.swing.event.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
...@@ -40,6 +38,8 @@ import com.sun.tools.example.debug.bdi.*; ...@@ -40,6 +38,8 @@ import com.sun.tools.example.debug.bdi.*;
public class ClassTreeTool extends JPanel { public class ClassTreeTool extends JPanel {
private static final long serialVersionUID = 526178912591739259L;
private Environment env; private Environment env;
private ExecutionManager runtime; private ExecutionManager runtime;
...@@ -49,7 +49,7 @@ public class ClassTreeTool extends JPanel { ...@@ -49,7 +49,7 @@ public class ClassTreeTool extends JPanel {
private JTree tree; private JTree tree;
private DefaultTreeModel treeModel; private DefaultTreeModel treeModel;
private ClassTreeNode root; private ClassTreeNode root;
private SearchPath sourcePath; // private SearchPath sourcePath;
private CommandInterpreter interpreter; private CommandInterpreter interpreter;
...@@ -87,6 +87,7 @@ public class ClassTreeTool extends JPanel { ...@@ -87,6 +87,7 @@ public class ClassTreeTool extends JPanel {
******/ ******/
MouseListener ml = new MouseAdapter() { MouseListener ml = new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
int selRow = tree.getRowForLocation(e.getX(), e.getY()); int selRow = tree.getRowForLocation(e.getX(), e.getY());
TreePath selPath = tree.getPathForLocation(e.getX(), e.getY()); TreePath selPath = tree.getPathForLocation(e.getX(), e.getY());
...@@ -121,6 +122,7 @@ public class ClassTreeTool extends JPanel { ...@@ -121,6 +122,7 @@ public class ClassTreeTool extends JPanel {
// SessionListener // SessionListener
@Override
public void sessionStart(EventObject e) { public void sessionStart(EventObject e) {
// Get system classes and any others loaded before attaching. // Get system classes and any others loaded before attaching.
try { try {
...@@ -134,19 +136,24 @@ public class ClassTreeTool extends JPanel { ...@@ -134,19 +136,24 @@ public class ClassTreeTool extends JPanel {
} }
} }
@Override
public void sessionInterrupt(EventObject e) {} public void sessionInterrupt(EventObject e) {}
@Override
public void sessionContinue(EventObject e) {} public void sessionContinue(EventObject e) {}
// JDIListener // JDIListener
@Override
public void classPrepare(ClassPrepareEventSet e) { public void classPrepare(ClassPrepareEventSet e) {
root.addClass(e.getReferenceType()); root.addClass(e.getReferenceType());
} }
@Override
public void classUnload(ClassUnloadEventSet e) { public void classUnload(ClassUnloadEventSet e) {
root.removeClass(e.getClassName()); root.removeClass(e.getClassName());
} }
@Override
public void vmDisconnect(VMDisconnectEventSet e) { public void vmDisconnect(VMDisconnectEventSet e) {
// Clear contents of this view. // Clear contents of this view.
root = createClassTree(HEADING); root = createClassTree(HEADING);
...@@ -169,6 +176,7 @@ public class ClassTreeTool extends JPanel { ...@@ -169,6 +176,7 @@ public class ClassTreeTool extends JPanel {
this.refTy = refTy; this.refTy = refTy;
} }
@Override
public String toString() { public String toString() {
return name; return name;
} }
...@@ -185,6 +193,7 @@ public class ClassTreeTool extends JPanel { ...@@ -185,6 +193,7 @@ public class ClassTreeTool extends JPanel {
return (refTy == null); return (refTy == null);
} }
@Override
public boolean isLeaf() { public boolean isLeaf() {
return !isPackage(); return !isPackage();
} }
......
...@@ -29,8 +29,6 @@ import java.io.*; ...@@ -29,8 +29,6 @@ import java.io.*;
import java.util.*; import java.util.*;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.request.*;
import com.sun.tools.example.debug.bdi.*; import com.sun.tools.example.debug.bdi.*;
public class CommandInterpreter { public class CommandInterpreter {
...@@ -93,9 +91,9 @@ public class CommandInterpreter { ...@@ -93,9 +91,9 @@ public class CommandInterpreter {
try { try {
ThreadReference[] threads = threads(); ThreadReference[] threads = threads();
long threadID = Long.parseLong(id, 16); long threadID = Long.parseLong(id, 16);
for (int i = 0; i < threads.length; i++) { for (ThreadReference thread2 : threads) {
if (threads[i].uniqueID() == threadID) { if (thread2.uniqueID() == threadID) {
thread = threads[i]; thread = thread2;
break; break;
} }
} }
...@@ -239,16 +237,18 @@ public class CommandInterpreter { ...@@ -239,16 +237,18 @@ public class CommandInterpreter {
for (int i = 0 ; i < tlist.size() ; i++) { for (int i = 0 ; i < tlist.size() ; i++) {
ThreadReference thr = tlist.get(i); ThreadReference thr = tlist.get(i);
int len = Utils.description(thr).length(); int len = Utils.description(thr).length();
if (len > maxId) if (len > maxId) {
maxId = len; maxId = len;
}
String name = thr.name(); String name = thr.name();
int iDot = name.lastIndexOf('.'); int iDot = name.lastIndexOf('.');
if (iDot >= 0 && name.length() > iDot) { if (iDot >= 0 && name.length() > iDot) {
name = name.substring(iDot + 1); name = name.substring(iDot + 1);
} }
if (name.length() > maxName) if (name.length() > maxName) {
maxName = name.length(); maxName = name.length();
} }
}
String maxNumString = String.valueOf(iThread + tlist.size()); String maxNumString = String.valueOf(iThread + tlist.size());
int maxNumDigits = maxNumString.length(); int maxNumDigits = maxNumString.length();
for (int i = 0 ; i < tlist.size() ; i++) { for (int i = 0 ; i < tlist.size() ; i++) {
...@@ -616,7 +616,6 @@ public class CommandInterpreter { ...@@ -616,7 +616,6 @@ public class CommandInterpreter {
int cnt = 1; int cnt = 1;
if (t.hasMoreTokens()) { if (t.hasMoreTokens()) {
String idToken = t.nextToken(); String idToken = t.nextToken();
int n;
try { try {
cnt = Integer.valueOf(idToken).intValue(); cnt = Integer.valueOf(idToken).intValue();
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
...@@ -885,7 +884,6 @@ public class CommandInterpreter { ...@@ -885,7 +884,6 @@ public class CommandInterpreter {
} }
private void commandStop(StringTokenizer t) throws NoSessionException { private void commandStop(StringTokenizer t) throws NoSessionException {
Location bploc;
String token; String token;
if (!t.hasMoreTokens()) { if (!t.hasMoreTokens()) {
......
...@@ -40,6 +40,8 @@ import com.sun.tools.example.debug.event.*; ...@@ -40,6 +40,8 @@ import com.sun.tools.example.debug.event.*;
public class CommandTool extends JPanel { public class CommandTool extends JPanel {
private static final long serialVersionUID = 8613516856378346415L;
private Environment env; private Environment env;
private ContextManager context; private ContextManager context;
...@@ -68,6 +70,7 @@ public class CommandTool extends JPanel { ...@@ -68,6 +70,7 @@ public class CommandTool extends JPanel {
// Establish handler for incoming commands. // Establish handler for incoming commands.
script.addActionListener(new ActionListener() { script.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
interpreter.executeCommand(script.readln()); interpreter.executeCommand(script.readln());
} }
...@@ -107,15 +110,17 @@ public class CommandTool extends JPanel { ...@@ -107,15 +110,17 @@ public class CommandTool extends JPanel {
// JDIListener // JDIListener
@Override
public void accessWatchpoint(AccessWatchpointEventSet e) { public void accessWatchpoint(AccessWatchpointEventSet e) {
setThread(e); setThread(e);
for (EventIterator it = e.eventIterator(); it.hasNext(); ) { for (EventIterator it = e.eventIterator(); it.hasNext(); ) {
Event evt = it.nextEvent(); it.nextEvent();
diagnostics.putString("Watchpoint hit: " + diagnostics.putString("Watchpoint hit: " +
locationString(e)); locationString(e));
} }
} }
@Override
public void classPrepare(ClassPrepareEventSet e) { public void classPrepare(ClassPrepareEventSet e) {
if (context.getVerboseFlag()) { if (context.getVerboseFlag()) {
String name = e.getReferenceType().name(); String name = e.getReferenceType().name();
...@@ -123,6 +128,7 @@ public class CommandTool extends JPanel { ...@@ -123,6 +128,7 @@ public class CommandTool extends JPanel {
} }
} }
@Override
public void classUnload(ClassUnloadEventSet e) { public void classUnload(ClassUnloadEventSet e) {
if (context.getVerboseFlag()) { if (context.getVerboseFlag()) {
diagnostics.putString("Class " + e.getClassName() + diagnostics.putString("Class " + e.getClassName() +
...@@ -130,12 +136,14 @@ public class CommandTool extends JPanel { ...@@ -130,12 +136,14 @@ public class CommandTool extends JPanel {
} }
} }
@Override
public void exception(ExceptionEventSet e) { public void exception(ExceptionEventSet e) {
setThread(e); setThread(e);
String name = e.getException().referenceType().name(); String name = e.getException().referenceType().name();
diagnostics.putString("Exception: " + name); diagnostics.putString("Exception: " + name);
} }
@Override
public void locationTrigger(LocationTriggerEventSet e) { public void locationTrigger(LocationTriggerEventSet e) {
String locString = locationString(e); String locString = locationString(e);
setThread(e); setThread(e);
...@@ -155,15 +163,17 @@ public class CommandTool extends JPanel { ...@@ -155,15 +163,17 @@ public class CommandTool extends JPanel {
} }
} }
@Override
public void modificationWatchpoint(ModificationWatchpointEventSet e) { public void modificationWatchpoint(ModificationWatchpointEventSet e) {
setThread(e); setThread(e);
for (EventIterator it = e.eventIterator(); it.hasNext(); ) { for (EventIterator it = e.eventIterator(); it.hasNext(); ) {
Event evt = it.nextEvent(); it.nextEvent();
diagnostics.putString("Watchpoint hit: " + diagnostics.putString("Watchpoint hit: " +
locationString(e)); locationString(e));
} }
} }
@Override
public void threadDeath(ThreadDeathEventSet e) { public void threadDeath(ThreadDeathEventSet e) {
if (context.getVerboseFlag()) { if (context.getVerboseFlag()) {
diagnostics.putString("Thread " + e.getThread() + diagnostics.putString("Thread " + e.getThread() +
...@@ -171,6 +181,7 @@ public class CommandTool extends JPanel { ...@@ -171,6 +181,7 @@ public class CommandTool extends JPanel {
} }
} }
@Override
public void threadStart(ThreadStartEventSet e) { public void threadStart(ThreadStartEventSet e) {
if (context.getVerboseFlag()) { if (context.getVerboseFlag()) {
diagnostics.putString("Thread " + e.getThread() + diagnostics.putString("Thread " + e.getThread() +
...@@ -178,16 +189,19 @@ public class CommandTool extends JPanel { ...@@ -178,16 +189,19 @@ public class CommandTool extends JPanel {
} }
} }
@Override
public void vmDeath(VMDeathEventSet e) { public void vmDeath(VMDeathEventSet e) {
script.setPrompt(DEFAULT_CMD_PROMPT); script.setPrompt(DEFAULT_CMD_PROMPT);
diagnostics.putString("VM exited"); diagnostics.putString("VM exited");
} }
@Override
public void vmDisconnect(VMDisconnectEventSet e) { public void vmDisconnect(VMDisconnectEventSet e) {
script.setPrompt(DEFAULT_CMD_PROMPT); script.setPrompt(DEFAULT_CMD_PROMPT);
diagnostics.putString("Disconnected from VM"); diagnostics.putString("Disconnected from VM");
} }
@Override
public void vmStart(VMStartEventSet e) { public void vmStart(VMStartEventSet e) {
script.setPrompt(DEFAULT_CMD_PROMPT); script.setPrompt(DEFAULT_CMD_PROMPT);
diagnostics.putString("VM started"); diagnostics.putString("VM started");
...@@ -195,14 +209,17 @@ public class CommandTool extends JPanel { ...@@ -195,14 +209,17 @@ public class CommandTool extends JPanel {
// SessionListener // SessionListener
@Override
public void sessionStart(EventObject e) {} public void sessionStart(EventObject e) {}
@Override
public void sessionInterrupt(EventObject e) { public void sessionInterrupt(EventObject e) {
Thread.yield(); // fetch output Thread.yield(); // fetch output
diagnostics.putString("VM interrupted by user."); diagnostics.putString("VM interrupted by user.");
script.setPrompt(DEFAULT_CMD_PROMPT); script.setPrompt(DEFAULT_CMD_PROMPT);
} }
@Override
public void sessionContinue(EventObject e) { public void sessionContinue(EventObject e) {
diagnostics.putString("Execution resumed."); diagnostics.putString("Execution resumed.");
script.setPrompt(DEFAULT_CMD_PROMPT); script.setPrompt(DEFAULT_CMD_PROMPT);
...@@ -210,23 +227,28 @@ public class CommandTool extends JPanel { ...@@ -210,23 +227,28 @@ public class CommandTool extends JPanel {
// SpecListener // SpecListener
@Override
public void breakpointSet(SpecEvent e) { public void breakpointSet(SpecEvent e) {
EventRequestSpec spec = e.getEventRequestSpec(); EventRequestSpec spec = e.getEventRequestSpec();
diagnostics.putString("Breakpoint set at " + spec + "."); diagnostics.putString("Breakpoint set at " + spec + ".");
} }
@Override
public void breakpointDeferred(SpecEvent e) { public void breakpointDeferred(SpecEvent e) {
EventRequestSpec spec = e.getEventRequestSpec(); EventRequestSpec spec = e.getEventRequestSpec();
diagnostics.putString("Breakpoint will be set at " + diagnostics.putString("Breakpoint will be set at " +
spec + " when its class is loaded."); spec + " when its class is loaded.");
} }
@Override
public void breakpointDeleted(SpecEvent e) { public void breakpointDeleted(SpecEvent e) {
EventRequestSpec spec = e.getEventRequestSpec(); EventRequestSpec spec = e.getEventRequestSpec();
diagnostics.putString("Breakpoint at " + spec.toString() + " deleted."); diagnostics.putString("Breakpoint at " + spec.toString() + " deleted.");
} }
@Override
public void breakpointResolved(SpecEvent e) { public void breakpointResolved(SpecEvent e) {
EventRequestSpec spec = e.getEventRequestSpec(); EventRequestSpec spec = e.getEventRequestSpec();
diagnostics.putString("Breakpoint resolved to " + spec.toString() + "."); diagnostics.putString("Breakpoint resolved to " + spec.toString() + ".");
} }
@Override
public void breakpointError(SpecErrorEvent e) { public void breakpointError(SpecErrorEvent e) {
EventRequestSpec spec = e.getEventRequestSpec(); EventRequestSpec spec = e.getEventRequestSpec();
diagnostics.putString("Deferred breakpoint at " + diagnostics.putString("Deferred breakpoint at " +
...@@ -236,25 +258,35 @@ public class CommandTool extends JPanel { ...@@ -236,25 +258,35 @@ public class CommandTool extends JPanel {
//### Add info for watchpoints and exceptions //### Add info for watchpoints and exceptions
@Override
public void watchpointSet(SpecEvent e) { public void watchpointSet(SpecEvent e) {
} }
@Override
public void watchpointDeferred(SpecEvent e) { public void watchpointDeferred(SpecEvent e) {
} }
@Override
public void watchpointDeleted(SpecEvent e) { public void watchpointDeleted(SpecEvent e) {
} }
@Override
public void watchpointResolved(SpecEvent e) { public void watchpointResolved(SpecEvent e) {
} }
@Override
public void watchpointError(SpecErrorEvent e) { public void watchpointError(SpecErrorEvent e) {
} }
@Override
public void exceptionInterceptSet(SpecEvent e) { public void exceptionInterceptSet(SpecEvent e) {
} }
@Override
public void exceptionInterceptDeferred(SpecEvent e) { public void exceptionInterceptDeferred(SpecEvent e) {
} }
@Override
public void exceptionInterceptDeleted(SpecEvent e) { public void exceptionInterceptDeleted(SpecEvent e) {
} }
@Override
public void exceptionInterceptResolved(SpecEvent e) { public void exceptionInterceptResolved(SpecEvent e) {
} }
@Override
public void exceptionInterceptError(SpecErrorEvent e) { public void exceptionInterceptError(SpecErrorEvent e) {
} }
...@@ -263,6 +295,7 @@ public class CommandTool extends JPanel { ...@@ -263,6 +295,7 @@ public class CommandTool extends JPanel {
// If the user selects a new current thread or frame, update prompt. // If the user selects a new current thread or frame, update prompt.
@Override
public void currentFrameChanged(CurrentFrameChangedEvent e) { public void currentFrameChanged(CurrentFrameChangedEvent e) {
// Update prompt only if affect thread is current. // Update prompt only if affect thread is current.
ThreadReference thread = e.getThread(); ThreadReference thread = e.getThread();
......
...@@ -46,7 +46,7 @@ public class ContextManager { ...@@ -46,7 +46,7 @@ public class ContextManager {
private boolean verbose; private boolean verbose;
private Vector<ContextListener> contextListeners = new Vector<ContextListener>(); private ArrayList<ContextListener> contextListeners = new ArrayList<ContextListener>();
public ContextManager(Environment env) { public ContextManager(Environment env) {
classManager = env.getClassManager(); classManager = env.getClassManager();
...@@ -264,11 +264,11 @@ public class ContextManager { ...@@ -264,11 +264,11 @@ public class ContextManager {
private void notifyCurrentFrameChanged(ThreadInfo tinfo, int index, private void notifyCurrentFrameChanged(ThreadInfo tinfo, int index,
boolean invalidate) { boolean invalidate) {
Vector l = (Vector)contextListeners.clone(); ArrayList<ContextListener> l = new ArrayList<ContextListener>(contextListeners);
CurrentFrameChangedEvent evt = CurrentFrameChangedEvent evt =
new CurrentFrameChangedEvent(this, tinfo, index, invalidate); new CurrentFrameChangedEvent(this, tinfo, index, invalidate);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((ContextListener)l.elementAt(i)).currentFrameChanged(evt); l.get(i).currentFrameChanged(evt);
} }
} }
...@@ -277,28 +277,34 @@ public class ContextManager { ...@@ -277,28 +277,34 @@ public class ContextManager {
// SessionListener // SessionListener
@Override
public void sessionStart(EventObject e) { public void sessionStart(EventObject e) {
invalidateCurrentThread(); invalidateCurrentThread();
} }
@Override
public void sessionInterrupt(EventObject e) { public void sessionInterrupt(EventObject e) {
setCurrentThreadInvalidate(currentThread); setCurrentThreadInvalidate(currentThread);
} }
@Override
public void sessionContinue(EventObject e) { public void sessionContinue(EventObject e) {
invalidateCurrentThread(); invalidateCurrentThread();
} }
// JDIListener // JDIListener
@Override
public void locationTrigger(LocationTriggerEventSet e) { public void locationTrigger(LocationTriggerEventSet e) {
setCurrentThreadInvalidate(e.getThread()); setCurrentThreadInvalidate(e.getThread());
} }
@Override
public void exception(ExceptionEventSet e) { public void exception(ExceptionEventSet e) {
setCurrentThreadInvalidate(e.getThread()); setCurrentThreadInvalidate(e.getThread());
} }
@Override
public void vmDisconnect(VMDisconnectEventSet e) { public void vmDisconnect(VMDisconnectEventSet e) {
invalidateCurrentThread(); invalidateCurrentThread();
} }
......
...@@ -31,6 +31,7 @@ import java.util.EventObject; ...@@ -31,6 +31,7 @@ import java.util.EventObject;
public class CurrentFrameChangedEvent extends EventObject { public class CurrentFrameChangedEvent extends EventObject {
private static final long serialVersionUID = 4214479486546762179L;
private ThreadInfo tinfo; private ThreadInfo tinfo;
private int index; private int index;
private boolean invalidate; private boolean invalidate;
......
...@@ -26,8 +26,6 @@ ...@@ -26,8 +26,6 @@
package com.sun.tools.example.debug.gui; package com.sun.tools.example.debug.gui;
import java.io.*; import java.io.*;
import java.util.*;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.tools.example.debug.bdi.*; import com.sun.tools.example.debug.bdi.*;
......
...@@ -26,8 +26,6 @@ ...@@ -26,8 +26,6 @@
package com.sun.tools.example.debug.gui; package com.sun.tools.example.debug.gui;
import java.io.*; import java.io.*;
import java.util.*;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.*; import javax.swing.border.*;
import java.awt.*; import java.awt.*;
...@@ -38,6 +36,7 @@ import com.sun.tools.example.debug.bdi.*; ...@@ -38,6 +36,7 @@ import com.sun.tools.example.debug.bdi.*;
public class GUI extends JPanel { public class GUI extends JPanel {
private static final long serialVersionUID = 3292463234530679091L;
private CommandTool cmdTool; private CommandTool cmdTool;
private ApplicationTool appTool; private ApplicationTool appTool;
//###HACK## //###HACK##
...@@ -87,7 +86,7 @@ public class GUI extends JPanel { ...@@ -87,7 +86,7 @@ public class GUI extends JPanel {
threadTreeTool = new ThreadTreeTool(env); threadTreeTool = new ThreadTreeTool(env);
threadTreeTool.setPreferredSize(new java.awt.Dimension(200, 450)); threadTreeTool.setPreferredSize(new java.awt.Dimension(200, 450));
JTabbedPane treePane = new JTabbedPane(JTabbedPane.BOTTOM); JTabbedPane treePane = new JTabbedPane(SwingConstants.BOTTOM);
treePane.addTab("Source", null, sourceTreeTool); treePane.addTab("Source", null, sourceTreeTool);
treePane.addTab("Classes", null, classTreeTool); treePane.addTab("Classes", null, classTreeTool);
treePane.addTab("Threads", null, threadTreeTool); treePane.addTab("Threads", null, threadTreeTool);
...@@ -139,12 +138,9 @@ public class GUI extends JPanel { ...@@ -139,12 +138,9 @@ public class GUI extends JPanel {
} }
public static void main(String argv[]) { public static void main(String argv[]) {
String remote = null;
String clsName = ""; String clsName = "";
String progArgs = ""; String progArgs = "";
String javaArgs = ""; String javaArgs = "";
boolean verbose = false; //### Not implemented.
final Environment env = new Environment(); final Environment env = new Environment();
JPanel mainPanel = new GUI(env); JPanel mainPanel = new GUI(env);
...@@ -246,13 +242,14 @@ public class GUI extends JPanel { ...@@ -246,13 +242,14 @@ public class GUI extends JPanel {
frame.setContentPane(mainPanel); frame.setContentPane(mainPanel);
frame.addWindowListener(new WindowAdapter() { frame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) { public void windowClosing(WindowEvent e) {
env.terminate(); env.terminate();
} }
}); });
frame.pack(); frame.pack();
frame.show(); frame.setVisible(true);
} }
......
...@@ -28,7 +28,6 @@ package com.sun.tools.example.debug.gui; ...@@ -28,7 +28,6 @@ package com.sun.tools.example.debug.gui;
import java.io.File; import java.io.File;
import java.util.Hashtable; import java.util.Hashtable;
import java.util.Enumeration; import java.util.Enumeration;
import javax.swing.*;
import javax.swing.filechooser.*; import javax.swing.filechooser.*;
//### Renamed from 'ExampleFileFilter.java' provided with Swing demos. //### Renamed from 'ExampleFileFilter.java' provided with Swing demos.
...@@ -93,8 +92,12 @@ public class JDBFileFilter extends FileFilter { ...@@ -93,8 +92,12 @@ public class JDBFileFilter extends FileFilter {
*/ */
public JDBFileFilter(String extension, String description) { public JDBFileFilter(String extension, String description) {
this(); this();
if(extension!=null) addExtension(extension); if(extension!=null) {
if(description!=null) setDescription(description); addExtension(extension);
}
if(description!=null) {
setDescription(description);
}
} }
/** /**
...@@ -120,11 +123,13 @@ public class JDBFileFilter extends FileFilter { ...@@ -120,11 +123,13 @@ public class JDBFileFilter extends FileFilter {
*/ */
public JDBFileFilter(String[] filters, String description) { public JDBFileFilter(String[] filters, String description) {
this(); this();
for (int i = 0; i < filters.length; i++) { for (String filter : filters) {
// add filters one by one // add filters one by one
addExtension(filters[i]); addExtension(filter);
} }
if(description!=null) setDescription(description); if(description!=null) {
setDescription(description);
}
} }
/** /**
...@@ -136,6 +141,7 @@ public class JDBFileFilter extends FileFilter { ...@@ -136,6 +141,7 @@ public class JDBFileFilter extends FileFilter {
* @see #getExtension * @see #getExtension
* @see FileFilter#accepts * @see FileFilter#accepts
*/ */
@Override
public boolean accept(File f) { public boolean accept(File f) {
if(f != null) { if(f != null) {
if(f.isDirectory()) { if(f.isDirectory()) {
...@@ -196,6 +202,7 @@ public class JDBFileFilter extends FileFilter { ...@@ -196,6 +202,7 @@ public class JDBFileFilter extends FileFilter {
* @see isExtensionListInDescription * @see isExtensionListInDescription
* @see FileFilter#getDescription * @see FileFilter#getDescription
*/ */
@Override
public String getDescription() { public String getDescription() {
if(fullDescription == null) { if(fullDescription == null) {
if(description == null || isExtensionListInDescription()) { if(description == null || isExtensionListInDescription()) {
......
...@@ -31,7 +31,6 @@ import java.awt.event.*; ...@@ -31,7 +31,6 @@ import java.awt.event.*;
import java.util.Vector; import java.util.Vector;
import java.util.List; import java.util.List;
import com.sun.jdi.*;
import com.sun.tools.example.debug.bdi.*; import com.sun.tools.example.debug.bdi.*;
//### This is currently just a placeholder! //### This is currently just a placeholder!
...@@ -57,6 +56,7 @@ class JDBMenuBar extends JMenuBar { ...@@ -57,6 +56,7 @@ class JDBMenuBar extends JMenuBar {
JMenuItem openItem = new JMenuItem("Open...", 'O'); JMenuItem openItem = new JMenuItem("Open...", 'O');
openItem.addActionListener(new ActionListener() { openItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
openCommand(); openCommand();
} }
...@@ -93,6 +93,7 @@ class JDBMenuBar extends JMenuBar { ...@@ -93,6 +93,7 @@ class JDBMenuBar extends JMenuBar {
JMenuItem monitorItem = new JMenuItem("Monitor Expression...", 'M'); JMenuItem monitorItem = new JMenuItem("Monitor Expression...", 'M');
monitorItem.addActionListener(new ActionListener() { monitorItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
monitorCommand(); monitorCommand();
} }
...@@ -101,6 +102,7 @@ class JDBMenuBar extends JMenuBar { ...@@ -101,6 +102,7 @@ class JDBMenuBar extends JMenuBar {
JMenuItem unmonitorItem = new JMenuItem("Unmonitor Expression..."); JMenuItem unmonitorItem = new JMenuItem("Unmonitor Expression...");
unmonitorItem.addActionListener(new ActionListener() { unmonitorItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
unmonitorCommand(); unmonitorCommand();
} }
...@@ -110,6 +112,7 @@ class JDBMenuBar extends JMenuBar { ...@@ -110,6 +112,7 @@ class JDBMenuBar extends JMenuBar {
JMenu breakpointMenu = new JMenu("Breakpoint"); JMenu breakpointMenu = new JMenu("Breakpoint");
JMenuItem stopItem = new JMenuItem("Stop in...", 'S'); JMenuItem stopItem = new JMenuItem("Stop in...", 'S');
stopItem.addActionListener(new ActionListener() { stopItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
buildBreakpoint(); buildBreakpoint();
} }
...@@ -176,6 +179,7 @@ class JDBMenuBar extends JMenuBar { ...@@ -176,6 +179,7 @@ class JDBMenuBar extends JMenuBar {
mi.setToolTipText(toolTip); mi.setToolTipText(toolTip);
final String cmd = command; final String cmd = command;
mi.addActionListener(new ActionListener() { mi.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
interpreter.executeCommand(cmd); interpreter.executeCommand(cmd);
} }
......
...@@ -26,10 +26,8 @@ ...@@ -26,10 +26,8 @@
package com.sun.tools.example.debug.gui; package com.sun.tools.example.debug.gui;
import javax.swing.*; import javax.swing.*;
import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
import com.sun.jdi.*;
import com.sun.tools.example.debug.bdi.*; import com.sun.tools.example.debug.bdi.*;
class JDBToolBar extends JToolBar { class JDBToolBar extends JToolBar {
...@@ -92,6 +90,7 @@ class JDBToolBar extends JToolBar { ...@@ -92,6 +90,7 @@ class JDBToolBar extends JToolBar {
button.setToolTipText(toolTip); button.setToolTipText(toolTip);
final String cmd = command; final String cmd = command;
button.addActionListener(new ActionListener() { button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
interpreter.executeCommand(cmd); interpreter.executeCommand(cmd);
} }
......
...@@ -29,18 +29,10 @@ import java.util.List; ...@@ -29,18 +29,10 @@ import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Map; import java.util.Map;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.io.IOException;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container; import java.awt.Container;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.Border; import javax.swing.border.Border;
import javax.swing.border.TitledBorder; import javax.swing.border.TitledBorder;
...@@ -98,6 +90,7 @@ class LaunchTool { ...@@ -98,6 +90,7 @@ class LaunchTool {
comp.add(panel); comp.add(panel);
} }
@Override
String getText() { String getText() {
return textField.getText(); return textField.getText();
} }
...@@ -114,6 +107,7 @@ class LaunchTool { ...@@ -114,6 +107,7 @@ class LaunchTool {
comp.add(panel); comp.add(panel);
} }
@Override
String getText() { String getText() {
return ((Connector.BooleanArgument)arg) return ((Connector.BooleanArgument)arg)
.stringValueOf(check.getModel().isSelected()); .stringValueOf(check.getModel().isSelected());
...@@ -147,6 +141,7 @@ class LaunchTool { ...@@ -147,6 +141,7 @@ class LaunchTool {
final boolean[] oked = {false}; final boolean[] oked = {false};
JPanel buttonPanel = okCancel( dialog, new ActionListener() { JPanel buttonPanel = okCancel( dialog, new ActionListener() {
@Override
public void actionPerformed(ActionEvent event) { public void actionPerformed(ActionEvent event) {
if (radioGroup.getSelection() == null) { if (radioGroup.getSelection() == null) {
JOptionPane.showMessageDialog(dialog, JOptionPane.showMessageDialog(dialog,
...@@ -162,7 +157,7 @@ class LaunchTool { ...@@ -162,7 +157,7 @@ class LaunchTool {
} ); } );
content.add(BorderLayout.SOUTH, buttonPanel); content.add(BorderLayout.SOUTH, buttonPanel);
dialog.pack(); dialog.pack();
dialog.show(); dialog.setVisible(true);
return oked[0] ? return oked[0] ?
modelToConnector.get(radioGroup.getSelection()) : modelToConnector.get(radioGroup.getSelection()) :
...@@ -178,7 +173,7 @@ class LaunchTool { ...@@ -178,7 +173,7 @@ class LaunchTool {
Container content = dialog.getContentPane(); Container content = dialog.getContentPane();
JPanel guts = new JPanel(); JPanel guts = new JPanel();
Border etched = BorderFactory.createEtchedBorder(); Border etched = BorderFactory.createEtchedBorder();
Border titled = BorderFactory.createTitledBorder(etched, BorderFactory.createTitledBorder(etched,
connector.description(), connector.description(),
TitledBorder.LEFT, TitledBorder.TOP); TitledBorder.LEFT, TitledBorder.TOP);
guts.setBorder(etched); guts.setBorder(etched);
...@@ -199,6 +194,7 @@ class LaunchTool { ...@@ -199,6 +194,7 @@ class LaunchTool {
content.add(guts); content.add(guts);
JPanel buttonPanel = okCancel( dialog, new ActionListener() { JPanel buttonPanel = okCancel( dialog, new ActionListener() {
@Override
public void actionPerformed(ActionEvent event) { public void actionPerformed(ActionEvent event) {
for (ArgRep ar : argReps) { for (ArgRep ar : argReps) {
if (!ar.isSpecified()) { if (!ar.isSpecified()) {
...@@ -236,7 +232,7 @@ class LaunchTool { ...@@ -236,7 +232,7 @@ class LaunchTool {
} ); } );
content.add(BorderLayout.SOUTH, buttonPanel); content.add(BorderLayout.SOUTH, buttonPanel);
dialog.pack(); dialog.pack();
dialog.show(); dialog.setVisible(true);
} }
private JPanel okCancel(final JDialog dialog, ActionListener okListener) { private JPanel okCancel(final JDialog dialog, ActionListener okListener) {
...@@ -247,6 +243,7 @@ class LaunchTool { ...@@ -247,6 +243,7 @@ class LaunchTool {
buttonPanel.add(cancel); buttonPanel.add(cancel);
ok.addActionListener(okListener); ok.addActionListener(okListener);
cancel.addActionListener( new ActionListener() { cancel.addActionListener( new ActionListener() {
@Override
public void actionPerformed(ActionEvent event) { public void actionPerformed(ActionEvent event) {
dialog.setVisible(false); dialog.setVisible(false);
dialog.dispose(); dialog.dispose();
......
...@@ -42,10 +42,12 @@ public class MonitorListModel extends AbstractListModel { ...@@ -42,10 +42,12 @@ public class MonitorListModel extends AbstractListModel {
//### remove listeners on exit! //### remove listeners on exit!
} }
@Override
public Object getElementAt(int index) { public Object getElementAt(int index) {
return monitors.get(index); return monitors.get(index);
} }
@Override
public int getSize() { public int getSize() {
return monitors.size(); return monitors.size();
} }
...@@ -70,7 +72,7 @@ public class MonitorListModel extends AbstractListModel { ...@@ -70,7 +72,7 @@ public class MonitorListModel extends AbstractListModel {
return Collections.unmodifiableList(monitors); return Collections.unmodifiableList(monitors);
} }
public Iterator iterator() { public Iterator<?> iterator() {
return monitors().iterator(); return monitors().iterator();
} }
...@@ -80,7 +82,8 @@ public class MonitorListModel extends AbstractListModel { ...@@ -80,7 +82,8 @@ public class MonitorListModel extends AbstractListModel {
private class MonitorListListener implements ContextListener { private class MonitorListListener implements ContextListener {
public void currentFrameChanged(CurrentFrameChangedEvent e) { @Override
public void currentFrameChanged(final CurrentFrameChangedEvent e) {
invalidate(); invalidate();
} }
} }
......
...@@ -25,15 +25,9 @@ ...@@ -25,15 +25,9 @@
package com.sun.tools.example.debug.gui; package com.sun.tools.example.debug.gui;
import java.io.*;
import java.util.*;
import javax.swing.*; import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.event.*; import javax.swing.event.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.tools.example.debug.bdi.*; import com.sun.tools.example.debug.bdi.*;
import com.sun.tools.example.debug.expr.ExpressionParser; import com.sun.tools.example.debug.expr.ExpressionParser;
...@@ -41,6 +35,7 @@ import com.sun.tools.example.debug.expr.ParseException; ...@@ -41,6 +35,7 @@ import com.sun.tools.example.debug.expr.ParseException;
public class MonitorTool extends JPanel { public class MonitorTool extends JPanel {
private static final long serialVersionUID = -645235951031726647L;
private ExecutionManager runtime; private ExecutionManager runtime;
private ContextManager context; private ContextManager context;
...@@ -64,6 +59,7 @@ public class MonitorTool extends JPanel { ...@@ -64,6 +59,7 @@ public class MonitorTool extends JPanel {
} }
private class MonitorToolListener implements ListSelectionListener { private class MonitorToolListener implements ListSelectionListener {
@Override
public void valueChanged(ListSelectionEvent e) { public void valueChanged(ListSelectionEvent e) {
int index = list.getSelectedIndex(); int index = list.getSelectedIndex();
if (index != -1) { if (index != -1) {
...@@ -78,6 +74,7 @@ public class MonitorTool extends JPanel { ...@@ -78,6 +74,7 @@ public class MonitorTool extends JPanel {
IncompatibleThreadStateException { IncompatibleThreadStateException {
ExpressionParser.GetFrame frameGetter = ExpressionParser.GetFrame frameGetter =
new ExpressionParser.GetFrame() { new ExpressionParser.GetFrame() {
@Override
public StackFrame get() public StackFrame get()
throws IncompatibleThreadStateException throws IncompatibleThreadStateException
{ {
...@@ -93,6 +90,7 @@ public class MonitorTool extends JPanel { ...@@ -93,6 +90,7 @@ public class MonitorTool extends JPanel {
private class MonitorRenderer extends DefaultListCellRenderer { private class MonitorRenderer extends DefaultListCellRenderer {
@Override
public Component getListCellRendererComponent(JList list, public Component getListCellRendererComponent(JList list,
Object value, Object value,
int index, int index,
......
...@@ -58,8 +58,8 @@ public class SearchPath { ...@@ -58,8 +58,8 @@ public class SearchPath {
} }
public File resolve(String relativeFileName) { public File resolve(String relativeFileName) {
for (int i = 0; i < pathArray.length; i++) { for (String element : pathArray) {
File path = new File(pathArray[i], relativeFileName); File path = new File(element, relativeFileName);
if (path.exists()) { if (path.exists()) {
return path; return path;
} }
...@@ -76,8 +76,8 @@ public class SearchPath { ...@@ -76,8 +76,8 @@ public class SearchPath {
// classpath is retained. This is the one that will be // classpath is retained. This is the one that will be
// found if we later do a 'resolve'. // found if we later do a 'resolve'.
SortedSet<String> s = new TreeSet<String>(); // sorted, no duplicates SortedSet<String> s = new TreeSet<String>(); // sorted, no duplicates
for (int i = 0; i < pathArray.length; i++) { for (String element : pathArray) {
File path = new File(pathArray[i], relativeDirName); File path = new File(element, relativeDirName);
if (path.exists()) { if (path.exists()) {
String[] childArray = path.list(filter); String[] childArray = path.list(filter);
if (childArray != null) { if (childArray != null) {
......
...@@ -25,22 +25,25 @@ ...@@ -25,22 +25,25 @@
package com.sun.tools.example.debug.gui; package com.sun.tools.example.debug.gui;
import javax.swing.*;
import javax.swing.tree.*; import javax.swing.tree.*;
public class SingleLeafTreeSelectionModel extends DefaultTreeSelectionModel { public class SingleLeafTreeSelectionModel extends DefaultTreeSelectionModel {
private static final long serialVersionUID = -7849105107888117679L;
SingleLeafTreeSelectionModel() { SingleLeafTreeSelectionModel() {
super(); super();
selectionMode = SINGLE_TREE_SELECTION; selectionMode = SINGLE_TREE_SELECTION;
} }
@Override
public void setSelectionPath(TreePath path) { public void setSelectionPath(TreePath path) {
if(((TreeNode)(path.getLastPathComponent())).isLeaf()) { if(((TreeNode)(path.getLastPathComponent())).isLeaf()) {
super.setSelectionPath(path); super.setSelectionPath(path);
} }
} }
@Override
public void setSelectionPaths(TreePath[] paths) { public void setSelectionPaths(TreePath[] paths) {
// Only look at first path, as all others will be // Only look at first path, as all others will be
// ignored anyway in single tree selection mode. // ignored anyway in single tree selection mode.
...@@ -49,12 +52,14 @@ public class SingleLeafTreeSelectionModel extends DefaultTreeSelectionModel { ...@@ -49,12 +52,14 @@ public class SingleLeafTreeSelectionModel extends DefaultTreeSelectionModel {
} }
} }
@Override
public void addSelectionPath(TreePath path) { public void addSelectionPath(TreePath path) {
if(((TreeNode)(path.getLastPathComponent())).isLeaf()) { if(((TreeNode)(path.getLastPathComponent())).isLeaf()) {
super.setSelectionPath(path); super.setSelectionPath(path);
} }
} }
@Override
public void addSelectionPaths(TreePath[] paths) { public void addSelectionPaths(TreePath[] paths) {
// Only look at first path, as all others will be // Only look at first path, as all others will be
// ignored anyway in single tree selection mode. // ignored anyway in single tree selection mode.
......
...@@ -31,7 +31,6 @@ import java.util.*; ...@@ -31,7 +31,6 @@ import java.util.*;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.tools.example.debug.event.*; import com.sun.tools.example.debug.event.*;
import com.sun.tools.example.debug.bdi.*;
/** /**
* Manage the list of source files. * Manage the list of source files.
...@@ -45,7 +44,7 @@ public class SourceManager { ...@@ -45,7 +44,7 @@ public class SourceManager {
private List<SourceModel> sourceList; private List<SourceModel> sourceList;
private SearchPath sourcePath; private SearchPath sourcePath;
private Vector<SourceListener> sourceListeners = new Vector<SourceListener>(); private ArrayList<SourceListener> sourceListeners = new ArrayList<SourceListener>();
private Map<ReferenceType, SourceModel> classToSource = new HashMap<ReferenceType, SourceModel>(); private Map<ReferenceType, SourceModel> classToSource = new HashMap<ReferenceType, SourceModel>();
...@@ -79,18 +78,18 @@ public class SourceManager { ...@@ -79,18 +78,18 @@ public class SourceManager {
} }
public void addSourceListener(SourceListener l) { public void addSourceListener(SourceListener l) {
sourceListeners.addElement(l); sourceListeners.add(l);
} }
public void removeSourceListener(SourceListener l) { public void removeSourceListener(SourceListener l) {
sourceListeners.removeElement(l); sourceListeners.remove(l);
} }
private void notifySourcepathChanged() { private void notifySourcepathChanged() {
Vector l = (Vector)sourceListeners.clone(); ArrayList<SourceListener> l = new ArrayList<SourceListener>(sourceListeners);
SourcepathChangedEvent evt = new SourcepathChangedEvent(this); SourcepathChangedEvent evt = new SourcepathChangedEvent(this);
for (int i = 0; i < l.size(); i++) { for (int i = 0; i < l.size(); i++) {
((SourceListener)l.elementAt(i)).sourcepathChanged(evt); l.get(i).sourcepathChanged(evt);
} }
} }
...@@ -163,6 +162,7 @@ public class SourceManager { ...@@ -163,6 +162,7 @@ public class SourceManager {
private class SMClassListener extends JDIAdapter private class SMClassListener extends JDIAdapter
implements JDIListener { implements JDIListener {
@Override
public void classPrepare(ClassPrepareEventSet e) { public void classPrepare(ClassPrepareEventSet e) {
ReferenceType refType = e.getReferenceType(); ReferenceType refType = e.getReferenceType();
SourceModel sm = sourceForClass(refType); SourceModel sm = sourceForClass(refType);
...@@ -171,6 +171,7 @@ public class SourceManager { ...@@ -171,6 +171,7 @@ public class SourceManager {
} }
} }
@Override
public void classUnload(ClassUnloadEventSet e) { public void classUnload(ClassUnloadEventSet e) {
//### iterate through looking for (e.getTypeName()). //### iterate through looking for (e.getTypeName()).
//### then remove it. //### then remove it.
......
...@@ -31,8 +31,6 @@ import java.util.*; ...@@ -31,8 +31,6 @@ import java.util.*;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.request.*; import com.sun.jdi.request.*;
import com.sun.tools.example.debug.bdi.*;
import javax.swing.*; import javax.swing.*;
/** /**
...@@ -101,6 +99,7 @@ public class SourceModel extends AbstractListModel { ...@@ -101,6 +99,7 @@ public class SourceModel extends AbstractListModel {
// **** Implement ListModel ***** // **** Implement ListModel *****
@Override
public Object getElementAt(int index) { public Object getElementAt(int index) {
if (sourceLines == null) { if (sourceLines == null) {
initialize(); initialize();
...@@ -108,6 +107,7 @@ public class SourceModel extends AbstractListModel { ...@@ -108,6 +107,7 @@ public class SourceModel extends AbstractListModel {
return sourceLines.get(index); return sourceLines.get(index);
} }
@Override
public int getSize() { public int getSize() {
if (sourceLines == null) { if (sourceLines == null) {
initialize(); initialize();
......
...@@ -26,8 +26,6 @@ ...@@ -26,8 +26,6 @@
package com.sun.tools.example.debug.gui; package com.sun.tools.example.debug.gui;
import java.io.*; import java.io.*;
import java.util.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
import javax.swing.*; import javax.swing.*;
...@@ -35,13 +33,12 @@ import javax.swing.*; ...@@ -35,13 +33,12 @@ import javax.swing.*;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.request.*; import com.sun.jdi.request.*;
import com.sun.tools.example.debug.event.*;
import com.sun.tools.example.debug.bdi.*; import com.sun.tools.example.debug.bdi.*;
import java.util.List;
public class SourceTool extends JPanel { public class SourceTool extends JPanel {
private static final long serialVersionUID = -5461299294186395257L;
private Environment env; private Environment env;
private ExecutionManager runtime; private ExecutionManager runtime;
...@@ -99,6 +96,7 @@ public class SourceTool extends JPanel { ...@@ -99,6 +96,7 @@ public class SourceTool extends JPanel {
// ContextListener // ContextListener
@Override
public void currentFrameChanged(CurrentFrameChangedEvent e) { public void currentFrameChanged(CurrentFrameChangedEvent e) {
showSourceContext(e.getThread(), e.getIndex()); showSourceContext(e.getThread(), e.getIndex());
} }
...@@ -108,6 +106,7 @@ public class SourceTool extends JPanel { ...@@ -108,6 +106,7 @@ public class SourceTool extends JPanel {
// SourceListener // SourceListener
@Override
public void sourcepathChanged(SourcepathChangedEvent e) { public void sourcepathChanged(SourcepathChangedEvent e) {
// Reload source view if its contents depend // Reload source view if its contents depend
// on the source path. // on the source path.
...@@ -120,12 +119,15 @@ public class SourceTool extends JPanel { ...@@ -120,12 +119,15 @@ public class SourceTool extends JPanel {
// SpecListener // SpecListener
@Override
public void breakpointSet(SpecEvent e) { public void breakpointSet(SpecEvent e) {
breakpointResolved(e); breakpointResolved(e);
} }
@Override
public void breakpointDeferred(SpecEvent e) { } public void breakpointDeferred(SpecEvent e) { }
@Override
public void breakpointDeleted(SpecEvent e) { public void breakpointDeleted(SpecEvent e) {
BreakpointRequest req = (BreakpointRequest)e.getEventRequest(); BreakpointRequest req = (BreakpointRequest)e.getEventRequest();
Location loc = req.location(); Location loc = req.location();
...@@ -139,6 +141,7 @@ public class SourceTool extends JPanel { ...@@ -139,6 +141,7 @@ public class SourceTool extends JPanel {
} }
} }
@Override
public void breakpointResolved(SpecEvent e) { public void breakpointResolved(SpecEvent e) {
BreakpointRequest req = (BreakpointRequest)e.getEventRequest(); BreakpointRequest req = (BreakpointRequest)e.getEventRequest();
Location loc = req.location(); Location loc = req.location();
...@@ -150,29 +153,40 @@ public class SourceTool extends JPanel { ...@@ -150,29 +153,40 @@ public class SourceTool extends JPanel {
} }
} }
@Override
public void breakpointError(SpecErrorEvent e) { public void breakpointError(SpecErrorEvent e) {
breakpointDeleted(e); breakpointDeleted(e);
} }
@Override
public void watchpointSet(SpecEvent e) { public void watchpointSet(SpecEvent e) {
} }
@Override
public void watchpointDeferred(SpecEvent e) { public void watchpointDeferred(SpecEvent e) {
} }
@Override
public void watchpointDeleted(SpecEvent e) { public void watchpointDeleted(SpecEvent e) {
} }
@Override
public void watchpointResolved(SpecEvent e) { public void watchpointResolved(SpecEvent e) {
} }
@Override
public void watchpointError(SpecErrorEvent e) { public void watchpointError(SpecErrorEvent e) {
} }
@Override
public void exceptionInterceptSet(SpecEvent e) { public void exceptionInterceptSet(SpecEvent e) {
} }
@Override
public void exceptionInterceptDeferred(SpecEvent e) { public void exceptionInterceptDeferred(SpecEvent e) {
} }
@Override
public void exceptionInterceptDeleted(SpecEvent e) { public void exceptionInterceptDeleted(SpecEvent e) {
} }
@Override
public void exceptionInterceptResolved(SpecEvent e) { public void exceptionInterceptResolved(SpecEvent e) {
} }
@Override
public void exceptionInterceptError(SpecErrorEvent e) { public void exceptionInterceptError(SpecErrorEvent e) {
} }
} }
...@@ -269,6 +283,7 @@ public class SourceTool extends JPanel { ...@@ -269,6 +283,7 @@ public class SourceTool extends JPanel {
private class SourceLineRenderer extends DefaultListCellRenderer { private class SourceLineRenderer extends DefaultListCellRenderer {
@Override
public Component getListCellRendererComponent(JList list, public Component getListCellRendererComponent(JList list,
Object value, Object value,
int index, int index,
...@@ -301,6 +316,7 @@ public class SourceTool extends JPanel { ...@@ -301,6 +316,7 @@ public class SourceTool extends JPanel {
return this; return this;
} }
@Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize(); Dimension dim = super.getPreferredSize();
return new Dimension(dim.width, dim.height-5); return new Dimension(dim.width, dim.height-5);
...@@ -309,6 +325,7 @@ public class SourceTool extends JPanel { ...@@ -309,6 +325,7 @@ public class SourceTool extends JPanel {
} }
private class STMouseListener extends MouseAdapter implements MouseListener { private class STMouseListener extends MouseAdapter implements MouseListener {
@Override
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
if (e.isPopupTrigger()) { if (e.isPopupTrigger()) {
showPopupMenu((Component)e.getSource(), showPopupMenu((Component)e.getSource(),
...@@ -316,6 +333,7 @@ public class SourceTool extends JPanel { ...@@ -316,6 +333,7 @@ public class SourceTool extends JPanel {
} }
} }
@Override
public void mouseReleased(MouseEvent e) { public void mouseReleased(MouseEvent e) {
if (e.isPopupTrigger()) { if (e.isPopupTrigger()) {
showPopupMenu((Component)e.getSource(), showPopupMenu((Component)e.getSource(),
...@@ -354,6 +372,7 @@ public class SourceTool extends JPanel { ...@@ -354,6 +372,7 @@ public class SourceTool extends JPanel {
private JMenuItem commandItem(String label, final String cmd) { private JMenuItem commandItem(String label, final String cmd) {
JMenuItem item = new JMenuItem(label); JMenuItem item = new JMenuItem(label);
item.addActionListener(new ActionListener() { item.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
interpreter.executeCommand(cmd); interpreter.executeCommand(cmd);
} }
......
...@@ -30,15 +30,15 @@ import java.util.*; ...@@ -30,15 +30,15 @@ import java.util.*;
import javax.swing.*; import javax.swing.*;
import javax.swing.tree.*; import javax.swing.tree.*;
import javax.swing.event.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
import com.sun.jdi.*;
import com.sun.tools.example.debug.bdi.*; import com.sun.tools.example.debug.bdi.*;
public class SourceTreeTool extends JPanel { public class SourceTreeTool extends JPanel {
private static final long serialVersionUID = 3336680912107956419L;
private Environment env; private Environment env;
private ExecutionManager runtime; private ExecutionManager runtime;
...@@ -81,6 +81,7 @@ public class SourceTreeTool extends JPanel { ...@@ -81,6 +81,7 @@ public class SourceTreeTool extends JPanel {
******/ ******/
MouseListener ml = new MouseAdapter() { MouseListener ml = new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
int selRow = tree.getRowForLocation(e.getX(), e.getY()); int selRow = tree.getRowForLocation(e.getX(), e.getY());
TreePath selPath = tree.getPathForLocation(e.getX(), e.getY()); TreePath selPath = tree.getPathForLocation(e.getX(), e.getY());
...@@ -112,6 +113,7 @@ public class SourceTreeTool extends JPanel { ...@@ -112,6 +113,7 @@ public class SourceTreeTool extends JPanel {
private class SourceTreeToolListener implements SourceListener { private class SourceTreeToolListener implements SourceListener {
@Override
public void sourcepathChanged(SourcepathChangedEvent e) { public void sourcepathChanged(SourcepathChangedEvent e) {
sourcePath = sourceManager.getSourcePath(); sourcePath = sourceManager.getSourcePath();
root = createDirectoryTree(HEADING); root = createDirectoryTree(HEADING);
...@@ -121,6 +123,7 @@ public class SourceTreeTool extends JPanel { ...@@ -121,6 +123,7 @@ public class SourceTreeTool extends JPanel {
} }
private static class SourceOrDirectoryFilter implements FilenameFilter { private static class SourceOrDirectoryFilter implements FilenameFilter {
@Override
public boolean accept(File dir, String name) { public boolean accept(File dir, String name) {
return (name.endsWith(".java") || return (name.endsWith(".java") ||
new File(dir, name).isDirectory()); new File(dir, name).isDirectory());
...@@ -158,6 +161,7 @@ public class SourceTreeTool extends JPanel { ...@@ -158,6 +161,7 @@ public class SourceTreeTool extends JPanel {
this.isDirectory = isDirectory; this.isDirectory = isDirectory;
} }
@Override
public String toString() { public String toString() {
return name; return name;
} }
...@@ -195,6 +199,7 @@ public class SourceTreeTool extends JPanel { ...@@ -195,6 +199,7 @@ public class SourceTreeTool extends JPanel {
* Returns the child <code>TreeNode</code> at index * Returns the child <code>TreeNode</code> at index
* <code>childIndex</code>. * <code>childIndex</code>.
*/ */
@Override
public TreeNode getChildAt(int childIndex) { public TreeNode getChildAt(int childIndex) {
expandIfNeeded(); expandIfNeeded();
return children[childIndex]; return children[childIndex];
...@@ -204,6 +209,7 @@ public class SourceTreeTool extends JPanel { ...@@ -204,6 +209,7 @@ public class SourceTreeTool extends JPanel {
* Returns the number of children <code>TreeNode</code>s the receiver * Returns the number of children <code>TreeNode</code>s the receiver
* contains. * contains.
*/ */
@Override
public int getChildCount() { public int getChildCount() {
expandIfNeeded(); expandIfNeeded();
return children.length; return children.length;
...@@ -212,6 +218,7 @@ public class SourceTreeTool extends JPanel { ...@@ -212,6 +218,7 @@ public class SourceTreeTool extends JPanel {
/** /**
* Returns the parent <code>TreeNode</code> of the receiver. * Returns the parent <code>TreeNode</code> of the receiver.
*/ */
@Override
public TreeNode getParent() { public TreeNode getParent() {
return parent; return parent;
} }
...@@ -221,18 +228,21 @@ public class SourceTreeTool extends JPanel { ...@@ -221,18 +228,21 @@ public class SourceTreeTool extends JPanel {
* If the receiver does not contain <code>node</code>, -1 will be * If the receiver does not contain <code>node</code>, -1 will be
* returned. * returned.
*/ */
@Override
public int getIndex(TreeNode node) { public int getIndex(TreeNode node) {
expandIfNeeded(); expandIfNeeded();
for (int i = 0; i < children.length; i++) { for (int i = 0; i < children.length; i++) {
if (children[i] == node) if (children[i] == node) {
return i; return i;
} }
}
return -1; return -1;
} }
/** /**
* Returns true if the receiver allows children. * Returns true if the receiver allows children.
*/ */
@Override
public boolean getAllowsChildren() { public boolean getAllowsChildren() {
return isDirectory; return isDirectory;
} }
...@@ -240,6 +250,7 @@ public class SourceTreeTool extends JPanel { ...@@ -240,6 +250,7 @@ public class SourceTreeTool extends JPanel {
/** /**
* Returns true if the receiver is a leaf. * Returns true if the receiver is a leaf.
*/ */
@Override
public boolean isLeaf() { public boolean isLeaf() {
expandIfNeeded(); expandIfNeeded();
return !isDirectory; return !isDirectory;
...@@ -248,13 +259,16 @@ public class SourceTreeTool extends JPanel { ...@@ -248,13 +259,16 @@ public class SourceTreeTool extends JPanel {
/** /**
* Returns the children of the receiver as an Enumeration. * Returns the children of the receiver as an Enumeration.
*/ */
@Override
public Enumeration children() { public Enumeration children() {
expandIfNeeded(); expandIfNeeded();
return new Enumeration() { return new Enumeration() {
int i = 0; int i = 0;
@Override
public boolean hasMoreElements() { public boolean hasMoreElements() {
return (i < children.length); return (i < children.length);
} }
@Override
public Object nextElement() throws NoSuchElementException { public Object nextElement() throws NoSuchElementException {
if (i >= children.length) { if (i >= children.length) {
throw new NoSuchElementException(); throw new NoSuchElementException();
......
...@@ -29,6 +29,8 @@ import java.util.EventObject; ...@@ -29,6 +29,8 @@ import java.util.EventObject;
public class SourcepathChangedEvent extends EventObject { public class SourcepathChangedEvent extends EventObject {
private static final long serialVersionUID = 8762169481005804121L;
public SourcepathChangedEvent(Object source) { public SourcepathChangedEvent(Object source) {
super(source); super(source);
} }
......
...@@ -25,21 +25,16 @@ ...@@ -25,21 +25,16 @@
package com.sun.tools.example.debug.gui; package com.sun.tools.example.debug.gui;
import java.io.*;
import java.util.*;
import java.util.List; // Must import explicitly due to conflict with javax.awt.List
import javax.swing.*; import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.event.*; import javax.swing.event.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.tools.example.debug.bdi.*; import com.sun.tools.example.debug.bdi.*;
public class StackTraceTool extends JPanel { public class StackTraceTool extends JPanel {
private static final long serialVersionUID = 9140041989427965718L;
private Environment env; private Environment env;
private ExecutionManager runtime; private ExecutionManager runtime;
...@@ -85,6 +80,7 @@ public class StackTraceTool extends JPanel { ...@@ -85,6 +80,7 @@ public class StackTraceTool extends JPanel {
//### I suspect we handle the case badly that the VM is not interrupted. //### I suspect we handle the case badly that the VM is not interrupted.
@Override
public void currentFrameChanged(CurrentFrameChangedEvent e) { public void currentFrameChanged(CurrentFrameChangedEvent e) {
// If the current frame of the thread appearing in this // If the current frame of the thread appearing in this
// view is changed, move the selection to track it. // view is changed, move the selection to track it.
...@@ -103,6 +99,7 @@ public class StackTraceTool extends JPanel { ...@@ -103,6 +99,7 @@ public class StackTraceTool extends JPanel {
// ListSelectionListener // ListSelectionListener
@Override
public void valueChanged(ListSelectionEvent e) { public void valueChanged(ListSelectionEvent e) {
int index = list.getSelectedIndex(); int index = list.getSelectedIndex();
if (index != -1) { if (index != -1) {
...@@ -117,6 +114,7 @@ public class StackTraceTool extends JPanel { ...@@ -117,6 +114,7 @@ public class StackTraceTool extends JPanel {
private class StackFrameRenderer extends DefaultListCellRenderer { private class StackFrameRenderer extends DefaultListCellRenderer {
@Override
public Component getListCellRendererComponent(JList list, public Component getListCellRendererComponent(JList list,
Object value, Object value,
int index, int index,
...@@ -174,6 +172,7 @@ public class StackTraceTool extends JPanel { ...@@ -174,6 +172,7 @@ public class StackTraceTool extends JPanel {
this.tinfo = tinfo; this.tinfo = tinfo;
} }
@Override
public Object getElementAt(int index) { public Object getElementAt(int index) {
try { try {
return tinfo == null? null : tinfo.getFrame(index); return tinfo == null? null : tinfo.getFrame(index);
...@@ -186,6 +185,7 @@ public class StackTraceTool extends JPanel { ...@@ -186,6 +185,7 @@ public class StackTraceTool extends JPanel {
} }
} }
@Override
public int getSize() { public int getSize() {
try { try {
return tinfo == null? 1 : tinfo.getFrameCount(); return tinfo == null? 1 : tinfo.getFrameCount();
......
...@@ -25,13 +25,11 @@ ...@@ -25,13 +25,11 @@
package com.sun.tools.example.debug.gui; package com.sun.tools.example.debug.gui;
import java.io.*;
import java.util.*; import java.util.*;
import java.util.List; // Must import explicitly due to conflict with javax.awt.List import java.util.List; // Must import explicitly due to conflict with javax.awt.List
import javax.swing.*; import javax.swing.*;
import javax.swing.tree.*; import javax.swing.tree.*;
import javax.swing.event.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
...@@ -45,6 +43,8 @@ import com.sun.tools.example.debug.bdi.*; ...@@ -45,6 +43,8 @@ import com.sun.tools.example.debug.bdi.*;
public class ThreadTreeTool extends JPanel { public class ThreadTreeTool extends JPanel {
private static final long serialVersionUID = 4168599992853038878L;
private Environment env; private Environment env;
private ExecutionManager runtime; private ExecutionManager runtime;
...@@ -79,6 +79,7 @@ public class ThreadTreeTool extends JPanel { ...@@ -79,6 +79,7 @@ public class ThreadTreeTool extends JPanel {
tree.setSelectionModel(new SingleLeafTreeSelectionModel()); tree.setSelectionModel(new SingleLeafTreeSelectionModel());
MouseListener ml = new MouseAdapter() { MouseListener ml = new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
int selRow = tree.getRowForLocation(e.getX(), e.getY()); int selRow = tree.getRowForLocation(e.getX(), e.getY());
TreePath selPath = tree.getPathForLocation(e.getX(), e.getY()); TreePath selPath = tree.getPathForLocation(e.getX(), e.getY());
...@@ -131,6 +132,7 @@ public class ThreadTreeTool extends JPanel { ...@@ -131,6 +132,7 @@ public class ThreadTreeTool extends JPanel {
// SessionListener // SessionListener
@Override
public void sessionStart(EventObject e) { public void sessionStart(EventObject e) {
try { try {
for (ThreadReference thread : runtime.allThreads()) { for (ThreadReference thread : runtime.allThreads()) {
...@@ -143,20 +145,25 @@ public class ThreadTreeTool extends JPanel { ...@@ -143,20 +145,25 @@ public class ThreadTreeTool extends JPanel {
} }
} }
@Override
public void sessionInterrupt(EventObject e) {} public void sessionInterrupt(EventObject e) {}
@Override
public void sessionContinue(EventObject e) {} public void sessionContinue(EventObject e) {}
// JDIListener // JDIListener
@Override
public void threadStart(ThreadStartEventSet e) { public void threadStart(ThreadStartEventSet e) {
root.addThread(e.getThread()); root.addThread(e.getThread());
} }
@Override
public void threadDeath(ThreadDeathEventSet e) { public void threadDeath(ThreadDeathEventSet e) {
root.removeThread(e.getThread()); root.removeThread(e.getThread());
} }
@Override
public void vmDisconnect(VMDisconnectEventSet e) { public void vmDisconnect(VMDisconnectEventSet e) {
// Clear the contents of this view. // Clear the contents of this view.
root = createThreadTree(HEADING); root = createThreadTree(HEADING);
...@@ -193,6 +200,7 @@ public class ThreadTreeTool extends JPanel { ...@@ -193,6 +200,7 @@ public class ThreadTreeTool extends JPanel {
} }
} }
@Override
public String toString() { public String toString() {
return description; return description;
} }
...@@ -213,6 +221,7 @@ public class ThreadTreeTool extends JPanel { ...@@ -213,6 +221,7 @@ public class ThreadTreeTool extends JPanel {
return (thread == null); return (thread == null);
} }
@Override
public boolean isLeaf() { public boolean isLeaf() {
return !isThreadGroup(); return !isThreadGroup();
} }
......
...@@ -28,10 +28,10 @@ package com.sun.tools.example.debug.gui; ...@@ -28,10 +28,10 @@ package com.sun.tools.example.debug.gui;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.*;
public class TypeScript extends JPanel { public class TypeScript extends JPanel {
private static final long serialVersionUID = -983704841363534885L;
private JTextArea history; private JTextArea history;
private JTextField entry; private JTextField entry;
...@@ -41,7 +41,6 @@ public class TypeScript extends JPanel { ...@@ -41,7 +41,6 @@ public class TypeScript extends JPanel {
private JScrollBar historyHScrollBar; private JScrollBar historyHScrollBar;
private boolean echoInput = false; private boolean echoInput = false;
private boolean nlPending = false;
private static String newline = System.getProperty("line.separator"); private static String newline = System.getProperty("line.separator");
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
package com.sun.tools.example.debug.gui; package com.sun.tools.example.debug.gui;
import javax.swing.*;
import com.sun.tools.example.debug.bdi.OutputListener; import com.sun.tools.example.debug.bdi.OutputListener;
public class TypeScriptOutputListener implements OutputListener { public class TypeScriptOutputListener implements OutputListener {
...@@ -42,10 +41,12 @@ public class TypeScriptOutputListener implements OutputListener { ...@@ -42,10 +41,12 @@ public class TypeScriptOutputListener implements OutputListener {
this.appendNewline = appendNewline; this.appendNewline = appendNewline;
} }
@Override
public void putString(String s) { public void putString(String s) {
script.append(s); script.append(s);
if (appendNewline) if (appendNewline) {
script.newline(); script.newline();
} }
}
} }
...@@ -35,14 +35,17 @@ public class TypeScriptWriter extends Writer { ...@@ -35,14 +35,17 @@ public class TypeScriptWriter extends Writer {
this.script = script; this.script = script;
} }
@Override
public void write(char[] cbuf, int off, int len) throws IOException { public void write(char[] cbuf, int off, int len) throws IOException {
script.append(String.valueOf(cbuf, off, len)); script.append(String.valueOf(cbuf, off, len));
} }
@Override
public void flush() { public void flush() {
script.flush(); script.flush();
} }
@Override
public void close() { public void close() {
script.flush(); script.flush();
} }
......
...@@ -38,6 +38,7 @@ class AccessWatchpointSpec extends WatchpointSpec { ...@@ -38,6 +38,7 @@ class AccessWatchpointSpec extends WatchpointSpec {
/** /**
* The 'refType' is known to match, return the EventRequest. * The 'refType' is known to match, return the EventRequest.
*/ */
@Override
EventRequest resolveEventRequest(ReferenceType refType) EventRequest resolveEventRequest(ReferenceType refType)
throws NoSuchFieldException { throws NoSuchFieldException {
Field field = refType.fieldByName(fieldId); Field field = refType.fieldByName(fieldId);
...@@ -48,6 +49,7 @@ class AccessWatchpointSpec extends WatchpointSpec { ...@@ -48,6 +49,7 @@ class AccessWatchpointSpec extends WatchpointSpec {
return wp; return wp;
} }
@Override
public String toString() { public String toString() {
return MessageOutput.format("watch accesses of", return MessageOutput.format("watch accesses of",
new Object [] {refSpec.toString(), new Object [] {refSpec.toString(),
......
...@@ -27,6 +27,8 @@ package com.sun.tools.example.debug.tty; ...@@ -27,6 +27,8 @@ package com.sun.tools.example.debug.tty;
public class AmbiguousMethodException extends Exception public class AmbiguousMethodException extends Exception
{ {
private static final long serialVersionUID = -5372629264936918654L;
public AmbiguousMethodException() public AmbiguousMethodException()
{ {
super(); super();
......
...@@ -30,7 +30,6 @@ import com.sun.jdi.request.*; ...@@ -30,7 +30,6 @@ import com.sun.jdi.request.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Iterator;
class BreakpointSpec extends EventRequestSpec { class BreakpointSpec extends EventRequestSpec {
String methodId; String methodId;
...@@ -58,6 +57,7 @@ class BreakpointSpec extends EventRequestSpec { ...@@ -58,6 +57,7 @@ class BreakpointSpec extends EventRequestSpec {
/** /**
* The 'refType' is known to match, return the EventRequest. * The 'refType' is known to match, return the EventRequest.
*/ */
@Override
EventRequest resolveEventRequest(ReferenceType refType) EventRequest resolveEventRequest(ReferenceType refType)
throws AmbiguousMethodException, throws AmbiguousMethodException,
AbsentInformationException, AbsentInformationException,
...@@ -91,12 +91,14 @@ class BreakpointSpec extends EventRequestSpec { ...@@ -91,12 +91,14 @@ class BreakpointSpec extends EventRequestSpec {
return (methodId != null); return (methodId != null);
} }
@Override
public int hashCode() { public int hashCode() {
return refSpec.hashCode() + lineNumber + return refSpec.hashCode() + lineNumber +
((methodId != null) ? methodId.hashCode() : 0) + ((methodId != null) ? methodId.hashCode() : 0) +
((methodArgs != null) ? methodArgs.hashCode() : 0); ((methodArgs != null) ? methodArgs.hashCode() : 0);
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof BreakpointSpec) { if (obj instanceof BreakpointSpec) {
BreakpointSpec breakpoint = (BreakpointSpec)obj; BreakpointSpec breakpoint = (BreakpointSpec)obj;
...@@ -114,6 +116,7 @@ class BreakpointSpec extends EventRequestSpec { ...@@ -114,6 +116,7 @@ class BreakpointSpec extends EventRequestSpec {
} }
} }
@Override
String errorMessageFor(Exception e) { String errorMessageFor(Exception e) {
if (e instanceof AmbiguousMethodException) { if (e instanceof AmbiguousMethodException) {
return (MessageOutput.format("Method is overloaded; specify arguments", return (MessageOutput.format("Method is overloaded; specify arguments",
...@@ -140,6 +143,7 @@ class BreakpointSpec extends EventRequestSpec { ...@@ -140,6 +143,7 @@ class BreakpointSpec extends EventRequestSpec {
} }
} }
@Override
public String toString() { public String toString() {
StringBuffer buffer = new StringBuffer(refSpec.toString()); StringBuffer buffer = new StringBuffer(refSpec.toString());
if (isMethodBreakpoint()) { if (isMethodBreakpoint()) {
......
...@@ -51,6 +51,7 @@ class Commands { ...@@ -51,6 +51,7 @@ class Commands {
final ThreadInfo threadInfo = ThreadInfo.getCurrentThreadInfo(); final ThreadInfo threadInfo = ThreadInfo.getCurrentThreadInfo();
final int stackFrame = threadInfo == null? 0 : threadInfo.getCurrentFrameIndex(); final int stackFrame = threadInfo == null? 0 : threadInfo.getCurrentFrameIndex();
Thread thread = new Thread("asynchronous jdb command") { Thread thread = new Thread("asynchronous jdb command") {
@Override
public void run() { public void run() {
try { try {
action(); action();
...@@ -95,6 +96,7 @@ class Commands { ...@@ -95,6 +96,7 @@ class Commands {
final ThreadInfo threadInfo = ThreadInfo.getCurrentThreadInfo(); final ThreadInfo threadInfo = ThreadInfo.getCurrentThreadInfo();
if ((threadInfo != null) && (threadInfo.getCurrentFrame() != null)) { if ((threadInfo != null) && (threadInfo.getCurrentFrame() != null)) {
frameGetter = new ExpressionParser.GetFrame() { frameGetter = new ExpressionParser.GetFrame() {
@Override
public StackFrame get() throws IncompatibleThreadStateException { public StackFrame get() throws IncompatibleThreadStateException {
return threadInfo.getCurrentFrame(); return threadInfo.getCurrentFrame();
} }
...@@ -224,7 +226,6 @@ class Commands { ...@@ -224,7 +226,6 @@ class Commands {
} }
void commandClass(StringTokenizer t) { void commandClass(StringTokenizer t) {
List<ReferenceType> list = Env.vm().allClasses();
if (!t.hasMoreTokens()) { if (!t.hasMoreTokens()) {
MessageOutput.println("No class specified."); MessageOutput.println("No class specified.");
...@@ -709,6 +710,7 @@ class Commands { ...@@ -709,6 +710,7 @@ class Commands {
void doKillThread(final ThreadReference threadToKill, void doKillThread(final ThreadReference threadToKill,
final StringTokenizer tokenizer) { final StringTokenizer tokenizer) {
new AsyncExecution() { new AsyncExecution() {
@Override
void action() { void action() {
doKill(threadToKill, tokenizer); doKill(threadToKill, tokenizer);
} }
...@@ -1118,7 +1120,6 @@ class Commands { ...@@ -1118,7 +1120,6 @@ class Commands {
} }
void commandStop(StringTokenizer t) { void commandStop(StringTokenizer t) {
Location bploc;
String atIn; String atIn;
byte suspendPolicy = EventRequest.SUSPEND_ALL; byte suspendPolicy = EventRequest.SUSPEND_ALL;
...@@ -1665,6 +1666,7 @@ class Commands { ...@@ -1665,6 +1666,7 @@ class Commands {
void commandPrint(final StringTokenizer t, final boolean dumpObject) { void commandPrint(final StringTokenizer t, final boolean dumpObject) {
new AsyncExecution() { new AsyncExecution() {
@Override
void action() { void action() {
doPrint(t, dumpObject); doPrint(t, dumpObject);
} }
...@@ -1734,6 +1736,7 @@ class Commands { ...@@ -1734,6 +1736,7 @@ class Commands {
void commandLock(final StringTokenizer t) { void commandLock(final StringTokenizer t) {
new AsyncExecution() { new AsyncExecution() {
@Override
void action() { void action() {
doLock(t); doLock(t);
} }
...@@ -1809,6 +1812,7 @@ class Commands { ...@@ -1809,6 +1812,7 @@ class Commands {
void commandDisableGC(final StringTokenizer t) { void commandDisableGC(final StringTokenizer t) {
new AsyncExecution() { new AsyncExecution() {
@Override
void action() { void action() {
doDisableGC(t); doDisableGC(t);
} }
...@@ -1837,6 +1841,7 @@ class Commands { ...@@ -1837,6 +1841,7 @@ class Commands {
void commandEnableGC(final StringTokenizer t) { void commandEnableGC(final StringTokenizer t) {
new AsyncExecution() { new AsyncExecution() {
@Override
void action() { void action() {
doEnableGC(t); doEnableGC(t);
} }
...@@ -1892,6 +1897,7 @@ class Commands { ...@@ -1892,6 +1897,7 @@ class Commands {
} }
} else { } else {
new AsyncExecution() { new AsyncExecution() {
@Override
void action() { void action() {
doSave(t); doSave(t);
} }
......
...@@ -29,7 +29,6 @@ import com.sun.jdi.*; ...@@ -29,7 +29,6 @@ import com.sun.jdi.*;
import com.sun.jdi.request.StepRequest; import com.sun.jdi.request.StepRequest;
import com.sun.jdi.request.MethodEntryRequest; import com.sun.jdi.request.MethodEntryRequest;
import com.sun.jdi.request.MethodExitRequest; import com.sun.jdi.request.MethodExitRequest;
import com.sun.tools.jdi.*;
import java.util.*; import java.util.*;
import java.io.*; import java.io.*;
......
...@@ -27,14 +27,8 @@ package com.sun.tools.example.debug.tty; ...@@ -27,14 +27,8 @@ package com.sun.tools.example.debug.tty;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.event.*; import com.sun.jdi.event.*;
import com.sun.jdi.request.EventRequestManager;
import com.sun.jdi.request.EventRequest; import com.sun.jdi.request.EventRequest;
import java.io.PrintStream;
import java.util.StringTokenizer;
import java.util.Collection;
import java.util.Iterator;
public class EventHandler implements Runnable { public class EventHandler implements Runnable {
EventNotifier notifier; EventNotifier notifier;
...@@ -59,6 +53,7 @@ public class EventHandler implements Runnable { ...@@ -59,6 +53,7 @@ public class EventHandler implements Runnable {
} }
} }
@Override
public void run() { public void run() {
EventQueue queue = Env.vm().eventQueue(); EventQueue queue = Env.vm().eventQueue();
while (connected) { while (connected) {
......
...@@ -30,9 +30,7 @@ import com.sun.jdi.request.EventRequest; ...@@ -30,9 +30,7 @@ import com.sun.jdi.request.EventRequest;
import com.sun.jdi.request.ExceptionRequest; import com.sun.jdi.request.ExceptionRequest;
import com.sun.jdi.request.ClassPrepareRequest; import com.sun.jdi.request.ClassPrepareRequest;
import com.sun.jdi.event.ClassPrepareEvent; import com.sun.jdi.event.ClassPrepareEvent;
import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator;
abstract class EventRequestSpec { abstract class EventRequestSpec {
......
...@@ -25,15 +25,12 @@ ...@@ -25,15 +25,12 @@
package com.sun.tools.example.debug.tty; package com.sun.tools.example.debug.tty;
import com.sun.jdi.*;
import com.sun.jdi.request.EventRequest; import com.sun.jdi.request.EventRequest;
import com.sun.jdi.event.ClassPrepareEvent; import com.sun.jdi.event.ClassPrepareEvent;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.StringTokenizer;
class EventRequestSpecList { class EventRequestSpecList {
......
...@@ -28,10 +28,6 @@ package com.sun.tools.example.debug.tty; ...@@ -28,10 +28,6 @@ package com.sun.tools.example.debug.tty;
import com.sun.jdi.ReferenceType; import com.sun.jdi.ReferenceType;
import com.sun.jdi.request.*; import com.sun.jdi.request.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Iterator;
class ExceptionSpec extends EventRequestSpec { class ExceptionSpec extends EventRequestSpec {
private boolean notifyCaught; private boolean notifyCaught;
private boolean notifyUncaught; private boolean notifyUncaught;
...@@ -51,6 +47,7 @@ class ExceptionSpec extends EventRequestSpec { ...@@ -51,6 +47,7 @@ class ExceptionSpec extends EventRequestSpec {
/** /**
* The 'refType' is known to match, return the EventRequest. * The 'refType' is known to match, return the EventRequest.
*/ */
@Override
EventRequest resolveEventRequest(ReferenceType refType) { EventRequest resolveEventRequest(ReferenceType refType) {
EventRequestManager em = refType.virtualMachine().eventRequestManager(); EventRequestManager em = refType.virtualMachine().eventRequestManager();
ExceptionRequest excReq = em.createExceptionRequest(refType, ExceptionRequest excReq = em.createExceptionRequest(refType,
...@@ -68,6 +65,7 @@ class ExceptionSpec extends EventRequestSpec { ...@@ -68,6 +65,7 @@ class ExceptionSpec extends EventRequestSpec {
return notifyUncaught; return notifyUncaught;
} }
@Override
public int hashCode() { public int hashCode() {
//Reference: Effective Java[tm] (Bloch, 2001), Item 8 //Reference: Effective Java[tm] (Bloch, 2001), Item 8
int result = 17; int result = 17;
...@@ -77,6 +75,7 @@ class ExceptionSpec extends EventRequestSpec { ...@@ -77,6 +75,7 @@ class ExceptionSpec extends EventRequestSpec {
return result; return result;
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof ExceptionSpec) { if (obj instanceof ExceptionSpec) {
ExceptionSpec es = (ExceptionSpec)obj; ExceptionSpec es = (ExceptionSpec)obj;
...@@ -90,6 +89,7 @@ class ExceptionSpec extends EventRequestSpec { ...@@ -90,6 +89,7 @@ class ExceptionSpec extends EventRequestSpec {
return false; return false;
} }
@Override
public String toString() { public String toString() {
String s; String s;
if (notifyCaught && !notifyUncaught) { if (notifyCaught && !notifyUncaught) {
......
...@@ -27,6 +27,8 @@ package com.sun.tools.example.debug.tty; ...@@ -27,6 +27,8 @@ package com.sun.tools.example.debug.tty;
public class LineNotFoundException extends Exception public class LineNotFoundException extends Exception
{ {
private static final long serialVersionUID = 3748297722519448995L;
public LineNotFoundException() public LineNotFoundException()
{ {
super(); super();
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
package com.sun.tools.example.debug.tty; package com.sun.tools.example.debug.tty;
class MalformedMemberNameException extends Exception { class MalformedMemberNameException extends Exception {
private static final long serialVersionUID = 7759071468833196630L;
public MalformedMemberNameException() { public MalformedMemberNameException() {
super(); super();
} }
......
...@@ -38,6 +38,7 @@ class ModificationWatchpointSpec extends WatchpointSpec { ...@@ -38,6 +38,7 @@ class ModificationWatchpointSpec extends WatchpointSpec {
/** /**
* The 'refType' is known to match, return the EventRequest. * The 'refType' is known to match, return the EventRequest.
*/ */
@Override
EventRequest resolveEventRequest(ReferenceType refType) EventRequest resolveEventRequest(ReferenceType refType)
throws NoSuchFieldException { throws NoSuchFieldException {
Field field = refType.fieldByName(fieldId); Field field = refType.fieldByName(fieldId);
...@@ -48,6 +49,7 @@ class ModificationWatchpointSpec extends WatchpointSpec { ...@@ -48,6 +49,7 @@ class ModificationWatchpointSpec extends WatchpointSpec {
return wp; return wp;
} }
@Override
public String toString() { public String toString() {
return MessageOutput.format("watch modification of", return MessageOutput.format("watch modification of",
new Object [] {refSpec.toString(), new Object [] {refSpec.toString(),
......
...@@ -55,6 +55,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -55,6 +55,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec {
/** /**
* Does the specified ReferenceType match this spec. * Does the specified ReferenceType match this spec.
*/ */
@Override
public boolean matches(ReferenceType refType) { public boolean matches(ReferenceType refType) {
if (classId.startsWith("*")) { if (classId.startsWith("*")) {
return refType.name().endsWith(stem); return refType.name().endsWith(stem);
...@@ -65,6 +66,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -65,6 +66,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec {
} }
} }
@Override
public ClassPrepareRequest createPrepareRequest() { public ClassPrepareRequest createPrepareRequest() {
ClassPrepareRequest request = ClassPrepareRequest request =
Env.vm().eventRequestManager().createClassPrepareRequest(); Env.vm().eventRequestManager().createClassPrepareRequest();
...@@ -73,10 +75,12 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -73,10 +75,12 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec {
return request; return request;
} }
@Override
public int hashCode() { public int hashCode() {
return classId.hashCode(); return classId.hashCode();
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof PatternReferenceTypeSpec) { if (obj instanceof PatternReferenceTypeSpec) {
PatternReferenceTypeSpec spec = (PatternReferenceTypeSpec)obj; PatternReferenceTypeSpec spec = (PatternReferenceTypeSpec)obj;
...@@ -125,6 +129,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { ...@@ -125,6 +129,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec {
return true; return true;
} }
@Override
public String toString() { public String toString() {
return classId; return classId;
} }
......
...@@ -35,7 +35,9 @@ interface ReferenceTypeSpec { ...@@ -35,7 +35,9 @@ interface ReferenceTypeSpec {
boolean matches(ReferenceType refType); boolean matches(ReferenceType refType);
ClassPrepareRequest createPrepareRequest(); ClassPrepareRequest createPrepareRequest();
@Override
int hashCode(); int hashCode();
@Override
boolean equals(Object obj); boolean equals(Object obj);
} }
...@@ -27,11 +27,8 @@ package com.sun.tools.example.debug.tty; ...@@ -27,11 +27,8 @@ package com.sun.tools.example.debug.tty;
import com.sun.jdi.Location; import com.sun.jdi.Location;
import com.sun.jdi.AbsentInformationException; import com.sun.jdi.AbsentInformationException;
import java.util.Map;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import java.io.*; import java.io.*;
......
...@@ -47,34 +47,43 @@ public class TTY implements EventNotifier { ...@@ -47,34 +47,43 @@ public class TTY implements EventNotifier {
*/ */
private static final String progname = "jdb"; private static final String progname = "jdb";
@Override
public void vmStartEvent(VMStartEvent se) { public void vmStartEvent(VMStartEvent se) {
Thread.yield(); // fetch output Thread.yield(); // fetch output
MessageOutput.lnprint("VM Started:"); MessageOutput.lnprint("VM Started:");
} }
@Override
public void vmDeathEvent(VMDeathEvent e) { public void vmDeathEvent(VMDeathEvent e) {
} }
@Override
public void vmDisconnectEvent(VMDisconnectEvent e) { public void vmDisconnectEvent(VMDisconnectEvent e) {
} }
@Override
public void threadStartEvent(ThreadStartEvent e) { public void threadStartEvent(ThreadStartEvent e) {
} }
@Override
public void threadDeathEvent(ThreadDeathEvent e) { public void threadDeathEvent(ThreadDeathEvent e) {
} }
@Override
public void classPrepareEvent(ClassPrepareEvent e) { public void classPrepareEvent(ClassPrepareEvent e) {
} }
@Override
public void classUnloadEvent(ClassUnloadEvent e) { public void classUnloadEvent(ClassUnloadEvent e) {
} }
@Override
public void breakpointEvent(BreakpointEvent be) { public void breakpointEvent(BreakpointEvent be) {
Thread.yield(); // fetch output Thread.yield(); // fetch output
MessageOutput.lnprint("Breakpoint hit:"); MessageOutput.lnprint("Breakpoint hit:");
} }
@Override
public void fieldWatchEvent(WatchpointEvent fwe) { public void fieldWatchEvent(WatchpointEvent fwe) {
Field field = fwe.field(); Field field = fwe.field();
ObjectReference obj = fwe.object(); ObjectReference obj = fwe.object();
...@@ -90,11 +99,13 @@ public class TTY implements EventNotifier { ...@@ -90,11 +99,13 @@ public class TTY implements EventNotifier {
} }
} }
@Override
public void stepEvent(StepEvent se) { public void stepEvent(StepEvent se) {
Thread.yield(); // fetch output Thread.yield(); // fetch output
MessageOutput.lnprint("Step completed:"); MessageOutput.lnprint("Step completed:");
} }
@Override
public void exceptionEvent(ExceptionEvent ee) { public void exceptionEvent(ExceptionEvent ee) {
Thread.yield(); // fetch output Thread.yield(); // fetch output
Location catchLocation = ee.catchLocation(); Location catchLocation = ee.catchLocation();
...@@ -108,6 +119,7 @@ public class TTY implements EventNotifier { ...@@ -108,6 +119,7 @@ public class TTY implements EventNotifier {
} }
} }
@Override
public void methodEntryEvent(MethodEntryEvent me) { public void methodEntryEvent(MethodEntryEvent me) {
Thread.yield(); // fetch output Thread.yield(); // fetch output
/* /*
...@@ -125,6 +137,7 @@ public class TTY implements EventNotifier { ...@@ -125,6 +137,7 @@ public class TTY implements EventNotifier {
} }
} }
@Override
public boolean methodExitEvent(MethodExitEvent me) { public boolean methodExitEvent(MethodExitEvent me) {
Thread.yield(); // fetch output Thread.yield(); // fetch output
/* /*
...@@ -173,6 +186,7 @@ public class TTY implements EventNotifier { ...@@ -173,6 +186,7 @@ public class TTY implements EventNotifier {
return false; return false;
} }
@Override
public void vmInterrupted() { public void vmInterrupted() {
Thread.yield(); // fetch output Thread.yield(); // fetch output
printCurrentLocation(); printCurrentLocation();
...@@ -184,6 +198,7 @@ public class TTY implements EventNotifier { ...@@ -184,6 +198,7 @@ public class TTY implements EventNotifier {
MessageOutput.printPrompt(); MessageOutput.printPrompt();
} }
@Override
public void receivedEvent(Event event) { public void receivedEvent(Event event) {
} }
...@@ -317,18 +332,19 @@ public class TTY implements EventNotifier { ...@@ -317,18 +332,19 @@ public class TTY implements EventNotifier {
// Adapted for use with String[][0]. // Adapted for use with String[][0].
int low = 0; int low = 0;
int high = commandList.length - 1; int high = commandList.length - 1;
long i = 0;
while (low <= high) { while (low <= high) {
int mid = (low + high) >>> 1; int mid = (low + high) >>> 1;
String midVal = commandList[mid][0]; String midVal = commandList[mid][0];
int compare = midVal.compareTo(key); int compare = midVal.compareTo(key);
if (compare < 0) if (compare < 0) {
low = mid + 1; low = mid + 1;
else if (compare > 0) } else if (compare > 0) {
high = mid - 1; high = mid - 1;
else }
else {
return mid; // key found return mid; // key found
} }
}
return -(low + 1); // key not found. return -(low + 1); // key not found.
}; };
...@@ -336,7 +352,9 @@ public class TTY implements EventNotifier { ...@@ -336,7 +352,9 @@ public class TTY implements EventNotifier {
* Return true if the command is OK when disconnected. * Return true if the command is OK when disconnected.
*/ */
private boolean isDisconnectCmd(int ii) { private boolean isDisconnectCmd(int ii) {
if (ii < 0 || ii >= commandList.length) return false; if (ii < 0 || ii >= commandList.length) {
return false;
}
return (commandList[ii][1].equals("y")); return (commandList[ii][1].equals("y"));
} }
...@@ -344,7 +362,9 @@ public class TTY implements EventNotifier { ...@@ -344,7 +362,9 @@ public class TTY implements EventNotifier {
* Return true if the command is OK when readonly. * Return true if the command is OK when readonly.
*/ */
private boolean isReadOnlyCmd(int ii) { private boolean isReadOnlyCmd(int ii) {
if (ii < 0 || ii >= commandList.length) return false; if (ii < 0 || ii >= commandList.length) {
return false;
}
return (commandList[ii][2].equals("y")); return (commandList[ii][2].equals("y"));
}; };
......
...@@ -44,6 +44,7 @@ public class TTYResources extends java.util.ListResourceBundle { ...@@ -44,6 +44,7 @@ public class TTYResources extends java.util.ListResourceBundle {
* *
* @return the contents of this <code>ResourceBundle</code>. * @return the contents of this <code>ResourceBundle</code>.
*/ */
@Override
public Object[][] getContents() { public Object[][] getContents() {
Object[][] temp = new Object[][] { Object[][] temp = new Object[][] {
// NOTE: The value strings in this file containing "{0}" are // NOTE: The value strings in this file containing "{0}" are
......
...@@ -44,6 +44,7 @@ public class TTYResources_ja extends java.util.ListResourceBundle { ...@@ -44,6 +44,7 @@ public class TTYResources_ja extends java.util.ListResourceBundle {
* *
* @return the contents of this <code>ResourceBundle</code>. * @return the contents of this <code>ResourceBundle</code>.
*/ */
@Override
public Object[][] getContents() { public Object[][] getContents() {
Object[][] temp = new Object[][] { Object[][] temp = new Object[][] {
// NOTE: The value strings in this file containing "{0}" are // NOTE: The value strings in this file containing "{0}" are
......
...@@ -44,6 +44,7 @@ public class TTYResources_zh_CN extends java.util.ListResourceBundle { ...@@ -44,6 +44,7 @@ public class TTYResources_zh_CN extends java.util.ListResourceBundle {
* *
* @return the contents of this <code>ResourceBundle</code>. * @return the contents of this <code>ResourceBundle</code>.
*/ */
@Override
public Object[][] getContents() { public Object[][] getContents() {
Object[][] temp = new Object[][] { Object[][] temp = new Object[][] {
// NOTE: The value strings in this file containing "{0}" are // NOTE: The value strings in this file containing "{0}" are
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
package com.sun.tools.example.debug.tty; package com.sun.tools.example.debug.tty;
import com.sun.jdi.ThreadGroupReference; import com.sun.jdi.ThreadGroupReference;
import com.sun.jdi.ThreadReference;
import java.util.List; import java.util.List;
import java.util.Stack; import java.util.Stack;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -70,10 +69,12 @@ class ThreadGroupIterator implements Iterator<ThreadGroupReference> { ...@@ -70,10 +69,12 @@ class ThreadGroupIterator implements Iterator<ThreadGroupReference> {
} }
} }
@Override
public boolean hasNext() { public boolean hasNext() {
return !stack.isEmpty(); return !stack.isEmpty();
} }
@Override
public ThreadGroupReference next() { public ThreadGroupReference next() {
return nextThreadGroup(); return nextThreadGroup();
} }
...@@ -84,6 +85,7 @@ class ThreadGroupIterator implements Iterator<ThreadGroupReference> { ...@@ -84,6 +85,7 @@ class ThreadGroupIterator implements Iterator<ThreadGroupReference> {
return tg; return tg;
} }
@Override
public void remove() { public void remove() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
......
...@@ -32,8 +32,6 @@ import com.sun.jdi.StackFrame; ...@@ -32,8 +32,6 @@ import com.sun.jdi.StackFrame;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Iterator;
import java.io.*;
class ThreadInfo { class ThreadInfo {
// This is a list of all known ThreadInfo objects. It survives // This is a list of all known ThreadInfo objects. It survives
......
...@@ -46,6 +46,7 @@ class ThreadIterator implements Iterator<ThreadReference> { ...@@ -46,6 +46,7 @@ class ThreadIterator implements Iterator<ThreadReference> {
tgi = new ThreadGroupIterator(); tgi = new ThreadGroupIterator();
} }
@Override
public boolean hasNext() { public boolean hasNext() {
while (it == null || !it.hasNext()) { while (it == null || !it.hasNext()) {
if (!tgi.hasNext()) { if (!tgi.hasNext()) {
...@@ -56,6 +57,7 @@ class ThreadIterator implements Iterator<ThreadReference> { ...@@ -56,6 +57,7 @@ class ThreadIterator implements Iterator<ThreadReference> {
return true; return true;
} }
@Override
public ThreadReference next() { public ThreadReference next() {
return it.next(); return it.next();
} }
...@@ -64,6 +66,7 @@ class ThreadIterator implements Iterator<ThreadReference> { ...@@ -64,6 +66,7 @@ class ThreadIterator implements Iterator<ThreadReference> {
return next(); return next();
} }
@Override
public void remove() { public void remove() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
......
...@@ -28,7 +28,6 @@ package com.sun.tools.example.debug.tty; ...@@ -28,7 +28,6 @@ package com.sun.tools.example.debug.tty;
import com.sun.jdi.*; import com.sun.jdi.*;
import com.sun.jdi.connect.*; import com.sun.jdi.connect.*;
import com.sun.jdi.request.EventRequestManager; import com.sun.jdi.request.EventRequestManager;
import com.sun.jdi.request.ExceptionRequest;
import com.sun.jdi.request.ThreadStartRequest; import com.sun.jdi.request.ThreadStartRequest;
import com.sun.jdi.request.ThreadDeathRequest; import com.sun.jdi.request.ThreadDeathRequest;
...@@ -292,6 +291,7 @@ class VMConnection { ...@@ -292,6 +291,7 @@ class VMConnection {
*/ */
private void displayRemoteOutput(final InputStream stream) { private void displayRemoteOutput(final InputStream stream) {
Thread thr = new Thread("output reader") { Thread thr = new Thread("output reader") {
@Override
public void run() { public void run() {
try { try {
dumpStream(stream); dumpStream(stream);
......
...@@ -27,6 +27,8 @@ package com.sun.tools.example.debug.tty; ...@@ -27,6 +27,8 @@ package com.sun.tools.example.debug.tty;
public class VMNotConnectedException extends RuntimeException { public class VMNotConnectedException extends RuntimeException {
private static final long serialVersionUID = -7433430494903950165L;
public VMNotConnectedException() { public VMNotConnectedException() {
super(); super();
} }
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
package com.sun.tools.example.debug.tty; package com.sun.tools.example.debug.tty;
import com.sun.jdi.*;
abstract class WatchpointSpec extends EventRequestSpec { abstract class WatchpointSpec extends EventRequestSpec {
final String fieldId; final String fieldId;
...@@ -39,11 +37,13 @@ abstract class WatchpointSpec extends EventRequestSpec { ...@@ -39,11 +37,13 @@ abstract class WatchpointSpec extends EventRequestSpec {
} }
} }
@Override
public int hashCode() { public int hashCode() {
return refSpec.hashCode() + fieldId.hashCode() + return refSpec.hashCode() + fieldId.hashCode() +
getClass().hashCode(); getClass().hashCode();
} }
@Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj instanceof WatchpointSpec) { if (obj instanceof WatchpointSpec) {
WatchpointSpec watchpoint = (WatchpointSpec)obj; WatchpointSpec watchpoint = (WatchpointSpec)obj;
...@@ -56,6 +56,7 @@ abstract class WatchpointSpec extends EventRequestSpec { ...@@ -56,6 +56,7 @@ abstract class WatchpointSpec extends EventRequestSpec {
} }
} }
@Override
String errorMessageFor(Exception e) { String errorMessageFor(Exception e) {
if (e instanceof NoSuchFieldException) { if (e instanceof NoSuchFieldException) {
return (MessageOutput.format("No field in", return (MessageOutput.format("No field in",
......
...@@ -49,7 +49,8 @@ public class EventThread extends Thread { ...@@ -49,7 +49,8 @@ public class EventThread extends Thread {
private boolean vmDied = true; // VMDeath occurred private boolean vmDied = true; // VMDeath occurred
// Maps ThreadReference to ThreadTrace instances // Maps ThreadReference to ThreadTrace instances
private Map traceMap = new HashMap(); private Map<ThreadReference, ThreadTrace> traceMap =
new HashMap<>();
EventThread(VirtualMachine vm, String[] excludes, PrintWriter writer) { EventThread(VirtualMachine vm, String[] excludes, PrintWriter writer) {
super("event-handler"); super("event-handler");
...@@ -63,6 +64,7 @@ public class EventThread extends Thread { ...@@ -63,6 +64,7 @@ public class EventThread extends Thread {
* As long as we are connected, get event sets off * As long as we are connected, get event sets off
* the queue and dispatch the events within them. * the queue and dispatch the events within them.
*/ */
@Override
public void run() { public void run() {
EventQueue queue = vm.eventQueue(); EventQueue queue = vm.eventQueue();
while (connected) { while (connected) {
...@@ -208,7 +210,7 @@ public class EventThread extends Thread { ...@@ -208,7 +210,7 @@ public class EventThread extends Thread {
* creating one if needed. * creating one if needed.
*/ */
ThreadTrace threadTrace(ThreadReference thread) { ThreadTrace threadTrace(ThreadReference thread) {
ThreadTrace trace = (ThreadTrace)traceMap.get(thread); ThreadTrace trace = traceMap.get(thread);
if (trace == null) { if (trace == null) {
trace = new ThreadTrace(thread); trace = new ThreadTrace(thread);
traceMap.put(thread, trace); traceMap.put(thread, trace);
...@@ -297,7 +299,7 @@ public class EventThread extends Thread { ...@@ -297,7 +299,7 @@ public class EventThread extends Thread {
} }
void threadDeathEvent(ThreadDeathEvent event) { void threadDeathEvent(ThreadDeathEvent event) {
ThreadTrace trace = (ThreadTrace)traceMap.get(event.thread()); ThreadTrace trace = traceMap.get(event.thread());
if (trace != null) { // only want threads we care about if (trace != null) { // only want threads we care about
trace.threadDeathEvent(event); // Forward event trace.threadDeathEvent(event); // Forward event
} }
...@@ -309,9 +311,8 @@ public class EventThread extends Thread { ...@@ -309,9 +311,8 @@ public class EventThread extends Thread {
*/ */
private void classPrepareEvent(ClassPrepareEvent event) { private void classPrepareEvent(ClassPrepareEvent event) {
EventRequestManager mgr = vm.eventRequestManager(); EventRequestManager mgr = vm.eventRequestManager();
List fields = event.referenceType().visibleFields(); List<Field> fields = event.referenceType().visibleFields();
for (Iterator it = fields.iterator(); it.hasNext(); ) { for (Field field : fields) {
Field field = (Field)it.next();
ModificationWatchpointRequest req = ModificationWatchpointRequest req =
mgr.createModificationWatchpointRequest(field); mgr.createModificationWatchpointRequest(field);
for (int i=0; i<excludes.length; ++i) { for (int i=0; i<excludes.length; ++i) {
...@@ -323,7 +324,7 @@ public class EventThread extends Thread { ...@@ -323,7 +324,7 @@ public class EventThread extends Thread {
} }
private void exceptionEvent(ExceptionEvent event) { private void exceptionEvent(ExceptionEvent event) {
ThreadTrace trace = (ThreadTrace)traceMap.get(event.thread()); ThreadTrace trace = traceMap.get(event.thread());
if (trace != null) { // only want threads we care about if (trace != null) { // only want threads we care about
trace.exceptionEvent(event); // Forward event trace.exceptionEvent(event); // Forward event
} }
......
...@@ -56,6 +56,7 @@ class StreamRedirectThread extends Thread { ...@@ -56,6 +56,7 @@ class StreamRedirectThread extends Thread {
/** /**
* Copy. * Copy.
*/ */
@Override
public void run() { public void run() {
try { try {
char[] cbuf = new char[BUFFER_SIZE]; char[] cbuf = new char[BUFFER_SIZE];
......
...@@ -31,7 +31,6 @@ import com.sun.jdi.connect.*; ...@@ -31,7 +31,6 @@ import com.sun.jdi.connect.*;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
import java.util.Iterator;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.FileWriter; import java.io.FileWriter;
...@@ -155,7 +154,8 @@ public class Trace { ...@@ -155,7 +154,8 @@ public class Trace {
*/ */
VirtualMachine launchTarget(String mainArgs) { VirtualMachine launchTarget(String mainArgs) {
LaunchingConnector connector = findLaunchingConnector(); LaunchingConnector connector = findLaunchingConnector();
Map arguments = connectorArguments(connector, mainArgs); Map<String, Connector.Argument> arguments =
connectorArguments(connector, mainArgs);
try { try {
return connector.launch(arguments); return connector.launch(arguments);
} catch (IOException exc) { } catch (IOException exc) {
...@@ -186,10 +186,8 @@ public class Trace { ...@@ -186,10 +186,8 @@ public class Trace {
* Find a com.sun.jdi.CommandLineLaunch connector * Find a com.sun.jdi.CommandLineLaunch connector
*/ */
LaunchingConnector findLaunchingConnector() { LaunchingConnector findLaunchingConnector() {
List connectors = Bootstrap.virtualMachineManager().allConnectors(); List<Connector> connectors = Bootstrap.virtualMachineManager().allConnectors();
Iterator iter = connectors.iterator(); for (Connector connector : connectors) {
while (iter.hasNext()) {
Connector connector = (Connector)iter.next();
if (connector.name().equals("com.sun.jdi.CommandLineLaunch")) { if (connector.name().equals("com.sun.jdi.CommandLineLaunch")) {
return (LaunchingConnector)connector; return (LaunchingConnector)connector;
} }
...@@ -200,8 +198,8 @@ public class Trace { ...@@ -200,8 +198,8 @@ public class Trace {
/** /**
* Return the launching connector's arguments. * Return the launching connector's arguments.
*/ */
Map connectorArguments(LaunchingConnector connector, String mainArgs) { Map<String, Connector.Argument> connectorArguments(LaunchingConnector connector, String mainArgs) {
Map arguments = connector.defaultArguments(); Map<String, Connector.Argument> arguments = connector.defaultArguments();
Connector.Argument mainArg = Connector.Argument mainArg =
(Connector.Argument)arguments.get("main"); (Connector.Argument)arguments.get("main");
if (mainArg == null) { if (mainArg == null) {
......
...@@ -45,7 +45,7 @@ public class Minst { ...@@ -45,7 +45,7 @@ public class Minst {
*/ */
public static void method_entry(int cnum, int mnum) { public static void method_entry(int cnum, int mnum) {
Class x = Minst.class; Class<Minst> x = Minst.class;
synchronized ( x ) { synchronized ( x ) {
if ( engaged > 0 ) { if ( engaged > 0 ) {
engaged = 0; engaged = 0;
......
...@@ -48,7 +48,7 @@ import java.io.IOException; ...@@ -48,7 +48,7 @@ import java.io.IOException;
*/ */
public class Deadlock { public class Deadlock {
public static void main(String[] argv) { public static void main(String[] argv) {
Deadlock dl = new Deadlock(); new Deadlock();
// Now find deadlock // Now find deadlock
ThreadMonitor monitor = new ThreadMonitor(); ThreadMonitor monitor = new ThreadMonitor();
...@@ -112,6 +112,7 @@ public class Deadlock { ...@@ -112,6 +112,7 @@ public class Deadlock {
this.mon2 = mon2; this.mon2 = mon2;
this.useSync = false; this.useSync = false;
} }
@Override
public void run() { public void run() {
if (useSync) { if (useSync) {
syncLock(); syncLock();
......
...@@ -39,7 +39,6 @@ import java.lang.management.LockInfo; ...@@ -39,7 +39,6 @@ import java.lang.management.LockInfo;
import java.lang.management.MonitorInfo; import java.lang.management.MonitorInfo;
import javax.management.*; import javax.management.*;
import java.io.*; import java.io.*;
import java.util.*;
/** /**
* Example of using the java.lang.management API to dump stack trace * Example of using the java.lang.management API to dump stack trace
...@@ -167,7 +166,8 @@ public class ThreadMonitor { ...@@ -167,7 +166,8 @@ public class ThreadMonitor {
} }
} }
private void printMonitorInfo(ThreadInfo ti, MonitorInfo[] monitors) { private void printMonitorInfo(ThreadInfo ti) {
MonitorInfo[] monitors = ti.getLockedMonitors();
System.out.println(INDENT + "Locked monitors: count = " + monitors.length); System.out.println(INDENT + "Locked monitors: count = " + monitors.length);
for (MonitorInfo mi : monitors) { for (MonitorInfo mi : monitors) {
System.out.println(INDENT + " - " + mi + " locked at "); System.out.println(INDENT + " - " + mi + " locked at ");
...@@ -201,6 +201,7 @@ public class ThreadMonitor { ...@@ -201,6 +201,7 @@ public class ThreadMonitor {
ThreadInfo[] infos = tmbean.getThreadInfo(tids, true, true); ThreadInfo[] infos = tmbean.getThreadInfo(tids, true, true);
for (ThreadInfo ti : infos) { for (ThreadInfo ti : infos) {
printThreadInfo(ti); printThreadInfo(ti);
printMonitorInfo(ti);
printLockInfo(ti.getLockedSynchronizers()); printLockInfo(ti.getLockedSynchronizers());
System.out.println(); System.out.println();
} }
......
...@@ -57,7 +57,6 @@ import java.util.ArrayList; ...@@ -57,7 +57,6 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry;
import java.util.Set; import java.util.Set;
import java.util.SortedMap; import java.util.SortedMap;
import java.util.Timer; import java.util.Timer;
...@@ -69,10 +68,8 @@ import java.net.MalformedURLException; ...@@ -69,10 +68,8 @@ import java.net.MalformedURLException;
import static java.lang.management.ManagementFactory.*; import static java.lang.management.ManagementFactory.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.*; import javax.swing.border.*;
import javax.swing.event.*;
import javax.swing.table.*; import javax.swing.table.*;
/** /**
...@@ -80,6 +77,8 @@ import javax.swing.table.*; ...@@ -80,6 +77,8 @@ import javax.swing.table.*;
* in a table. * in a table.
*/ */
public class JTop extends JPanel { public class JTop extends JPanel {
private static final long serialVersionUID = -1499762160973870696L;
private MBeanServerConnection server; private MBeanServerConnection server;
private ThreadMXBean tmbean; private ThreadMXBean tmbean;
private MyTableModel tmodel; private MyTableModel tmodel;
...@@ -122,29 +121,34 @@ public class JTop extends JPanel { ...@@ -122,29 +121,34 @@ public class JTop extends JPanel {
} }
class MyTableModel extends AbstractTableModel { class MyTableModel extends AbstractTableModel {
private static final long serialVersionUID = -7877310288576779514L;
private String[] columnNames = {"ThreadName", private String[] columnNames = {"ThreadName",
"CPU(sec)", "CPU(sec)",
"State"}; "State"};
// List of all threads. The key of each entry is the CPU time // List of all threads. The key of each entry is the CPU time
// and its value is the ThreadInfo object with no stack trace. // and its value is the ThreadInfo object with no stack trace.
private List<Map.Entry<Long, ThreadInfo>> threadList = private List<Map.Entry<Long, ThreadInfo>> threadList =
Collections.EMPTY_LIST; Collections.emptyList();
public MyTableModel() { public MyTableModel() {
} }
@Override
public int getColumnCount() { public int getColumnCount() {
return columnNames.length; return columnNames.length;
} }
@Override
public int getRowCount() { public int getRowCount() {
return threadList.size(); return threadList.size();
} }
@Override
public String getColumnName(int col) { public String getColumnName(int col) {
return columnNames[col]; return columnNames[col];
} }
@Override
public Object getValueAt(int row, int col) { public Object getValueAt(int row, int col) {
Map.Entry<Long, ThreadInfo> me = threadList.get(row); Map.Entry<Long, ThreadInfo> me = threadList.get(row);
switch (col) { switch (col) {
...@@ -164,7 +168,8 @@ public class JTop extends JPanel { ...@@ -164,7 +168,8 @@ public class JTop extends JPanel {
} }
} }
public Class getColumnClass(int c) { @Override
public Class<?> getColumnClass(int c) {
return getValueAt(0, c).getClass(); return getValueAt(0, c).getClass();
} }
...@@ -207,12 +212,14 @@ public class JTop extends JPanel { ...@@ -207,12 +212,14 @@ public class JTop extends JPanel {
* Format Double with 4 fraction digits * Format Double with 4 fraction digits
*/ */
class DoubleRenderer extends DefaultTableCellRenderer { class DoubleRenderer extends DefaultTableCellRenderer {
private static final long serialVersionUID = 1704639497162584382L;
NumberFormat formatter; NumberFormat formatter;
public DoubleRenderer() { public DoubleRenderer() {
super(); super();
setHorizontalAlignment(JLabel.RIGHT); setHorizontalAlignment(JLabel.RIGHT);
} }
@Override
public void setValue(Object value) { public void setValue(Object value) {
if (formatter==null) { if (formatter==null) {
formatter = NumberFormat.getInstance(); formatter = NumberFormat.getInstance();
...@@ -238,12 +245,14 @@ public class JTop extends JPanel { ...@@ -238,12 +245,14 @@ public class JTop extends JPanel {
} }
// Get the current thread info and CPU time // Get the current thread info and CPU time
@Override
public List<Map.Entry<Long, ThreadInfo>> doInBackground() { public List<Map.Entry<Long, ThreadInfo>> doInBackground() {
return getThreadList(); return getThreadList();
} }
// fire table data changed to trigger GUI update // fire table data changed to trigger GUI update
// when doInBackground() is finished // when doInBackground() is finished
@Override
protected void done() { protected void done() {
try { try {
// Set table model with the new thread list // Set table model with the new thread list
...@@ -290,6 +299,7 @@ public class JTop extends JPanel { ...@@ -290,6 +299,7 @@ public class JTop extends JPanel {
// A timer task to update GUI per each interval // A timer task to update GUI per each interval
TimerTask timerTask = new TimerTask() { TimerTask timerTask = new TimerTask() {
@Override
public void run() { public void run() {
// Schedule the SwingWorker to update the GUI // Schedule the SwingWorker to update the GUI
jtop.newSwingWorker().execute(); jtop.newSwingWorker().execute();
...@@ -299,6 +309,7 @@ public class JTop extends JPanel { ...@@ -299,6 +309,7 @@ public class JTop extends JPanel {
// Create the standalone window with JTop panel // Create the standalone window with JTop panel
// by the event dispatcher thread // by the event dispatcher thread
SwingUtilities.invokeAndWait(new Runnable() { SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() { public void run() {
createAndShowGUI(jtop); createAndShowGUI(jtop);
} }
......
...@@ -40,13 +40,13 @@ import java.beans.PropertyChangeEvent; ...@@ -40,13 +40,13 @@ import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import javax.management.MBeanServerConnection;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingWorker; import javax.swing.SwingWorker;
import com.sun.tools.jconsole.JConsolePlugin;
import com.sun.tools.jconsole.JConsoleContext; import com.sun.tools.jconsole.JConsoleContext;
import com.sun.tools.jconsole.JConsoleContext.ConnectionState; import com.sun.tools.jconsole.JConsoleContext.ConnectionState;
import com.sun.tools.jconsole.JConsolePlugin;
/** /**
* JTopPlugin is a subclass to com.sun.tools.jconsole.JConsolePlugin * JTopPlugin is a subclass to com.sun.tools.jconsole.JConsolePlugin
...@@ -70,6 +70,7 @@ public class JTopPlugin extends JConsolePlugin implements PropertyChangeListener ...@@ -70,6 +70,7 @@ public class JTopPlugin extends JConsolePlugin implements PropertyChangeListener
/* /*
* Returns a JTop tab to be added in JConsole. * Returns a JTop tab to be added in JConsole.
*/ */
@Override
public synchronized Map<String, JPanel> getTabs() { public synchronized Map<String, JPanel> getTabs() {
if (tabs == null) { if (tabs == null) {
jtop = new JTop(); jtop = new JTop();
...@@ -86,6 +87,7 @@ public class JTopPlugin extends JConsolePlugin implements PropertyChangeListener ...@@ -86,6 +87,7 @@ public class JTopPlugin extends JConsolePlugin implements PropertyChangeListener
/* /*
* Returns a SwingWorker which is responsible for updating the JTop tab. * Returns a SwingWorker which is responsible for updating the JTop tab.
*/ */
@Override
public SwingWorker<?,?> newSwingWorker() { public SwingWorker<?,?> newSwingWorker() {
return jtop.newSwingWorker(); return jtop.newSwingWorker();
} }
...@@ -101,10 +103,10 @@ public class JTopPlugin extends JConsolePlugin implements PropertyChangeListener ...@@ -101,10 +103,10 @@ public class JTopPlugin extends JConsolePlugin implements PropertyChangeListener
* Property listener to reset the MBeanServerConnection * Property listener to reset the MBeanServerConnection
* at reconnection time. * at reconnection time.
*/ */
@Override
public void propertyChange(PropertyChangeEvent ev) { public void propertyChange(PropertyChangeEvent ev) {
String prop = ev.getPropertyName(); String prop = ev.getPropertyName();
if (prop == JConsoleContext.CONNECTION_STATE_PROPERTY) { if (prop == JConsoleContext.CONNECTION_STATE_PROPERTY) {
ConnectionState oldState = (ConnectionState)ev.getOldValue();
ConnectionState newState = (ConnectionState)ev.getNewValue(); ConnectionState newState = (ConnectionState)ev.getNewValue();
// JConsole supports disconnection and reconnection // JConsole supports disconnection and reconnection
// The MBeanServerConnection will become invalid when // The MBeanServerConnection will become invalid when
......
...@@ -42,9 +42,6 @@ import javax.swing.*; ...@@ -42,9 +42,6 @@ import javax.swing.*;
import javax.swing.border.EtchedBorder; import javax.swing.border.EtchedBorder;
import javax.swing.border.TitledBorder; import javax.swing.border.TitledBorder;
import java.lang.management.*; import java.lang.management.*;
import java.util.*;
/** /**
* Demo code which plots the memory usage by all memory pools. * Demo code which plots the memory usage by all memory pools.
* The memory usage is sampled at some time interval using * The memory usage is sampled at some time interval using
...@@ -53,6 +50,7 @@ import java.util.*; ...@@ -53,6 +50,7 @@ import java.util.*;
*/ */
public class MemoryMonitor extends JPanel { public class MemoryMonitor extends JPanel {
private static final long serialVersionUID = -3463003810776195761L;
static JCheckBox dateStampCB = new JCheckBox("Output Date Stamp"); static JCheckBox dateStampCB = new JCheckBox("Output Date Stamp");
public Surface surf; public Surface surf;
JPanel controls; JPanel controls;
...@@ -84,6 +82,7 @@ public class MemoryMonitor extends JPanel { ...@@ -84,6 +82,7 @@ public class MemoryMonitor extends JPanel {
controls.add(dateStampCB); controls.add(dateStampCB);
dateStampCB.setFont(font); dateStampCB.setFont(font);
addMouseListener(new MouseAdapter() { addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
removeAll(); removeAll();
if ((doControls = !doControls)) { if ((doControls = !doControls)) {
...@@ -128,28 +127,32 @@ public class MemoryMonitor extends JPanel { ...@@ -128,28 +127,32 @@ public class MemoryMonitor extends JPanel {
public Surface() { public Surface() {
setBackground(Color.black); setBackground(Color.black);
addMouseListener(new MouseAdapter() { addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (thread == null) start(); else stop(); if (thread == null) start(); else stop();
} }
}); });
int i = 0;
usedMem = new float[numPools][]; usedMem = new float[numPools][];
ptNum = new int[numPools]; ptNum = new int[numPools];
} }
@Override
public Dimension getMinimumSize() { public Dimension getMinimumSize() {
return getPreferredSize(); return getPreferredSize();
} }
@Override
public Dimension getMaximumSize() { public Dimension getMaximumSize() {
return getPreferredSize(); return getPreferredSize();
} }
@Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
return new Dimension(135,80); return new Dimension(135,80);
} }
@Override
public void paint(Graphics g) { public void paint(Graphics g) {
if (big == null) { if (big == null) {
...@@ -315,13 +318,14 @@ public class MemoryMonitor extends JPanel { ...@@ -315,13 +318,14 @@ public class MemoryMonitor extends JPanel {
notify(); notify();
} }
@Override
public void run() { public void run() {
Thread me = Thread.currentThread(); Thread me = Thread.currentThread();
while (thread == me && !isShowing() || getSize().width == 0) { while (thread == me && !isShowing() || getSize().width == 0) {
try { try {
thread.sleep(500); Thread.sleep(500);
} catch (InterruptedException e) { return; } } catch (InterruptedException e) { return; }
} }
...@@ -339,7 +343,7 @@ public class MemoryMonitor extends JPanel { ...@@ -339,7 +343,7 @@ public class MemoryMonitor extends JPanel {
} }
repaint(); repaint();
try { try {
thread.sleep(sleepAmount); Thread.sleep(sleepAmount);
} catch (InterruptedException e) { break; } } catch (InterruptedException e) { break; }
if (MemoryMonitor.dateStampCB.isSelected()) { if (MemoryMonitor.dateStampCB.isSelected()) {
System.out.println(new Date().toString() + " " + usedStr); System.out.println(new Date().toString() + " " + usedStr);
...@@ -354,6 +358,7 @@ public class MemoryMonitor extends JPanel { ...@@ -354,6 +358,7 @@ public class MemoryMonitor extends JPanel {
static class Memeater extends ClassLoader implements Runnable { static class Memeater extends ClassLoader implements Runnable {
Object y[]; Object y[];
public Memeater() {} public Memeater() {}
@Override
public void run() { public void run() {
y = new Object[10000000]; y = new Object[10000000];
int k =0; int k =0;
...@@ -378,7 +383,7 @@ public class MemoryMonitor extends JPanel { ...@@ -378,7 +383,7 @@ public class MemoryMonitor extends JPanel {
} }
Class loadNext() throws ClassNotFoundException { Class<?> loadNext() throws ClassNotFoundException {
// public class TestNNNNNN extends java.lang.Object{ // public class TestNNNNNN extends java.lang.Object{
// public TestNNNNNN(); // public TestNNNNNN();
...@@ -424,15 +429,15 @@ public class MemoryMonitor extends JPanel { ...@@ -424,15 +429,15 @@ public class MemoryMonitor extends JPanel {
int len = begin.length + value.length + end.length; int len = begin.length + value.length + end.length;
byte b[] = new byte[len]; byte b[] = new byte[len];
int i, pos=0; int pos=0;
for (i=0; i<begin.length; i++) { for (int i: begin) {
b[pos++] = (byte)begin[i]; b[pos++] = (byte) i;
} }
for (i=0; i<value.length; i++) { for (byte v: value) {
b[pos++] = value[i]; b[pos++] = v;
} }
for (i=0; i<end.length; i++) { for (int e: end) {
b[pos++] = (byte)end[i]; b[pos++] = (byte) e;
} }
return defineClass(name, b, 0, b.length); return defineClass(name, b, 0, b.length);
...@@ -445,8 +450,11 @@ public class MemoryMonitor extends JPanel { ...@@ -445,8 +450,11 @@ public class MemoryMonitor extends JPanel {
public static void main(String s[]) { public static void main(String s[]) {
final MemoryMonitor demo = new MemoryMonitor(); final MemoryMonitor demo = new MemoryMonitor();
WindowListener l = new WindowAdapter() { WindowListener l = new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {System.exit(0);} public void windowClosing(WindowEvent e) {System.exit(0);}
@Override
public void windowDeiconified(WindowEvent e) { demo.surf.start(); } public void windowDeiconified(WindowEvent e) { demo.surf.start(); }
@Override
public void windowIconified(WindowEvent e) { demo.surf.stop(); } public void windowIconified(WindowEvent e) { demo.surf.stop(); }
}; };
JFrame f = new JFrame("MemoryMonitor"); JFrame f = new JFrame("MemoryMonitor");
......
...@@ -71,12 +71,10 @@ public class PrintGCStat { ...@@ -71,12 +71,10 @@ public class PrintGCStat {
assert(false); assert(false);
} }
Set mbeans = server.queryNames(poolName, null); Set<ObjectName> mbeans = server.queryNames(poolName, null);
if (mbeans != null) { if (mbeans != null) {
pools = new ArrayList<MemoryPoolMXBean>(); pools = new ArrayList<MemoryPoolMXBean>();
Iterator iterator = mbeans.iterator(); for (ObjectName objName : mbeans) {
while (iterator.hasNext()) {
ObjectName objName = (ObjectName) iterator.next();
MemoryPoolMXBean p = MemoryPoolMXBean p =
newPlatformMXBeanProxy(server, newPlatformMXBeanProxy(server,
objName.getCanonicalName(), objName.getCanonicalName(),
...@@ -88,9 +86,7 @@ public class PrintGCStat { ...@@ -88,9 +86,7 @@ public class PrintGCStat {
mbeans = server.queryNames(gcName, null); mbeans = server.queryNames(gcName, null);
if (mbeans != null) { if (mbeans != null) {
gcmbeans = new ArrayList<GarbageCollectorMXBean>(); gcmbeans = new ArrayList<GarbageCollectorMXBean>();
Iterator iterator = mbeans.iterator(); for (ObjectName objName : mbeans) {
while (iterator.hasNext()) {
ObjectName objName = (ObjectName) iterator.next();
GarbageCollectorMXBean gc = GarbageCollectorMXBean gc =
newPlatformMXBeanProxy(server, newPlatformMXBeanProxy(server,
objName.getCanonicalName(), objName.getCanonicalName(),
...@@ -116,7 +112,9 @@ public class PrintGCStat { ...@@ -116,7 +112,9 @@ public class PrintGCStat {
* of all memory pools as well as the GC statistics. * of all memory pools as well as the GC statistics.
*/ */
public void printVerboseGc() { public void printVerboseGc() {
System.out.print("Uptime: " + formatMillis(rmbean.getUptime())); System.out.println("Uptime: " + formatMillis(rmbean.getUptime()));
System.out.println("Heap usage: " + mmbean.getHeapMemoryUsage());
System.out.println("Non-Heap memory usage: " + mmbean.getNonHeapMemoryUsage());
for (GarbageCollectorMXBean gc : gcmbeans) { for (GarbageCollectorMXBean gc : gcmbeans) {
System.out.print(" [" + gc.getName() + ": "); System.out.print(" [" + gc.getName() + ": ");
System.out.print("Count=" + gc.getCollectionCount()); System.out.print("Count=" + gc.getCollectionCount());
......
...@@ -95,9 +95,8 @@ public class VerboseGC { ...@@ -95,9 +95,8 @@ public class VerboseGC {
int port = -1; int port = -1;
long interval = 5000; // default is 5 second interval long interval = 5000; // default is 5 second interval
long mins = 5; long mins = 5;
for (int argIndex = 0; argIndex < args.length; argIndex++) { for (String arg: args) {
String arg = args[argIndex]; if (arg.startsWith("-")) {
if (args[argIndex].startsWith("-")) {
if (arg.equals("-h") || if (arg.equals("-h") ||
arg.equals("-help") || arg.equals("-help") ||
arg.equals("-?")) { arg.equals("-?")) {
......
...@@ -42,7 +42,6 @@ import java.util.*; ...@@ -42,7 +42,6 @@ import java.util.*;
import static java.nio.file.StandardOpenOption.*; import static java.nio.file.StandardOpenOption.*;
import static java.nio.file.StandardCopyOption.*; import static java.nio.file.StandardCopyOption.*;
/* /*
* ZipFileSystem usage demo * ZipFileSystem usage demo
* *
...@@ -157,7 +156,6 @@ public class Demo { ...@@ -157,7 +156,6 @@ public class Demo {
env.put("create", "true"); env.put("create", "true");
try (FileSystem fs = provider.newFileSystem(Paths.get(args[1]), env)) { try (FileSystem fs = provider.newFileSystem(Paths.get(args[1]), env)) {
Path path, src, dst; Path path, src, dst;
boolean isRename = false;
switch (action) { switch (action) {
case rename: case rename:
src = fs.getPath(args[2]); src = fs.getPath(args[2]);
...@@ -303,6 +301,7 @@ public class Demo { ...@@ -303,6 +301,7 @@ public class Demo {
final String fStr = (args.length > 3)?args[3]:""; final String fStr = (args.length > 3)?args[3]:"";
try (DirectoryStream<Path> ds = Files.newDirectoryStream(path, try (DirectoryStream<Path> ds = Files.newDirectoryStream(path,
new DirectoryStream.Filter<Path>() { new DirectoryStream.Filter<Path>() {
@Override
public boolean accept(Path path) { public boolean accept(Path path) {
return path.toString().contains(fStr); return path.toString().contains(fStr);
} }
...@@ -358,10 +357,18 @@ public class Demo { ...@@ -358,10 +357,18 @@ public class Demo {
return null; return null;
} }
@SuppressWarnings("unused")
/**
* Not used in demo, but included for demonstrational purposes.
*/
private static byte[] getBytes(String name) { private static byte[] getBytes(String name) {
return name.getBytes(); return name.getBytes();
} }
@SuppressWarnings("unused")
/**
* Not used in demo, but included for demonstrational purposes.
*/
private static String getString(byte[] name) { private static String getString(byte[] name) {
return new String(name); return new String(name);
} }
...@@ -534,6 +541,10 @@ public class Demo { ...@@ -534,6 +541,10 @@ public class Demo {
Files.createDirectory(path); Files.createDirectory(path);
} }
@SuppressWarnings("unused")
/**
* Not used in demo, but included for demonstrational purposes.
*/
private static void rmdirs(Path path) throws IOException { private static void rmdirs(Path path) throws IOException {
while (path != null && path.getNameCount() != 0) { while (path != null && path.getNameCount() != 0) {
Files.delete(path); Files.delete(path);
...@@ -557,7 +568,11 @@ public class Demo { ...@@ -557,7 +568,11 @@ public class Demo {
} }
} }
// check the content of two paths are equal @SuppressWarnings("unused")
/**
* Checks that the content of two paths are equal.
* Not used in demo, but included for demonstrational purposes.
*/
private static void checkEqual(Path src, Path dst) throws IOException private static void checkEqual(Path src, Path dst) throws IOException
{ {
//System.out.printf("checking <%s> vs <%s>...%n", //System.out.printf("checking <%s> vs <%s>...%n",
......
...@@ -38,14 +38,18 @@ import javax.swing.text.*; ...@@ -38,14 +38,18 @@ import javax.swing.text.*;
* document. This is used in ScriptShellPanel class as document for editor. * document. This is used in ScriptShellPanel class as document for editor.
*/ */
public class EditableAtEndDocument extends PlainDocument { public class EditableAtEndDocument extends PlainDocument {
private static final long serialVersionUID = 5358116444851502167L;
private int mark; private int mark;
@Override
public void insertString(int offset, String text, AttributeSet a) public void insertString(int offset, String text, AttributeSet a)
throws BadLocationException { throws BadLocationException {
int len = getLength(); int len = getLength();
super.insertString(len, text, a); super.insertString(len, text, a);
} }
@Override
public void remove(int offs, int len) throws BadLocationException { public void remove(int offs, int len) throws BadLocationException {
int start = offs; int start = offs;
int end = offs + len; int end = offs + len;
......
...@@ -32,14 +32,10 @@ ...@@ -32,14 +32,10 @@
package com.sun.demo.scripting.jconsole; package com.sun.demo.scripting.jconsole;
import com.sun.tools.jconsole.*; import com.sun.tools.jconsole.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*; import java.io.*;
import java.lang.reflect.*;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import javax.script.*; import javax.script.*;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.*;
import java.util.*; import java.util.*;
/** /**
...@@ -86,6 +82,7 @@ public class ScriptJConsolePlugin extends JConsolePlugin ...@@ -86,6 +82,7 @@ public class ScriptJConsolePlugin extends JConsolePlugin
tabs.put("Script Shell", window); tabs.put("Script Shell", window);
new Thread(new Runnable() { new Thread(new Runnable() {
@Override
public void run() { public void run() {
// initialize the script engine // initialize the script engine
initScriptEngine(); initScriptEngine();
...@@ -103,10 +100,12 @@ public class ScriptJConsolePlugin extends JConsolePlugin ...@@ -103,10 +100,12 @@ public class ScriptJConsolePlugin extends JConsolePlugin
window.dispose(); window.dispose();
} }
@Override
public String getPrompt() { public String getPrompt() {
return prompt; return prompt;
} }
@Override
public String executeCommand(String cmd) { public String executeCommand(String cmd) {
String res; String res;
try { try {
...@@ -176,7 +175,7 @@ public class ScriptJConsolePlugin extends JConsolePlugin ...@@ -176,7 +175,7 @@ public class ScriptJConsolePlugin extends JConsolePlugin
String oldFilename = (String) engine.get(ScriptEngine.FILENAME); String oldFilename = (String) engine.get(ScriptEngine.FILENAME);
engine.put(ScriptEngine.FILENAME, "<built-in jconsole." + extension + ">"); engine.put(ScriptEngine.FILENAME, "<built-in jconsole." + extension + ">");
try { try {
Class myClass = this.getClass(); Class<? extends ScriptJConsolePlugin> myClass = this.getClass();
InputStream stream = myClass.getResourceAsStream("/resources/jconsole." + InputStream stream = myClass.getResourceAsStream("/resources/jconsole." +
extension); extension);
if (stream != null) { if (stream != null) {
......
...@@ -44,8 +44,11 @@ import javax.swing.text.*; ...@@ -44,8 +44,11 @@ import javax.swing.text.*;
* A JPanel subclass containing a scrollable text area displaying the * A JPanel subclass containing a scrollable text area displaying the
* jconsole's script console. * jconsole's script console.
*/ */
class ScriptShellPanel extends JPanel { class ScriptShellPanel extends JPanel {
private static final long serialVersionUID = 4116273141148726319L;
// interface to evaluate script command and script prompt // interface to evaluate script command and script prompt
interface CommandProcessor { interface CommandProcessor {
// execute given String as script and return the result // execute given String as script and return the result
...@@ -75,9 +78,11 @@ class ScriptShellPanel extends JPanel { ...@@ -75,9 +78,11 @@ class ScriptShellPanel extends JPanel {
add(scroller, BorderLayout.CENTER); add(scroller, BorderLayout.CENTER);
editor.getDocument().addDocumentListener(new DocumentListener() { editor.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void changedUpdate(DocumentEvent e) { public void changedUpdate(DocumentEvent e) {
} }
@Override
public void insertUpdate(DocumentEvent e) { public void insertUpdate(DocumentEvent e) {
if (updating) return; if (updating) return;
beginUpdate(); beginUpdate();
...@@ -90,10 +95,12 @@ class ScriptShellPanel extends JPanel { ...@@ -90,10 +95,12 @@ class ScriptShellPanel extends JPanel {
// Trim "\\n" combinations // Trim "\\n" combinations
final String cmd1 = trimContinuations(cmd); final String cmd1 = trimContinuations(cmd);
commandExecutor.execute(new Runnable() { commandExecutor.execute(new Runnable() {
@Override
public void run() { public void run() {
final String result = executeCommand(cmd1); final String result = executeCommand(cmd1);
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() { public void run() {
if (result != null) { if (result != null) {
print(result + "\n"); print(result + "\n");
...@@ -113,6 +120,7 @@ class ScriptShellPanel extends JPanel { ...@@ -113,6 +120,7 @@ class ScriptShellPanel extends JPanel {
} }
} }
@Override
public void removeUpdate(DocumentEvent e) { public void removeUpdate(DocumentEvent e) {
} }
}); });
...@@ -121,6 +129,7 @@ class ScriptShellPanel extends JPanel { ...@@ -121,6 +129,7 @@ class ScriptShellPanel extends JPanel {
// the JEditorPane to update the caret's position precisely the // the JEditorPane to update the caret's position precisely the
// size of the insertion // size of the insertion
editor.addCaretListener(new CaretListener() { editor.addCaretListener(new CaretListener() {
@Override
public void caretUpdate(CaretEvent e) { public void caretUpdate(CaretEvent e) {
int len = editor.getDocument().getLength(); int len = editor.getDocument().getLength();
if (e.getDot() > len) { if (e.getDot() > len) {
...@@ -133,6 +142,7 @@ class ScriptShellPanel extends JPanel { ...@@ -133,6 +142,7 @@ class ScriptShellPanel extends JPanel {
hbox.add(Box.createGlue()); hbox.add(Box.createGlue());
JButton button = new JButton("Clear"); // FIXME: i18n? JButton button = new JButton("Clear"); // FIXME: i18n?
button.addActionListener(new ActionListener() { button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
clear(); clear();
} }
...@@ -148,6 +158,7 @@ class ScriptShellPanel extends JPanel { ...@@ -148,6 +158,7 @@ class ScriptShellPanel extends JPanel {
commandExecutor.shutdown(); commandExecutor.shutdown();
} }
@Override
public void requestFocus() { public void requestFocus() {
editor.requestFocus(); editor.requestFocus();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册