diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/AccessWatchpointSpec.java b/src/share/classes/com/sun/tools/example/debug/bdi/AccessWatchpointSpec.java index 9ffd9148827fb02c1337fd52d6ec727e5454724e..09e3f7e681423f0d7fbcff6dc3bf49d7523d91a0 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/AccessWatchpointSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/AccessWatchpointSpec.java @@ -26,7 +26,6 @@ package com.sun.tools.example.debug.bdi; import com.sun.jdi.*; -import com.sun.jdi.request.*; public class AccessWatchpointSpec extends WatchpointSpec { @@ -38,6 +37,7 @@ public class AccessWatchpointSpec extends WatchpointSpec { /** * The 'refType' is known to match. */ + @Override void resolve(ReferenceType refType) throws InvalidTypeException, NoSuchFieldException { if (!(refType instanceof ClassType)) { @@ -51,6 +51,7 @@ public class AccessWatchpointSpec extends WatchpointSpec { .createAccessWatchpointRequest(field)); } + @Override public boolean equals(Object obj) { return (obj instanceof AccessWatchpointSpec) && super.equals(obj); } diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/AmbiguousMethodException.java b/src/share/classes/com/sun/tools/example/debug/bdi/AmbiguousMethodException.java index 0e3d7668d2e017c4579155c156ba70e3c506fe83..667cbb225934a1de1601e627b57c7bd2ff0d2ee5 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/AmbiguousMethodException.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/AmbiguousMethodException.java @@ -27,6 +27,9 @@ package com.sun.tools.example.debug.bdi; public class AmbiguousMethodException extends Exception { + + private static final long serialVersionUID = 7793370943251707514L; + public AmbiguousMethodException() { super(); diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/BreakpointSpec.java b/src/share/classes/com/sun/tools/example/debug/bdi/BreakpointSpec.java index 798e5907063eca54e4233a0bff07a869b5e0dcd7..541582ef89ae4ef92a2e64a2ed504cedb3faf0ed 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/BreakpointSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/BreakpointSpec.java @@ -25,30 +25,33 @@ package com.sun.tools.example.debug.bdi; -import com.sun.jdi.request.*; - public abstract class BreakpointSpec extends EventRequestSpec { BreakpointSpec(EventRequestSpecList specs, ReferenceTypeSpec refSpec) { super(specs, refSpec); } + @Override void notifySet(SpecListener listener, SpecEvent evt) { listener.breakpointSet(evt); } + @Override void notifyDeferred(SpecListener listener, SpecEvent evt) { listener.breakpointDeferred(evt); } + @Override void notifyResolved(SpecListener listener, SpecEvent evt) { listener.breakpointResolved(evt); } + @Override void notifyDeleted(SpecListener listener, SpecEvent evt) { listener.breakpointDeleted(evt); } + @Override void notifyError(SpecListener listener, SpecErrorEvent evt) { listener.breakpointError(evt); } diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/ChildSession.java b/src/share/classes/com/sun/tools/example/debug/bdi/ChildSession.java index 5d5613c228a2d992a313e638024978f37696c5c0..917b0d8803a22cbe2adabf187c22b7306949fb05 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/ChildSession.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/ChildSession.java @@ -43,10 +43,6 @@ class ChildSession extends Session { private BufferedReader out; private BufferedReader err; - private InputWriter inputWriter; - private OutputReader outputReader; - private OutputReader errorReader; - private InputListener input; private OutputListener output; private OutputListener error; @@ -84,6 +80,7 @@ class ChildSession extends Session { this.error = error; } + @Override public boolean attach() { if (!connectToVMProcess()) { @@ -131,6 +128,7 @@ class ChildSession extends Session { return true; } + @Override public void detach() { //### debug @@ -242,10 +240,7 @@ class ChildSession extends Session { this.diagnostics = diagnostics; } - public void quit() { - running = false; - } - + @Override public void run() { try { int count; @@ -254,6 +249,7 @@ class ChildSession extends Session { // Run in Swing event dispatcher thread. final String chars = new String(buffer, 0, count); SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { output.putString(chars); } @@ -264,6 +260,7 @@ class ChildSession extends Session { } catch (IOException e) { // Run in Swing event dispatcher thread. SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { diagnostics.putString("IO error reading " + streamName + @@ -288,11 +285,7 @@ class ChildSession extends Session { this.input = input; } - public void quit() { - //### Won't have much effect if blocked on input! - running = false; - } - + @Override public void run() { String line; while (running) { diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/EvaluationException.java b/src/share/classes/com/sun/tools/example/debug/bdi/EvaluationException.java index 211bb5331b3e6590150bd537bf18bc5d86df7ab8..0e0a6b0b4849ad756483ce37d2dc0909329b1c8b 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/EvaluationException.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/EvaluationException.java @@ -25,4 +25,7 @@ package com.sun.tools.example.debug.bdi; -public class EvaluationException extends Exception {} +public class EvaluationException extends Exception { + + private static final long serialVersionUID = 4947109680354951694L; +} diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/EventRequestSpec.java b/src/share/classes/com/sun/tools/example/debug/bdi/EventRequestSpec.java index 28412756264bf2839bad003a788241de59eb443d..796d5803b9cde8bc6ede854d155f9dd79c6c918b 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/EventRequestSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/EventRequestSpec.java @@ -25,8 +25,6 @@ package com.sun.tools.example.debug.bdi; -import java.util.*; - import com.sun.jdi.*; import com.sun.jdi.request.EventRequest; diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/ExceptionSpec.java b/src/share/classes/com/sun/tools/example/debug/bdi/ExceptionSpec.java index 8be23905e3c5ec874ee500d55de1dbef24071d20..fa3fcb3de289730362abd888487e96a717d2e9fd 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/ExceptionSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/ExceptionSpec.java @@ -26,11 +26,6 @@ package com.sun.tools.example.debug.bdi; 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 { @@ -45,22 +40,27 @@ public class ExceptionSpec extends EventRequestSpec { this.notifyUncaught = notifyUncaught; } + @Override void notifySet(SpecListener listener, SpecEvent evt) { listener.exceptionInterceptSet(evt); } + @Override void notifyDeferred(SpecListener listener, SpecEvent evt) { listener.exceptionInterceptDeferred(evt); } + @Override void notifyResolved(SpecListener listener, SpecEvent evt) { listener.exceptionInterceptResolved(evt); } + @Override void notifyDeleted(SpecListener listener, SpecEvent evt) { listener.exceptionInterceptDeleted(evt); } + @Override void notifyError(SpecListener listener, SpecErrorEvent evt) { listener.exceptionInterceptError(evt); } @@ -68,16 +68,19 @@ public class ExceptionSpec extends EventRequestSpec { /** * The 'refType' is known to match. */ + @Override void resolve(ReferenceType refType) { setRequest(refType.virtualMachine().eventRequestManager() .createExceptionRequest(refType, notifyCaught, notifyUncaught)); } + @Override public int hashCode() { return refSpec.hashCode(); } + @Override public boolean equals(Object obj) { if (obj instanceof ExceptionSpec) { ExceptionSpec es = (ExceptionSpec)obj; @@ -88,6 +91,7 @@ public class ExceptionSpec extends EventRequestSpec { } } + @Override public String toString() { StringBuffer buffer = new StringBuffer("exception catch "); buffer.append(refSpec.toString()); diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/ExecutionManager.java b/src/share/classes/com/sun/tools/example/debug/bdi/ExecutionManager.java index 7dc60f5d6252e66870e904644eb0c756ce8cb712..35f2075daa921a825c97c11322103feffb56420c 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/ExecutionManager.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/ExecutionManager.java @@ -26,7 +26,6 @@ package com.sun.tools.example.debug.bdi; import com.sun.jdi.*; -import com.sun.jdi.event.*; import com.sun.jdi.request.*; import com.sun.jdi.connect.*; import com.sun.tools.example.debug.expr.ExpressionParser; @@ -56,7 +55,7 @@ public class ExecutionManager { // Session Listeners - Vector sessionListeners = new Vector(); + ArrayList sessionListeners = new ArrayList(); public void addSessionListener(SessionListener listener) { sessionListeners.add(listener); @@ -68,7 +67,7 @@ public class ExecutionManager { // Spec Listeners - Vector specListeners = new Vector(); + ArrayList specListeners = new ArrayList(); public void addSpecListener(SpecListener cl) { specListeners.add(cl); @@ -80,7 +79,7 @@ public class ExecutionManager { // JDI Listeners - Vector jdiListeners = new Vector(); + ArrayList jdiListeners = new ArrayList(); /** * Adds a JDIListener @@ -105,50 +104,50 @@ public class ExecutionManager { // App Echo Listeners - private Vector appEchoListeners = new Vector(); + private ArrayList appEchoListeners = new ArrayList(); public void addApplicationEchoListener(OutputListener l) { - appEchoListeners.addElement(l); + appEchoListeners.add(l); } public void removeApplicationEchoListener(OutputListener l) { - appEchoListeners.removeElement(l); + appEchoListeners.remove(l); } // App Output Listeners - private Vector appOutputListeners = new Vector(); + private ArrayList appOutputListeners = new ArrayList(); public void addApplicationOutputListener(OutputListener l) { - appOutputListeners.addElement(l); + appOutputListeners.add(l); } public void removeApplicationOutputListener(OutputListener l) { - appOutputListeners.removeElement(l); + appOutputListeners.remove(l); } // App Error Listeners - private Vector appErrorListeners = new Vector(); + private ArrayList appErrorListeners = new ArrayList(); public void addApplicationErrorListener(OutputListener l) { - appErrorListeners.addElement(l); + appErrorListeners.add(l); } public void removeApplicationErrorListener(OutputListener l) { - appErrorListeners.removeElement(l); + appErrorListeners.remove(l); } // Diagnostic Listeners - private Vector diagnosticsListeners = new Vector(); + private ArrayList diagnosticsListeners = new ArrayList(); public void addDiagnosticsListener(OutputListener l) { - diagnosticsListeners.addElement(l); + diagnosticsListeners.add(l); } public void removeDiagnosticsListener(OutputListener l) { - diagnosticsListeners.removeElement(l); + diagnosticsListeners.remove(l); } /////////// End Listener Registration ////////////// @@ -159,7 +158,9 @@ public class ExecutionManager { } void ensureActiveSession() throws NoSessionException { - if (session == null) throw new NoSessionException(); + if (session == null) { + throw new NoSessionException(); + } } public EventRequestManager eventRequestManager() { @@ -293,6 +294,7 @@ public class ExecutionManager { ensureActiveSession(); if (f != null) { frameGetter = new ExpressionParser.GetFrame() { + @Override public StackFrame get() /* throws IncompatibleThreadStateException */ { return f; } @@ -628,35 +630,35 @@ public class ExecutionManager { */ private void notifyInterrupted() { - Vector l = (Vector)sessionListeners.clone(); + ArrayList l = new ArrayList(sessionListeners); EventObject evt = new EventObject(this); for (int i = 0; i < l.size(); i++) { - ((SessionListener)l.elementAt(i)).sessionInterrupt(evt); + l.get(i).sessionInterrupt(evt); } } private void notifyContinued() { - Vector l = (Vector)sessionListeners.clone(); + ArrayList l = new ArrayList(sessionListeners); EventObject evt = new EventObject(this); for (int i = 0; i < l.size(); i++) { - ((SessionListener)l.elementAt(i)).sessionContinue(evt); + l.get(i).sessionContinue(evt); } } private void notifySessionStart() { - Vector l = (Vector)sessionListeners.clone(); + ArrayList l = new ArrayList(sessionListeners); EventObject evt = new EventObject(this); for (int i = 0; i < l.size(); i++) { - ((SessionListener)l.elementAt(i)).sessionStart(evt); + l.get(i).sessionStart(evt); } } private void notifySessionDeath() { /*** noop for now - Vector l = (Vector)sessionListeners.clone(); + ArrayList l = new ArrayList(sessionListeners); EventObject evt = new EventObject(this); 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 { } private InputListener appInput = new InputListener() { + @Override public String getLine() { // Don't allow reader to be interrupted -- catch and retry. String line = null; @@ -703,6 +706,7 @@ public class ExecutionManager { // Run in Swing event dispatcher thread. final String input = line; SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { echoInputLine(input); } @@ -714,37 +718,40 @@ public class ExecutionManager { private static String newline = System.getProperty("line.separator"); private void echoInputLine(String line) { - Vector l = (Vector)appEchoListeners.clone(); + ArrayList l = new ArrayList(appEchoListeners); for (int i = 0; i < l.size(); i++) { - OutputListener ol = (OutputListener)l.elementAt(i); + OutputListener ol = l.get(i); ol.putString(line); ol.putString(newline); } } private OutputListener appOutput = new OutputListener() { + @Override public void putString(String string) { - Vector l = (Vector)appOutputListeners.clone(); + ArrayList l = new ArrayList(appEchoListeners); for (int i = 0; i < l.size(); i++) { - ((OutputListener)l.elementAt(i)).putString(string); + l.get(i).putString(string); } } }; private OutputListener appError = new OutputListener() { + @Override public void putString(String string) { - Vector l = (Vector)appErrorListeners.clone(); + ArrayList l = new ArrayList(appEchoListeners); for (int i = 0; i < l.size(); i++) { - ((OutputListener)l.elementAt(i)).putString(string); + l.get(i).putString(string); } } }; private OutputListener diagnostics = new OutputListener() { + @Override public void putString(String string) { - Vector l = (Vector)diagnosticsListeners.clone(); + ArrayList l = new ArrayList(diagnosticsListeners); for (int i = 0; i < l.size(); i++) { - ((OutputListener)l.elementAt(i)).putString(string); + l.get(i).putString(string); } } }; diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/FrameIndexOutOfBoundsException.java b/src/share/classes/com/sun/tools/example/debug/bdi/FrameIndexOutOfBoundsException.java index 5f5db5e42063432c5c18f3a7560eadc8d417a7ef..5d70918cb3ba10184909152c91531457bacd75eb 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/FrameIndexOutOfBoundsException.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/FrameIndexOutOfBoundsException.java @@ -25,4 +25,7 @@ package com.sun.tools.example.debug.bdi; -public class FrameIndexOutOfBoundsException extends IndexOutOfBoundsException {} +public class FrameIndexOutOfBoundsException extends IndexOutOfBoundsException { + + private static final long serialVersionUID = -4870148107027371437L; +} diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/JDIEventSource.java b/src/share/classes/com/sun/tools/example/debug/bdi/JDIEventSource.java index 5b1a9b0bd8b188fa31d7ef80e589a6e52db2a283..dedc2477e0c8a7cb99c4a2af25dffa29e4ed9fe6 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/JDIEventSource.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/JDIEventSource.java @@ -28,8 +28,6 @@ package com.sun.tools.example.debug.bdi; import com.sun.jdi.*; import com.sun.jdi.event.*; -import java.util.*; - import com.sun.tools.example.debug.event.*; import javax.swing.SwingUtilities; @@ -55,6 +53,7 @@ class JDIEventSource extends Thread { this.queue = session.vm.eventQueue(); } + @Override public void run() { try { runLoop(); @@ -78,6 +77,7 @@ class JDIEventSource extends Thread { //### Gross foul hackery! private void dispatchEventSet(final AbstractEventSet es) { SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { boolean interrupted = es.suspendedAll(); es.notify(firstListener); @@ -117,54 +117,65 @@ class JDIEventSource extends Thread { //### This is a Hack, deal with it private class FirstListener implements JDIListener { + @Override public void accessWatchpoint(AccessWatchpointEventSet e) { session.runtime.validateThreadInfo(); wantInterrupt = true; } + @Override public void classPrepare(ClassPrepareEventSet e) { wantInterrupt = false; runtime.resolve(e.getReferenceType()); } + @Override public void classUnload(ClassUnloadEventSet e) { wantInterrupt = false; } + @Override public void exception(ExceptionEventSet e) { wantInterrupt = true; } + @Override public void locationTrigger(LocationTriggerEventSet e) { session.runtime.validateThreadInfo(); wantInterrupt = true; } + @Override public void modificationWatchpoint(ModificationWatchpointEventSet e) { session.runtime.validateThreadInfo(); wantInterrupt = true; } + @Override public void threadDeath(ThreadDeathEventSet e) { wantInterrupt = false; } + @Override public void threadStart(ThreadStartEventSet e) { wantInterrupt = false; } + @Override public void vmDeath(VMDeathEventSet e) { //### Should have some way to notify user //### that VM died before the session ended. wantInterrupt = false; } + @Override public void vmDisconnect(VMDisconnectEventSet e) { //### Notify user? wantInterrupt = false; session.runtime.endSession(); } + @Override public void vmStart(VMStartEventSet e) { //### Do we need to do anything with it? wantInterrupt = false; diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java b/src/share/classes/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java index b82b386043e1478a4ee1374d0168aac060ad1d28..0a1e0b1cb3d28269adae410e9620c48117bcd8ea 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java @@ -26,11 +26,7 @@ package com.sun.tools.example.debug.bdi; import com.sun.jdi.*; -import com.sun.jdi.request.*; - -import java.util.ArrayList; import java.util.List; -import java.util.Iterator; public class LineBreakpointSpec extends BreakpointSpec { int lineNumber; @@ -44,6 +40,7 @@ public class LineBreakpointSpec extends BreakpointSpec { /** * The 'refType' is known to match. */ + @Override void resolve(ReferenceType refType) throws InvalidTypeException, LineNotFoundException { if (!(refType instanceof ClassType)) { @@ -81,10 +78,12 @@ public class LineBreakpointSpec extends BreakpointSpec { return lineNumber; } + @Override public int hashCode() { return refSpec.hashCode() + lineNumber; } + @Override public boolean equals(Object obj) { if (obj instanceof LineBreakpointSpec) { LineBreakpointSpec breakpoint = (LineBreakpointSpec)obj; @@ -96,6 +95,7 @@ public class LineBreakpointSpec extends BreakpointSpec { } } + @Override public String errorMessageFor(Exception e) { if (e instanceof LineNotFoundException) { return ("No code at line " + lineNumber() + " in " + refSpec); @@ -107,6 +107,7 @@ public class LineBreakpointSpec extends BreakpointSpec { } } + @Override public String toString() { StringBuffer buffer = new StringBuffer("breakpoint "); buffer.append(refSpec.toString()); diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/LineNotFoundException.java b/src/share/classes/com/sun/tools/example/debug/bdi/LineNotFoundException.java index 00ad8d8f7eae3532f9c58fbaea4f621b939ded62..6d906a8b65ca61db9367a234b30bf2a06a353e30 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/LineNotFoundException.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/LineNotFoundException.java @@ -27,6 +27,9 @@ package com.sun.tools.example.debug.bdi; public class LineNotFoundException extends Exception { + + private static final long serialVersionUID = -5630418117861587582L; + public LineNotFoundException() { super(); diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/MalformedMemberNameException.java b/src/share/classes/com/sun/tools/example/debug/bdi/MalformedMemberNameException.java index 5c6be5d092fc8ac66f1918d2ff9654f7b4a908e7..c73e685f50365780af22857c539eff8fbe08086b 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/MalformedMemberNameException.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/MalformedMemberNameException.java @@ -26,6 +26,9 @@ package com.sun.tools.example.debug.bdi; class MalformedMemberNameException extends Exception { + + private static final long serialVersionUID = -7726664097374844485L; + public MalformedMemberNameException() { super(); } diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java b/src/share/classes/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java index 9e265bd08dbce956fd983cc308783cef7fc5868e..7a9748af102b17a2f7bfd10f1ad43b3c36801ba1 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java @@ -26,11 +26,8 @@ package com.sun.tools.example.debug.bdi; import com.sun.jdi.*; -import com.sun.jdi.request.*; - import java.util.ArrayList; import java.util.List; -import java.util.Iterator; public class MethodBreakpointSpec extends BreakpointSpec { String methodId; @@ -47,6 +44,7 @@ public class MethodBreakpointSpec extends BreakpointSpec { /** * The 'refType' is known to match. */ + @Override void resolve(ReferenceType refType) throws MalformedMemberNameException, AmbiguousMethodException, InvalidTypeException, @@ -80,12 +78,14 @@ public class MethodBreakpointSpec extends BreakpointSpec { return methodArgs; } + @Override public int hashCode() { return refSpec.hashCode() + ((methodId != null) ? methodId.hashCode() : 0) + ((methodArgs != null) ? methodArgs.hashCode() : 0); } + @Override public boolean equals(Object obj) { if (obj instanceof MethodBreakpointSpec) { MethodBreakpointSpec breakpoint = (MethodBreakpointSpec)obj; @@ -98,6 +98,7 @@ public class MethodBreakpointSpec extends BreakpointSpec { } } + @Override public String errorMessageFor(Exception e) { if (e instanceof AmbiguousMethodException) { return ("Method " + methodName() + " is overloaded; specify arguments"); @@ -114,6 +115,7 @@ public class MethodBreakpointSpec extends BreakpointSpec { } } + @Override public String toString() { StringBuffer buffer = new StringBuffer("breakpoint "); buffer.append(refSpec.toString()); @@ -257,7 +259,7 @@ public class MethodBreakpointSpec extends BreakpointSpec { */ if ((name.indexOf('.') == -1) || name.startsWith("*.")) { try { - List refs = specs.runtime.findClassesMatchingPattern(name); + List refs = specs.runtime.findClassesMatchingPattern(name); if (refs.size() > 0) { //### ambiguity??? name = ((ReferenceType)(refs.get(0))).name(); } diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/MethodNotFoundException.java b/src/share/classes/com/sun/tools/example/debug/bdi/MethodNotFoundException.java index 8fa2e60b79fdaf83fb2dbd2772906512d0e3cd93..9fd3aa9efc74ee343fafb05fc499352068df8e7e 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/MethodNotFoundException.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/MethodNotFoundException.java @@ -27,6 +27,8 @@ package com.sun.tools.example.debug.bdi; public class MethodNotFoundException extends Exception { + private static final long serialVersionUID = -2064968107599632609L; + public MethodNotFoundException() { super(); diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/ModificationWatchpointSpec.java b/src/share/classes/com/sun/tools/example/debug/bdi/ModificationWatchpointSpec.java index 7816ce698d2464f434dfcf5de3b1f7881ca19ec7..7043d666ec870d4b4aeb845a2479b2cd1bcf9006 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/ModificationWatchpointSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/ModificationWatchpointSpec.java @@ -26,7 +26,6 @@ package com.sun.tools.example.debug.bdi; import com.sun.jdi.*; -import com.sun.jdi.request.*; public class ModificationWatchpointSpec extends WatchpointSpec { @@ -38,6 +37,7 @@ public class ModificationWatchpointSpec extends WatchpointSpec { /** * The 'refType' is known to match. */ + @Override void resolve(ReferenceType refType) throws InvalidTypeException, NoSuchFieldException { if (!(refType instanceof ClassType)) { @@ -51,6 +51,7 @@ public class ModificationWatchpointSpec extends WatchpointSpec { .createModificationWatchpointRequest(field)); } + @Override public boolean equals(Object obj) { return (obj instanceof ModificationWatchpointSpec) && super.equals(obj); diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/NoSessionException.java b/src/share/classes/com/sun/tools/example/debug/bdi/NoSessionException.java index 9a40b41384617290d5c392f138c3c5095a9f8214..32988ab140b47af28f098cd7276caf8c8c7973c1 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/NoSessionException.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/NoSessionException.java @@ -25,4 +25,7 @@ package com.sun.tools.example.debug.bdi; -public class NoSessionException extends Exception {} +public class NoSessionException extends Exception { + + private static final long serialVersionUID = -7324357828115128603L; +} diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/NoThreadException.java b/src/share/classes/com/sun/tools/example/debug/bdi/NoThreadException.java index aa36d667ee0178ad0744c4fc525f43cdd41ff065..460b1a4ba4cdae98d49f9b74e1b562e06d011353 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/NoThreadException.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/NoThreadException.java @@ -25,4 +25,8 @@ package com.sun.tools.example.debug.bdi; -public class NoThreadException extends Exception {} +public class NoThreadException extends Exception { + + private static final long serialVersionUID = 1846613539928921998L; + +} diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/PatternReferenceTypeSpec.java b/src/share/classes/com/sun/tools/example/debug/bdi/PatternReferenceTypeSpec.java index e9bd3f93793662effe8fae2411e274ec6c3c2aeb..4f6d73e8e711ce1fde482416b771bf1c1a29a1c8 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/PatternReferenceTypeSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/PatternReferenceTypeSpec.java @@ -47,6 +47,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { /** * Does the specified ReferenceType match this spec. */ + @Override public boolean matches(ReferenceType refType) { if (isWild) { return refType.name().endsWith(classId); @@ -55,10 +56,12 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { } } + @Override public int hashCode() { return classId.hashCode(); } + @Override public boolean equals(Object obj) { if (obj instanceof PatternReferenceTypeSpec) { PatternReferenceTypeSpec spec = (PatternReferenceTypeSpec)obj; @@ -89,6 +92,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { } } + @Override public String toString() { return isWild? "*" + classId : classId; } diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/ReferenceTypeSpec.java b/src/share/classes/com/sun/tools/example/debug/bdi/ReferenceTypeSpec.java index e3282b747f179848308662929470cc0c1578e15f..fc478060aaac540cde95c8b5d5c067230264ea45 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/ReferenceTypeSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/ReferenceTypeSpec.java @@ -33,7 +33,9 @@ interface ReferenceTypeSpec { */ boolean matches(ReferenceType refType); + @Override int hashCode(); + @Override boolean equals(Object obj); } diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/Session.java b/src/share/classes/com/sun/tools/example/debug/bdi/Session.java index 61790af7b32cef3dce43271a3e8c7ce0e382c744..4599cb1ba10fbc1252b25d5a34b46d7112b416be 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/Session.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/Session.java @@ -27,7 +27,6 @@ package com.sun.tools.example.debug.bdi; import com.sun.jdi.VirtualMachine; import com.sun.jdi.VMDisconnectedException; -import com.sun.jdi.event.EventSet; /** * Our repository of what we know about the state of one diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/SourceNameReferenceTypeSpec.java b/src/share/classes/com/sun/tools/example/debug/bdi/SourceNameReferenceTypeSpec.java index 2b8a1e158dbce87e862bdf5e9a325087d117a0aa..c788f5d0c53765371a94de62d71090b2e84a219f 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/SourceNameReferenceTypeSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/SourceNameReferenceTypeSpec.java @@ -39,6 +39,7 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec { /** * Does the specified ReferenceType match this spec. */ + @Override public boolean matches(ReferenceType refType) { try { if (refType.sourceName().equals(sourceName)) { @@ -48,9 +49,6 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec { return true; } catch(AbsentInformationException exc) { } catch(ObjectCollectedException exc) { - } catch(InvalidLineNumberException exc) { -// } catch(ClassNotPreparedException exc) { -// -- should not happen, so don't catch this --- } } } catch(AbsentInformationException exc) { @@ -59,10 +57,12 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec { return false; } + @Override public int hashCode() { return sourceName.hashCode() + linenumber; } + @Override public boolean equals(Object obj) { if (obj instanceof SourceNameReferenceTypeSpec) { SourceNameReferenceTypeSpec spec = (SourceNameReferenceTypeSpec)obj; @@ -74,6 +74,7 @@ class SourceNameReferenceTypeSpec implements ReferenceTypeSpec { } } + @Override public String toString() { return sourceName + "@" + linenumber; } diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/SpecErrorEvent.java b/src/share/classes/com/sun/tools/example/debug/bdi/SpecErrorEvent.java index 86a7575bafa7a0e71ad8f77802c51b56af4fe00b..c6b9f4e78d3c4137b1be8e70b22110709c2c6de4 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/SpecErrorEvent.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/SpecErrorEvent.java @@ -25,10 +25,9 @@ package com.sun.tools.example.debug.bdi; -import java.util.EventObject; - public class SpecErrorEvent extends SpecEvent { + private static final long serialVersionUID = 8162634387866409578L; private Exception reason; public SpecErrorEvent(EventRequestSpec eventRequestSpec, diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/SpecEvent.java b/src/share/classes/com/sun/tools/example/debug/bdi/SpecEvent.java index 6cc1d3a1bfc7c24c275e53597aa557bdacd75ccd..625a263fcefa1c0e6aaba2a7b58ac3bbb218cd3c 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/SpecEvent.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/SpecEvent.java @@ -31,6 +31,7 @@ import com.sun.jdi.request.EventRequest; public class SpecEvent extends EventObject { + private static final long serialVersionUID = 4820735456787276230L; private EventRequestSpec eventRequestSpec; public SpecEvent(EventRequestSpec eventRequestSpec) { diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/ThreadGroupIterator.java b/src/share/classes/com/sun/tools/example/debug/bdi/ThreadGroupIterator.java index 419a466f70bcd44662a41bedd0c0115a0072ba74..c6ec121d8088be54c801d1bfbec1f8d694323f7e 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/ThreadGroupIterator.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/ThreadGroupIterator.java @@ -26,7 +26,6 @@ package com.sun.tools.example.debug.bdi; import com.sun.jdi.ThreadGroupReference; -import com.sun.jdi.ThreadReference; import java.util.List; import java.util.Stack; import java.util.ArrayList; @@ -73,10 +72,12 @@ public class ThreadGroupIterator implements Iterator { } } + @Override public boolean hasNext() { return !stack.isEmpty(); } + @Override public ThreadGroupReference next() { return nextThreadGroup(); } @@ -87,6 +88,7 @@ public class ThreadGroupIterator implements Iterator { return tg; } + @Override public void remove() { throw new UnsupportedOperationException(); } diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/ThreadInfo.java b/src/share/classes/com/sun/tools/example/debug/bdi/ThreadInfo.java index 7ced75a40f41a4ecb6dfdbfd3be61cdbed5012f7..b9516c4313f3a52f699bbd628f961fe0cbbf5ece 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/ThreadInfo.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/ThreadInfo.java @@ -26,9 +26,6 @@ package com.sun.tools.example.debug.bdi; 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. diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/ThreadIterator.java b/src/share/classes/com/sun/tools/example/debug/bdi/ThreadIterator.java index c6b2ce6efd2949610ab617cf627d8610cc7a8e79..6fafd71cd80212bd815e2b2ae4708cfc0dd8ccb1 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/ThreadIterator.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/ThreadIterator.java @@ -43,6 +43,7 @@ public class ThreadIterator implements Iterator { tgi = new ThreadGroupIterator(tgl); } + @Override public boolean hasNext() { while (it == null || !it.hasNext()) { if (!tgi.hasNext()) { @@ -53,6 +54,7 @@ public class ThreadIterator implements Iterator { return true; } + @Override public ThreadReference next() { return it.next(); } @@ -61,6 +63,7 @@ public class ThreadIterator implements Iterator { return next(); } + @Override public void remove() { throw new UnsupportedOperationException(); } diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/Utils.java b/src/share/classes/com/sun/tools/example/debug/bdi/Utils.java index 81993bf05e8b49058958469185c9eadd7cd72695..d3e0173dc9bdcd71322098dc87f1e2fad20cbbd3 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/Utils.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/Utils.java @@ -26,9 +26,6 @@ package com.sun.tools.example.debug.bdi; //### does it belong here? import com.sun.jdi.*; -import com.sun.tools.jdi.*; -import java.util.*; -import java.io.*; public class Utils { diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/VMLaunchFailureException.java b/src/share/classes/com/sun/tools/example/debug/bdi/VMLaunchFailureException.java index fcbe82b332cfdd7ccb244d3e42245207743d90de..d0c482c50e0385ee7c220431521eb02a773e5cdf 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/VMLaunchFailureException.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/VMLaunchFailureException.java @@ -25,4 +25,7 @@ package com.sun.tools.example.debug.bdi; -public class VMLaunchFailureException extends Exception {} +public class VMLaunchFailureException extends Exception { + + private static final long serialVersionUID = -2439646729274310108L; +} diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/VMNotInterruptedException.java b/src/share/classes/com/sun/tools/example/debug/bdi/VMNotInterruptedException.java index 4ddc5a9fc868c2902f21b79e0741c8bdbda919f4..ef12d6d2446bc0f07f420c8ca8559f6ef2aeaf6c 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/VMNotInterruptedException.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/VMNotInterruptedException.java @@ -25,4 +25,7 @@ package com.sun.tools.example.debug.bdi; -public class VMNotInterruptedException extends Exception {} +public class VMNotInterruptedException extends Exception { + + private static final long serialVersionUID = 8111074582188765600L; +} diff --git a/src/share/classes/com/sun/tools/example/debug/bdi/WatchpointSpec.java b/src/share/classes/com/sun/tools/example/debug/bdi/WatchpointSpec.java index 8414a17340a32484612a886b0cd9f17da4596e6d..469b4230a9a9e4268f6d7080fabf9f14cfcc2a4a 100644 --- a/src/share/classes/com/sun/tools/example/debug/bdi/WatchpointSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/bdi/WatchpointSpec.java @@ -25,9 +25,6 @@ package com.sun.tools.example.debug.bdi; -import com.sun.jdi.*; -import com.sun.jdi.request.*; - public abstract class WatchpointSpec extends EventRequestSpec { final String fieldId; @@ -40,31 +37,38 @@ public abstract class WatchpointSpec extends EventRequestSpec { // } } + @Override void notifySet(SpecListener listener, SpecEvent evt) { listener.watchpointSet(evt); } + @Override void notifyDeferred(SpecListener listener, SpecEvent evt) { listener.watchpointDeferred(evt); } + @Override void notifyResolved(SpecListener listener, SpecEvent evt) { listener.watchpointResolved(evt); } + @Override void notifyDeleted(SpecListener listener, SpecEvent evt) { listener.watchpointDeleted(evt); } + @Override void notifyError(SpecListener listener, SpecErrorEvent evt) { listener.watchpointError(evt); } + @Override public int hashCode() { return refSpec.hashCode() + fieldId.hashCode() + getClass().hashCode(); } + @Override public boolean equals(Object obj) { if (obj instanceof WatchpointSpec) { WatchpointSpec watchpoint = (WatchpointSpec)obj; @@ -77,6 +81,7 @@ public abstract class WatchpointSpec extends EventRequestSpec { } } + @Override public String errorMessageFor(Exception e) { if (e instanceof NoSuchFieldException) { return ("No field " + fieldId + " in " + refSpec); diff --git a/src/share/classes/com/sun/tools/example/debug/event/AbstractEventSet.java b/src/share/classes/com/sun/tools/example/debug/event/AbstractEventSet.java index 3dedd03463812939ebf513f263ddf420912e50ef..80cbd9a0da83794a2587e527e00c91dbff3d8d2d 100644 --- a/src/share/classes/com/sun/tools/example/debug/event/AbstractEventSet.java +++ b/src/share/classes/com/sun/tools/example/debug/event/AbstractEventSet.java @@ -33,6 +33,7 @@ import java.util.*; public abstract class AbstractEventSet extends EventObject implements EventSet { + private static final long serialVersionUID = 2772717574222076977L; private final EventSet jdiEventSet; final Event oneEvent; @@ -81,6 +82,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { // Implement Mirror + @Override public VirtualMachine virtualMachine() { return jdiEventSet.virtualMachine(); } @@ -105,10 +107,12 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { return jdiEventSet.suspendPolicy(); } + @Override public void resume() { jdiEventSet.resume(); } + @Override public int suspendPolicy() { return jdiEventSet.suspendPolicy(); } @@ -128,6 +132,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { /** * Return an iterator specific to {@link Event} objects. */ + @Override public EventIterator eventIterator() { return jdiEventSet.eventIterator(); } @@ -142,6 +147,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { * * @return the number of elements in this set (its cardinality). */ + @Override public int size() { return jdiEventSet.size(); } @@ -151,6 +157,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { * * @return true if this set contains no elements. */ + @Override public boolean isEmpty() { return jdiEventSet.isEmpty(); } @@ -163,6 +170,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { * * @return true if this set contains the specified element. */ + @Override public boolean contains(Object o) { return jdiEventSet.contains(o); } @@ -174,6 +182,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { * * @return an iterator over the elements in this set. */ + @Override public Iterator iterator() { return jdiEventSet.iterator(); } @@ -184,6 +193,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { * * @return an array containing all of the elements in this set. */ + @Override public Object[] toArray() { return jdiEventSet.toArray(); } @@ -202,6 +212,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { * @throws ArrayStoreException the runtime type of a is not a supertype * of the runtime type of every element in this set. */ + @Override public T[] toArray(T a[]) { return jdiEventSet.toArray(a); } @@ -217,6 +228,7 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { * @return true if this set contains all of the elements of the * specified collection. */ + @Override public boolean containsAll(Collection c) { return jdiEventSet.containsAll(c); } @@ -224,21 +236,27 @@ public abstract class AbstractEventSet extends EventObject implements EventSet { // Make the rest of Set unmodifiable + @Override public boolean add(Event e){ throw new UnsupportedOperationException(); } + @Override public boolean remove(Object o) { throw new UnsupportedOperationException(); } + @Override public boolean addAll(Collection coll) { throw new UnsupportedOperationException(); } + @Override public boolean removeAll(Collection coll) { throw new UnsupportedOperationException(); } + @Override public boolean retainAll(Collection coll) { throw new UnsupportedOperationException(); } + @Override public void clear() { throw new UnsupportedOperationException(); } diff --git a/src/share/classes/com/sun/tools/example/debug/event/AccessWatchpointEventSet.java b/src/share/classes/com/sun/tools/example/debug/event/AccessWatchpointEventSet.java index 52894615e2bcf59241e53625a3e75bb210f98402..37b73e5c4a279bda4675120644b7a46079408f50 100644 --- a/src/share/classes/com/sun/tools/example/debug/event/AccessWatchpointEventSet.java +++ b/src/share/classes/com/sun/tools/example/debug/event/AccessWatchpointEventSet.java @@ -25,15 +25,17 @@ package com.sun.tools.example.debug.event; -import com.sun.jdi.*; import com.sun.jdi.event.*; public class AccessWatchpointEventSet extends WatchpointEventSet { + private static final long serialVersionUID = -2620394219156607673L; + AccessWatchpointEventSet(EventSet jdiEventSet) { super(jdiEventSet); } + @Override public void notify(JDIListener listener) { listener.accessWatchpoint(this); } diff --git a/src/share/classes/com/sun/tools/example/debug/event/ClassPrepareEventSet.java b/src/share/classes/com/sun/tools/example/debug/event/ClassPrepareEventSet.java index 763e5426eec9cb08945073ae26f59e3b6a688467..69050d3f53a367560d5a01b6b9b4ec65048af4c1 100644 --- a/src/share/classes/com/sun/tools/example/debug/event/ClassPrepareEventSet.java +++ b/src/share/classes/com/sun/tools/example/debug/event/ClassPrepareEventSet.java @@ -30,6 +30,8 @@ import com.sun.jdi.event.*; public class ClassPrepareEventSet extends AbstractEventSet { + private static final long serialVersionUID = 5958493423581010491L; + ClassPrepareEventSet(EventSet jdiEventSet) { super(jdiEventSet); } @@ -55,6 +57,7 @@ public class ClassPrepareEventSet extends AbstractEventSet { return ((ClassPrepareEvent)oneEvent).referenceType(); } + @Override public void notify(JDIListener listener) { listener.classPrepare(this); } diff --git a/src/share/classes/com/sun/tools/example/debug/event/ClassUnloadEventSet.java b/src/share/classes/com/sun/tools/example/debug/event/ClassUnloadEventSet.java index b7f996a5a2b9379f4027b8ead5b7a541f9a72b3c..c043b23b29ad34fbb45e8766b788406388fd45d2 100644 --- a/src/share/classes/com/sun/tools/example/debug/event/ClassUnloadEventSet.java +++ b/src/share/classes/com/sun/tools/example/debug/event/ClassUnloadEventSet.java @@ -25,11 +25,12 @@ package com.sun.tools.example.debug.event; -import com.sun.jdi.*; import com.sun.jdi.event.*; public class ClassUnloadEventSet extends AbstractEventSet { + private static final long serialVersionUID = 8370341450345835866L; + ClassUnloadEventSet(EventSet jdiEventSet) { super(jdiEventSet); } @@ -48,6 +49,7 @@ public class ClassUnloadEventSet extends AbstractEventSet { return ((ClassUnloadEvent)oneEvent).classSignature(); } + @Override public void notify(JDIListener listener) { listener.classUnload(this); } diff --git a/src/share/classes/com/sun/tools/example/debug/event/ExceptionEventSet.java b/src/share/classes/com/sun/tools/example/debug/event/ExceptionEventSet.java index d55aab6121ff7e525d9aee81810bece5ad7544b3..c94fa284ae61319615f58368b4da915a262b1db8 100644 --- a/src/share/classes/com/sun/tools/example/debug/event/ExceptionEventSet.java +++ b/src/share/classes/com/sun/tools/example/debug/event/ExceptionEventSet.java @@ -30,6 +30,8 @@ import com.sun.jdi.event.*; public class ExceptionEventSet extends LocatableEventSet { + private static final long serialVersionUID = 5328140167954640711L; + ExceptionEventSet(EventSet jdiEventSet) { super(jdiEventSet); } @@ -75,6 +77,7 @@ public class ExceptionEventSet extends LocatableEventSet { return ((ExceptionEvent)oneEvent).catchLocation(); } + @Override public void notify(JDIListener listener) { listener.exception(this); } diff --git a/src/share/classes/com/sun/tools/example/debug/event/JDIAdapter.java b/src/share/classes/com/sun/tools/example/debug/event/JDIAdapter.java index 3d310604240d737b88f650e33535c8330320bad4..fb3e7a859aa836376da6adcc5b1b303c1029d9e4 100644 --- a/src/share/classes/com/sun/tools/example/debug/event/JDIAdapter.java +++ b/src/share/classes/com/sun/tools/example/debug/event/JDIAdapter.java @@ -33,36 +33,47 @@ package com.sun.tools.example.debug.event; */ public class JDIAdapter implements JDIListener { + @Override public void accessWatchpoint(AccessWatchpointEventSet e) { } + @Override public void classPrepare(ClassPrepareEventSet e) { } + @Override public void classUnload(ClassUnloadEventSet e) { } + @Override public void exception(ExceptionEventSet e) { } + @Override public void locationTrigger(LocationTriggerEventSet e) { } + @Override public void modificationWatchpoint(ModificationWatchpointEventSet e) { } + @Override public void threadDeath(ThreadDeathEventSet e) { } + @Override public void threadStart(ThreadStartEventSet e) { } + @Override public void vmDeath(VMDeathEventSet e) { } + @Override public void vmDisconnect(VMDisconnectEventSet e) { } + @Override public void vmStart(VMStartEventSet e) { } diff --git a/src/share/classes/com/sun/tools/example/debug/event/LocatableEventSet.java b/src/share/classes/com/sun/tools/example/debug/event/LocatableEventSet.java index 6e557c419e82b3c1002a544771a83146aff9ded9..303af121e4e65c5cfd6e53bd7189cf3e81e31e49 100644 --- a/src/share/classes/com/sun/tools/example/debug/event/LocatableEventSet.java +++ b/src/share/classes/com/sun/tools/example/debug/event/LocatableEventSet.java @@ -33,6 +33,8 @@ import com.sun.jdi.event.*; */ public abstract class LocatableEventSet extends AbstractEventSet { + private static final long serialVersionUID = 1027131209997915620L; + LocatableEventSet(EventSet jdiEventSet) { super(jdiEventSet); } diff --git a/src/share/classes/com/sun/tools/example/debug/event/LocationTriggerEventSet.java b/src/share/classes/com/sun/tools/example/debug/event/LocationTriggerEventSet.java index 6e5366eae61a64b396730a660931d7662ecf8931..b30bea52bef7a1427c6c85ccf7f9920d2af950d4 100644 --- a/src/share/classes/com/sun/tools/example/debug/event/LocationTriggerEventSet.java +++ b/src/share/classes/com/sun/tools/example/debug/event/LocationTriggerEventSet.java @@ -25,15 +25,17 @@ package com.sun.tools.example.debug.event; -import com.sun.jdi.*; import com.sun.jdi.event.*; public class LocationTriggerEventSet extends LocatableEventSet { + private static final long serialVersionUID = -3674631710485872487L; + LocationTriggerEventSet(EventSet jdiEventSet) { super(jdiEventSet); } + @Override public void notify(JDIListener listener) { listener.locationTrigger(this); } diff --git a/src/share/classes/com/sun/tools/example/debug/event/ModificationWatchpointEventSet.java b/src/share/classes/com/sun/tools/example/debug/event/ModificationWatchpointEventSet.java index d7824b7abf92b6279740be97f89fd39479b32b97..382a8f31b7cd791c8915c123ad6c0fe1d9f68cef 100644 --- a/src/share/classes/com/sun/tools/example/debug/event/ModificationWatchpointEventSet.java +++ b/src/share/classes/com/sun/tools/example/debug/event/ModificationWatchpointEventSet.java @@ -30,6 +30,8 @@ import com.sun.jdi.event.*; public class ModificationWatchpointEventSet extends WatchpointEventSet { + private static final long serialVersionUID = -680889300856154719L; + ModificationWatchpointEventSet(EventSet jdiEventSet) { super(jdiEventSet); } @@ -42,6 +44,7 @@ public class ModificationWatchpointEventSet extends WatchpointEventSet { return ((ModificationWatchpointEvent)oneEvent).valueToBe(); } + @Override public void notify(JDIListener listener) { listener.modificationWatchpoint(this); } diff --git a/src/share/classes/com/sun/tools/example/debug/event/ThreadDeathEventSet.java b/src/share/classes/com/sun/tools/example/debug/event/ThreadDeathEventSet.java index 2e2cc00eea10fd95200c8653add2a02d03effdc0..ad432f77842652f5062ddf3c680ee924d4626b67 100644 --- a/src/share/classes/com/sun/tools/example/debug/event/ThreadDeathEventSet.java +++ b/src/share/classes/com/sun/tools/example/debug/event/ThreadDeathEventSet.java @@ -30,6 +30,8 @@ import com.sun.jdi.event.*; public class ThreadDeathEventSet extends AbstractEventSet { + private static final long serialVersionUID = -8801604712308151331L; + ThreadDeathEventSet(EventSet jdiEventSet) { super(jdiEventSet); } @@ -44,6 +46,7 @@ public class ThreadDeathEventSet extends AbstractEventSet { return ((ThreadDeathEvent)oneEvent).thread(); } + @Override public void notify(JDIListener listener) { listener.threadDeath(this); } diff --git a/src/share/classes/com/sun/tools/example/debug/event/ThreadStartEventSet.java b/src/share/classes/com/sun/tools/example/debug/event/ThreadStartEventSet.java index 8f7ccc6fe3974272a50f3c3398cc8b8858256d33..63b1fb42603b221fe214c9a243f93c4b575ee6a6 100644 --- a/src/share/classes/com/sun/tools/example/debug/event/ThreadStartEventSet.java +++ b/src/share/classes/com/sun/tools/example/debug/event/ThreadStartEventSet.java @@ -30,6 +30,8 @@ import com.sun.jdi.event.*; public class ThreadStartEventSet extends AbstractEventSet { + private static final long serialVersionUID = -3802096132294933502L; + ThreadStartEventSet(EventSet jdiEventSet) { super(jdiEventSet); } @@ -44,6 +46,7 @@ public class ThreadStartEventSet extends AbstractEventSet { return ((ThreadStartEvent)oneEvent).thread(); } + @Override public void notify(JDIListener listener) { listener.threadStart(this); } diff --git a/src/share/classes/com/sun/tools/example/debug/event/VMDeathEventSet.java b/src/share/classes/com/sun/tools/example/debug/event/VMDeathEventSet.java index 963eb8e8e829db0ba6d4d760adf45b90e230bc4c..017f11ff5aedaeab9c5fc06625dfc5069a80fbcf 100644 --- a/src/share/classes/com/sun/tools/example/debug/event/VMDeathEventSet.java +++ b/src/share/classes/com/sun/tools/example/debug/event/VMDeathEventSet.java @@ -29,10 +29,13 @@ import com.sun.jdi.event.*; public class VMDeathEventSet extends AbstractEventSet { + private static final long serialVersionUID = 1163097303940092229L; + VMDeathEventSet(EventSet jdiEventSet) { super(jdiEventSet); } + @Override public void notify(JDIListener listener) { listener.vmDeath(this); } diff --git a/src/share/classes/com/sun/tools/example/debug/event/VMDisconnectEventSet.java b/src/share/classes/com/sun/tools/example/debug/event/VMDisconnectEventSet.java index d85553095555759b1d3d476ce03d20a9a1da318c..4edf4b872c9e54a3fa6c7d0559b19d96049386a3 100644 --- a/src/share/classes/com/sun/tools/example/debug/event/VMDisconnectEventSet.java +++ b/src/share/classes/com/sun/tools/example/debug/event/VMDisconnectEventSet.java @@ -29,10 +29,13 @@ import com.sun.jdi.event.*; public class VMDisconnectEventSet extends AbstractEventSet { + private static final long serialVersionUID = 7968123152344675342L; + VMDisconnectEventSet(EventSet jdiEventSet) { super(jdiEventSet); } + @Override public void notify(JDIListener listener) { listener.vmDisconnect(this); } diff --git a/src/share/classes/com/sun/tools/example/debug/event/VMStartEventSet.java b/src/share/classes/com/sun/tools/example/debug/event/VMStartEventSet.java index d04116a44af5ba81d156e408c064a933ab3db6e6..896fa78c36921976c92694eec79b23aefd3a703c 100644 --- a/src/share/classes/com/sun/tools/example/debug/event/VMStartEventSet.java +++ b/src/share/classes/com/sun/tools/example/debug/event/VMStartEventSet.java @@ -30,6 +30,8 @@ import com.sun.jdi.event.*; public class VMStartEventSet extends AbstractEventSet { + private static final long serialVersionUID = -3384957227835478191L; + VMStartEventSet(EventSet jdiEventSet) { super(jdiEventSet); } @@ -44,6 +46,7 @@ public class VMStartEventSet extends AbstractEventSet { return ((VMStartEvent)oneEvent).thread(); } + @Override public void notify(JDIListener listener) { listener.vmStart(this); } diff --git a/src/share/classes/com/sun/tools/example/debug/event/WatchpointEventSet.java b/src/share/classes/com/sun/tools/example/debug/event/WatchpointEventSet.java index 5c4de70100119c41117ef7c52b94595673ee84e6..628f21cb92db65d0052536f97102c7c6f73643d3 100644 --- a/src/share/classes/com/sun/tools/example/debug/event/WatchpointEventSet.java +++ b/src/share/classes/com/sun/tools/example/debug/event/WatchpointEventSet.java @@ -30,6 +30,8 @@ import com.sun.jdi.event.*; public abstract class WatchpointEventSet extends LocatableEventSet { + private static final long serialVersionUID = 5606285209703845409L; + WatchpointEventSet(EventSet jdiEventSet) { super(jdiEventSet); } diff --git a/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java b/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java index 3f8d0001a74a01bc4550f38b195a05de972f3c03..c2c79010c6bc0385bd1774f41ce6ea7f9138b974 100644 --- a/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java +++ b/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java @@ -27,25 +27,25 @@ package com.sun.tools.example.debug.expr; import com.sun.jdi.*; + import java.util.Stack; import java.util.List; import java.util.ArrayList; -@SuppressWarnings("unchecked") public class ExpressionParser implements ExpressionParserConstants { - Stack stack = new Stack(); + Stack stack = new Stack(); VirtualMachine vm = null; GetFrame frameGetter = null; private static GetFrame lastFrameGetter; private static LValue lastLValue; LValue peek() { - return (LValue)stack.peek(); + return stack.peek(); } LValue pop() { - return (LValue)stack.pop(); + return stack.pop(); } void push(LValue lval) { @@ -61,17 +61,14 @@ public class ExpressionParser implements ExpressionParserConstants { } public static Value evaluate(String expr, VirtualMachine vm, - GetFrame frameGetter) throws ParseException, - InvocationException, - InvalidTypeException, - ClassNotLoadedException, + GetFrame frameGetter) throws ParseException, InvocationException, + InvalidTypeException, ClassNotLoadedException, IncompatibleThreadStateException { // TODO StringBufferInputStream is deprecated. java.io.InputStream in = new java.io.StringBufferInputStream(expr); ExpressionParser parser = new ExpressionParser(in); parser.vm = vm; parser.frameGetter = frameGetter; - Value value = null; parser.Expression(); lastFrameGetter = frameGetter; lastLValue = parser.pop(); @@ -89,8 +86,8 @@ public class ExpressionParser implements ExpressionParserConstants { try { parser = new ExpressionParser(new java.io.FileInputStream(args[0])); } catch (java.io.FileNotFoundException e) { - System.out.println("Java Parser Version 1.0.2: File " + - args[0] + " not found."); + System.out.println("Java Parser Version 1.0.2: File " + args[0] + + " not found."); return; } } else { @@ -137,8 +134,7 @@ public class ExpressionParser implements ExpressionParserConstants { jj_consume_token(-1); throw new ParseException(); } - label_1: - while (true) { + label_1: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; @@ -189,8 +185,7 @@ public class ExpressionParser implements ExpressionParserConstants { StringBuffer sb = new StringBuffer(); jj_consume_token(IDENTIFIER); sb.append(token); - label_2: - while (true) { + label_2: while (true) { if (jj_2_1(2)) { ; } else { @@ -198,16 +193,18 @@ public class ExpressionParser implements ExpressionParserConstants { } jj_consume_token(DOT); jj_consume_token(IDENTIFIER); - sb.append('.'); sb.append(token); - } - {if (true) return sb.toString();} + sb.append('.'); + sb.append(token); + } + if (true) { + return sb.toString(); + } throw new Error("Missing return statement in function"); } final public void NameList() throws ParseException { Name(); - label_3: - while (true) { + label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; @@ -261,7 +258,9 @@ public class ExpressionParser implements ExpressionParserConstants { PrimaryExpression(); AssignmentOperator(); Expression(); - LValue exprVal = pop(); pop().setValue(exprVal); push(exprVal); + LValue exprVal = pop(); + pop().setValue(exprVal); + push(exprVal); } final public void AssignmentOperator() throws ParseException { @@ -317,13 +316,18 @@ public class ExpressionParser implements ExpressionParserConstants { Expression(); jj_consume_token(COLON); ConditionalExpression(); - LValue falseBranch = pop(); LValue trueBranch = pop(); + LValue falseBranch = pop(); + LValue trueBranch = pop(); Value cond = pop().interiorGetValue(); if (cond instanceof BooleanValue) { - push(((BooleanValue)cond).booleanValue()? - trueBranch : falseBranch); + push(((BooleanValue) cond).booleanValue() ? trueBranch + : falseBranch); } else { - {if (true) throw new ParseException("Condition must be boolean");} + { + if (true) { + throw new ParseException("Condition must be boolean"); + } + } } break; default: @@ -334,8 +338,7 @@ public class ExpressionParser implements ExpressionParserConstants { final public void ConditionalOrExpression() throws ParseException { ConditionalAndExpression(); - label_4: - while (true) { + label_4: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SC_OR: ; @@ -346,14 +349,17 @@ public class ExpressionParser implements ExpressionParserConstants { } jj_consume_token(SC_OR); 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 { InclusiveOrExpression(); - label_5: - while (true) { + label_5: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SC_AND: ; @@ -364,14 +370,17 @@ public class ExpressionParser implements ExpressionParserConstants { } jj_consume_token(SC_AND); 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 { ExclusiveOrExpression(); - label_6: - while (true) { + label_6: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_OR: ; @@ -382,14 +391,17 @@ public class ExpressionParser implements ExpressionParserConstants { } jj_consume_token(BIT_OR); 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 { AndExpression(); - label_7: - while (true) { + label_7: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case XOR: ; @@ -400,14 +412,17 @@ public class ExpressionParser implements ExpressionParserConstants { } jj_consume_token(XOR); 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 { EqualityExpression(); - label_8: - while (true) { + label_8: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BIT_AND: ; @@ -418,15 +433,18 @@ public class ExpressionParser implements ExpressionParserConstants { } jj_consume_token(BIT_AND); 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 { Token tok; InstanceOfExpression(); - label_9: - while (true) { + label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ: case NE: @@ -460,7 +478,11 @@ public class ExpressionParser implements ExpressionParserConstants { case INSTANCEOF: jj_consume_token(INSTANCEOF); Type(); - {if (true) throw new ParseException("operation not yet supported");} + { + if (true) { + throw new ParseException("operation not yet supported"); + } + } break; default: jj_la1[14] = jj_gen; @@ -471,8 +493,7 @@ public class ExpressionParser implements ExpressionParserConstants { final public void RelationalExpression() throws ParseException { Token tok; ShiftExpression(); - label_10: - while (true) { + label_10: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case GT: case LT: @@ -510,8 +531,7 @@ public class ExpressionParser implements ExpressionParserConstants { final public void ShiftExpression() throws ParseException { AdditiveExpression(); - label_11: - while (true) { + label_11: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LSHIFT: case RSIGNEDSHIFT: @@ -538,15 +558,18 @@ public class ExpressionParser implements ExpressionParserConstants { throw new ParseException(); } 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 { Token tok; MultiplicativeExpression(); - label_12: - while (true) { + label_12: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: case MINUS: @@ -577,8 +600,7 @@ public class ExpressionParser implements ExpressionParserConstants { final public void MultiplicativeExpression() throws ParseException { Token tok; UnaryExpression(); - label_13: - while (true) { + label_13: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: case SLASH: @@ -627,7 +649,11 @@ public class ExpressionParser implements ExpressionParserConstants { throw new ParseException(); } UnaryExpression(); - {if (true) throw new ParseException("operation not yet supported");} + { + if (true) { + throw new ParseException("operation not yet supported"); + } + } break; case INCR: PreIncrementExpression(); @@ -661,13 +687,21 @@ public class ExpressionParser implements ExpressionParserConstants { final public void PreIncrementExpression() throws ParseException { jj_consume_token(INCR); 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 { jj_consume_token(DECR); 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 { @@ -687,7 +721,11 @@ public class ExpressionParser implements ExpressionParserConstants { throw new ParseException(); } UnaryExpression(); - {if (true) throw new ParseException("operation not yet supported");} + { + if (true) { + throw new ParseException("operation not yet supported"); + } + } break; default: jj_la1[26] = jj_gen; @@ -718,8 +756,10 @@ public class ExpressionParser implements ExpressionParserConstants { } } -// This production is to determine lookahead only. The LOOKAHEAD specifications -// below are not used, but they are there just to indicate that we know about + // This production is to determine lookahead only. The LOOKAHEAD + // specifications + // below are not used, but they are there just to indicate that we know + // about // this. final public void CastLookahead() throws ParseException { if (jj_2_4(2)) { @@ -792,7 +832,11 @@ public class ExpressionParser implements ExpressionParserConstants { break; case DECR: jj_consume_token(DECR); - {if (true) throw new ParseException("operation not yet supported");} + { + if (true) { + throw new ParseException("operation not yet supported"); + } + } break; default: jj_la1[30] = jj_gen; @@ -810,8 +854,7 @@ public class ExpressionParser implements ExpressionParserConstants { if (jj_2_6(2)) { jj_consume_token(LPAREN); PrimitiveType(); - label_14: - while (true) { + label_14: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; @@ -830,8 +873,7 @@ public class ExpressionParser implements ExpressionParserConstants { case LPAREN: jj_consume_token(LPAREN); Name(); - label_15: - while (true) { + label_15: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; @@ -856,8 +898,7 @@ public class ExpressionParser implements ExpressionParserConstants { final public void PrimaryExpression() throws ParseException { PrimaryPrefix(); - label_16: - while (true) { + label_16: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: case LBRACKET: @@ -896,7 +937,11 @@ public class ExpressionParser implements ExpressionParserConstants { jj_consume_token(SUPER); jj_consume_token(DOT); jj_consume_token(IDENTIFIER); - {if (true) throw new ParseException("operation not yet supported");} + { + if (true) { + throw new ParseException("operation not yet supported"); + } + } break; case LPAREN: jj_consume_token(LPAREN); @@ -914,7 +959,7 @@ public class ExpressionParser implements ExpressionParserConstants { } final public void PrimarySuffix() throws ParseException { - List argList; + List argList; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: jj_consume_token(LBRACKET); @@ -992,8 +1037,8 @@ public class ExpressionParser implements ExpressionParserConstants { jj_consume_token(NULL); } - final public List Arguments() throws ParseException { - List argList = new ArrayList(); + final public List Arguments() throws ParseException { + List argList = new ArrayList(); jj_consume_token(LPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case FALSE: @@ -1021,15 +1066,18 @@ public class ExpressionParser implements ExpressionParserConstants { ; } jj_consume_token(RPAREN); - {if (true) return argList;} + { + if (true) { + return argList; + } + } throw new Error("Missing return statement in function"); } - final public void ArgumentList(List argList) throws ParseException { + final public void ArgumentList(List argList) throws ParseException { Expression(); argList.add(pop().interiorGetValue()); - label_17: - while (true) { + label_17: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; @@ -1045,7 +1093,8 @@ public class ExpressionParser implements ExpressionParserConstants { } final public void AllocationExpression() throws ParseException { - List argList; String className; + List argList; + String className; if (jj_2_7(2)) { jj_consume_token(NEW); PrimitiveType(); @@ -1062,7 +1111,11 @@ public class ExpressionParser implements ExpressionParserConstants { break; case LBRACKET: ArrayDimensions(); - {if (true) throw new ParseException("operation not yet supported");} + { + if (true) { + throw new ParseException("operation not yet supported"); + } + } break; default: jj_la1[42] = jj_gen; @@ -1079,12 +1132,11 @@ public class ExpressionParser implements ExpressionParserConstants { } /* - * The second LOOKAHEAD specification below is to parse to PrimarySuffix - * if there is an expression between the "[...]". + * The second LOOKAHEAD specification below is to parse to PrimarySuffix if + * there is an expression between the "[...]". */ final public void ArrayDimensions() throws ParseException { - label_18: - while (true) { + label_18: while (true) { jj_consume_token(LBRACKET); Expression(); jj_consume_token(RBRACKET); @@ -1094,8 +1146,7 @@ public class ExpressionParser implements ExpressionParserConstants { break label_18; } } - label_19: - while (true) { + label_19: while (true) { if (jj_2_9(2)) { ; } else { @@ -1107,71 +1158,84 @@ public class ExpressionParser implements ExpressionParserConstants { } 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(); jj_save(0, xla); return retval; } 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(); jj_save(1, xla); return retval; } 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(); jj_save(2, xla); return retval; } 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(); jj_save(3, xla); return retval; } 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(); jj_save(4, xla); return retval; } 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(); jj_save(5, xla); return retval; } 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(); jj_save(6, xla); return retval; } 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(); jj_save(7, xla); return retval; } 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(); jj_save(8, xla); return retval; } final private boolean jj_3R_154() { - if (jj_scan_token(INCR)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(INCR)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } @@ -1180,9 +1244,15 @@ public class ExpressionParser implements ExpressionParserConstants { xsp = jj_scanpos; if (jj_3R_154()) { jj_scanpos = xsp; - if (jj_3R_155()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_155()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } @@ -1191,27 +1261,54 @@ public class ExpressionParser implements ExpressionParserConstants { xsp = jj_scanpos; if (jj_3_6()) { jj_scanpos = xsp; - if (jj_3R_150()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_150()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3_6() { - if (jj_scan_token(LPAREN)) return true; - 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_scan_token(LPAREN)) { + return true; + } + 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; while (true) { xsp = jj_scanpos; - if (jj_3R_152()) { jj_scanpos = xsp; break; } - 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; + if (jj_3R_152()) { + jj_scanpos = xsp; + break; + } + 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; } @@ -1220,45 +1317,86 @@ public class ExpressionParser implements ExpressionParserConstants { xsp = jj_scanpos; if (jj_3R_50()) { jj_scanpos = xsp; - if (jj_3R_51()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_51()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_50() { - if (jj_3R_67()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_67()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3_5() { - if (jj_scan_token(LPAREN)) return true; - 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; + if (jj_scan_token(LPAREN)) { + return true; + } + 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; } final private boolean jj_3R_149() { - if (jj_3R_20()) return true; - 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; + } Token xsp; xsp = jj_scanpos; - if (jj_3R_151()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_151()) { + jj_scanpos = xsp; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_41() { - if (jj_scan_token(LPAREN)) return true; - 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; + if (jj_scan_token(LPAREN)) { + return true; + } + 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; xsp = jj_scanpos; if (jj_3R_59()) { @@ -1275,51 +1413,109 @@ public class ExpressionParser implements ExpressionParserConstants { jj_scanpos = xsp; if (jj_3R_65()) { jj_scanpos = xsp; - if (jj_3R_66()) 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; - } 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; + if (jj_3R_66()) { + 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; + } + } 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; } final private boolean jj_3R_40() { - if (jj_scan_token(LPAREN)) return true; - 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; - if (jj_scan_token(RBRACKET)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(LPAREN)) { + return true; + } + 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; + } + if (jj_scan_token(RBRACKET)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_123() { - 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; + 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; } final private boolean jj_3_1() { - 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; + 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; } final private boolean jj_3_4() { - if (jj_scan_token(LPAREN)) return true; - 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_scan_token(LPAREN)) { + return true; + } + 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; } @@ -1330,76 +1526,129 @@ public class ExpressionParser implements ExpressionParserConstants { jj_scanpos = xsp; if (jj_3R_40()) { jj_scanpos = xsp; - if (jj_3R_41()) 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; + if (jj_3R_41()) { + 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; + } return false; } final private boolean jj_3_3() { - if (jj_3R_22()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_22()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_24() { - if (jj_scan_token(IDENTIFIER)) 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; + } Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3_1()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3_1()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } return false; } final private boolean jj_3R_147() { - if (jj_scan_token(BANG)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(BANG)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_142() { - if (jj_3R_149()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_149()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_122() { - if (jj_3R_24()) return true; - 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; + } return false; } final private boolean jj_3R_49() { - if (jj_scan_token(DOUBLE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(DOUBLE)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_141() { - if (jj_3R_148()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_148()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_48() { - if (jj_scan_token(FLOAT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(FLOAT)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_146() { - if (jj_scan_token(TILDE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(TILDE)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_47() { - if (jj_scan_token(LONG)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(LONG)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } @@ -1408,11 +1657,21 @@ public class ExpressionParser implements ExpressionParserConstants { xsp = jj_scanpos; if (jj_3R_146()) { jj_scanpos = xsp; - if (jj_3R_147()) return true; - 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; + if (jj_3R_147()) { + return true; + } + 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; } @@ -1423,48 +1682,84 @@ public class ExpressionParser implements ExpressionParserConstants { jj_scanpos = xsp; if (jj_3R_141()) { jj_scanpos = xsp; - if (jj_3R_142()) 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; + if (jj_3R_142()) { + 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; + } return false; } final private boolean jj_3R_46() { - if (jj_scan_token(INT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(INT)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_145() { - if (jj_scan_token(REM)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(REM)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_45() { - if (jj_scan_token(SHORT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(SHORT)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_44() { - if (jj_scan_token(BYTE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(BYTE)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_135() { - if (jj_scan_token(DECR)) return true; - 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; + if (jj_scan_token(DECR)) { + return true; + } + 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; } final private boolean jj_3R_43() { - if (jj_scan_token(CHAR)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(CHAR)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } @@ -1485,49 +1780,95 @@ public class ExpressionParser implements ExpressionParserConstants { jj_scanpos = xsp; if (jj_3R_48()) { jj_scanpos = xsp; - if (jj_3R_49()) 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; - } 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; + if (jj_3R_49()) { + 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; + } + } 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; } final private boolean jj_3R_42() { - if (jj_scan_token(BOOLEAN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(BOOLEAN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3_9() { - 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; + 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; } final private boolean jj_3R_121() { - if (jj_3R_23()) return true; - 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; } final private boolean jj_3R_144() { - if (jj_scan_token(SLASH)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(SLASH)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_134() { - if (jj_scan_token(INCR)) return true; - 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; + if (jj_scan_token(INCR)) { + return true; + } + 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; } @@ -1536,62 +1877,105 @@ public class ExpressionParser implements ExpressionParserConstants { xsp = jj_scanpos; if (jj_3R_121()) { jj_scanpos = xsp; - if (jj_3R_122()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_122()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } while (true) { xsp = jj_scanpos; - if (jj_3R_123()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_123()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } return false; } final private boolean jj_3R_120() { - if (jj_scan_token(GE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(GE)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_133() { - if (jj_scan_token(MINUS)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(MINUS)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_127() { - if (jj_3R_136()) 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; } final private boolean jj_3R_126() { - if (jj_3R_135()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_135()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_139() { - if (jj_scan_token(MINUS)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(MINUS)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_125() { - if (jj_3R_134()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_134()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_132() { - if (jj_scan_token(PLUS)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(PLUS)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_143() { - if (jj_scan_token(STAR)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(STAR)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } @@ -1600,11 +1984,21 @@ public class ExpressionParser implements ExpressionParserConstants { xsp = jj_scanpos; if (jj_3R_132()) { jj_scanpos = xsp; - if (jj_3R_133()) return true; - 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; + if (jj_3R_133()) { + return true; + } + 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; } @@ -1617,11 +2011,21 @@ public class ExpressionParser implements ExpressionParserConstants { jj_scanpos = xsp; if (jj_3R_126()) { jj_scanpos = xsp; - if (jj_3R_127()) 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_127()) { + 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; + } return false; } @@ -1632,54 +2036,95 @@ public class ExpressionParser implements ExpressionParserConstants { jj_scanpos = xsp; if (jj_3R_144()) { jj_scanpos = xsp; - if (jj_3R_145()) 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; - if (jj_3R_115()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_145()) { + 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; + } + if (jj_3R_115()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_131() { - if (jj_scan_token(RUNSIGNEDSHIFT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(RUNSIGNEDSHIFT)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_119() { - if (jj_scan_token(LE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(LE)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_138() { - if (jj_scan_token(PLUS)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(PLUS)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_112() { - if (jj_3R_115()) 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; + } Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_137()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_137()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } return false; } final private boolean jj_3R_88() { - if (jj_3R_86()) 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; } final private boolean jj_3R_130() { - if (jj_scan_token(RSIGNEDSHIFT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(RSIGNEDSHIFT)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } @@ -1688,29 +2133,51 @@ public class ExpressionParser implements ExpressionParserConstants { xsp = jj_scanpos; if (jj_3R_138()) { jj_scanpos = xsp; - if (jj_3R_139()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) 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; + if (jj_3R_139()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + 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; } final private boolean jj_3R_87() { - if (jj_3R_82()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_82()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_118() { - if (jj_scan_token(GT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(GT)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_129() { - if (jj_scan_token(LSHIFT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(LSHIFT)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } @@ -1721,68 +2188,128 @@ public class ExpressionParser implements ExpressionParserConstants { jj_scanpos = xsp; if (jj_3R_130()) { jj_scanpos = xsp; - if (jj_3R_131()) 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; - if (jj_3R_108()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_131()) { + 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; + } + if (jj_3R_108()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_108() { - if (jj_3R_112()) return true; - 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; + } Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_128()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_128()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } return false; } final private boolean jj_3_8() { - if (jj_scan_token(LBRACKET)) 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; - if (jj_scan_token(RBRACKET)) 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_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; } final private boolean jj_3R_86() { Token xsp; - if (jj_3_8()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3_8()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } while (true) { xsp = jj_scanpos; - if (jj_3_8()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3_8()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } while (true) { xsp = jj_scanpos; - if (jj_3_9()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3_9()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } return false; } final private boolean jj_3R_117() { - if (jj_scan_token(LT)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(LT)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_106() { - if (jj_3R_108()) return true; - 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; + } Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_116()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_116()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } return false; } @@ -1796,64 +2323,125 @@ public class ExpressionParser implements ExpressionParserConstants { jj_scanpos = xsp; if (jj_3R_119()) { jj_scanpos = xsp; - if (jj_3R_120()) 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; + if (jj_3R_120()) { + 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; } final private boolean jj_3R_111() { - if (jj_scan_token(NE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(NE)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_109() { - if (jj_scan_token(INSTANCEOF)) return true; - 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; + if (jj_scan_token(INSTANCEOF)) { + return true; + } + 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; } final private boolean jj_3R_104() { - if (jj_3R_106()) return true; - 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; + } Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_113()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_113()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } return false; } final private boolean jj_3R_81() { - if (jj_scan_token(NEW)) return true; - 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(NEW)) { + return true; + } + 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; xsp = jj_scanpos; if (jj_3R_87()) { jj_scanpos = xsp; - if (jj_3R_88()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_88()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3_7() { - if (jj_scan_token(NEW)) return true; - 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; + if (jj_scan_token(NEW)) { + return true; + } + 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; } @@ -1862,39 +2450,68 @@ public class ExpressionParser implements ExpressionParserConstants { xsp = jj_scanpos; if (jj_3_7()) { jj_scanpos = xsp; - if (jj_3R_81()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_81()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_97() { - if (jj_scan_token(COMMA)) 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; + if (jj_scan_token(COMMA)) { + 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; } final private boolean jj_3R_39() { - if (jj_scan_token(ORASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(ORASSIGN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_110() { - if (jj_scan_token(EQ)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(EQ)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_102() { - if (jj_3R_104()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_104()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } Token xsp; xsp = jj_scanpos; - if (jj_3R_109()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_109()) { + jj_scanpos = xsp; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } @@ -1903,117 +2520,209 @@ public class ExpressionParser implements ExpressionParserConstants { xsp = jj_scanpos; if (jj_3R_110()) { jj_scanpos = xsp; - if (jj_3R_111()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) 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; + if (jj_3R_111()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + 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; } final private boolean jj_3R_94() { - if (jj_3R_25()) 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; + } Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_97()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_97()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } return false; } final private boolean jj_3R_89() { - if (jj_3R_94()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_94()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_38() { - if (jj_scan_token(XORASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(XORASSIGN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_82() { - if (jj_scan_token(LPAREN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(LPAREN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } Token xsp; xsp = jj_scanpos; - if (jj_3R_89()) jj_scanpos = xsp; - else 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_89()) { + jj_scanpos = xsp; + } else 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; } final private boolean jj_3R_105() { - if (jj_scan_token(BIT_AND)) return true; - 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; + if (jj_scan_token(BIT_AND)) { + return true; + } + 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; } final private boolean jj_3R_100() { - if (jj_3R_102()) return true; - 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; + } Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_107()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_107()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } return false; } final private boolean jj_3R_37() { - if (jj_scan_token(ANDASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(ANDASSIGN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_85() { - if (jj_scan_token(NULL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(NULL)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_103() { - if (jj_scan_token(XOR)) return true; - 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; + if (jj_scan_token(XOR)) { + return true; + } + 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; } final private boolean jj_3R_98() { - if (jj_3R_100()) return true; - 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; + } Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_105()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_105()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } return false; } final private boolean jj_3R_92() { - if (jj_scan_token(FALSE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(FALSE)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_36() { - if (jj_scan_token(RUNSIGNEDSHIFTASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(RUNSIGNEDSHIFTASSIGN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_91() { - if (jj_scan_token(TRUE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(TRUE)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } @@ -2022,109 +2731,189 @@ public class ExpressionParser implements ExpressionParserConstants { xsp = jj_scanpos; if (jj_3R_91()) { jj_scanpos = xsp; - if (jj_3R_92()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; - } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_92()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_101() { - if (jj_scan_token(BIT_OR)) return true; - 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; + if (jj_scan_token(BIT_OR)) { + return true; + } + 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; } final private boolean jj_3R_95() { - if (jj_3R_98()) return true; - 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; + } Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_103()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_103()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } return false; } final private boolean jj_3R_35() { - if (jj_scan_token(RSIGNEDSHIFTASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(RSIGNEDSHIFTASSIGN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_80() { - if (jj_3R_85()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_85()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_66() { - if (jj_3R_69()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_69()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_79() { - if (jj_3R_84()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_84()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_78() { - if (jj_scan_token(STRING_LITERAL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(STRING_LITERAL)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_99() { - if (jj_scan_token(SC_AND)) return true; - 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; + if (jj_scan_token(SC_AND)) { + return true; + } + 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; } final private boolean jj_3R_90() { - if (jj_3R_95()) return true; - 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; + } Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_101()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_101()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } return false; } final private boolean jj_3R_34() { - if (jj_scan_token(LSHIFTASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(LSHIFTASSIGN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_65() { - if (jj_scan_token(NEW)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(NEW)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_77() { - if (jj_scan_token(CHARACTER_LITERAL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(CHARACTER_LITERAL)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_76() { - if (jj_scan_token(FLOATING_POINT_LITERAL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(FLOATING_POINT_LITERAL)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_33() { - if (jj_scan_token(MINUSASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(MINUSASSIGN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } @@ -2141,89 +2930,161 @@ public class ExpressionParser implements ExpressionParserConstants { jj_scanpos = xsp; if (jj_3R_79()) { jj_scanpos = xsp; - if (jj_3R_80()) 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; - } 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_80()) { + 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; + } + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_75() { - if (jj_scan_token(INTEGER_LITERAL)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(INTEGER_LITERAL)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_96() { - if (jj_scan_token(SC_OR)) return true; - 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; + if (jj_scan_token(SC_OR)) { + return true; + } + 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; } final private boolean jj_3R_83() { - if (jj_3R_90()) return true; - 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; + } Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_99()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_99()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } return false; } final private boolean jj_3R_64() { - if (jj_scan_token(SUPER)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(SUPER)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_32() { - if (jj_scan_token(PLUSASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(PLUSASSIGN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_73() { - if (jj_3R_82()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_82()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_72() { - 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; + 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; } final private boolean jj_3R_74() { - if (jj_3R_83()) return true; - 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; + } Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_96()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_96()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } return false; } final private boolean jj_3R_63() { - if (jj_scan_token(THIS)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(THIS)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_31() { - if (jj_scan_token(REMASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(REMASSIGN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } @@ -2234,120 +3095,231 @@ public class ExpressionParser implements ExpressionParserConstants { jj_scanpos = xsp; if (jj_3R_72()) { jj_scanpos = xsp; - if (jj_3R_73()) 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; + if (jj_3R_73()) { + 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; + } return false; } final private boolean jj_3R_71() { - if (jj_scan_token(LBRACKET)) 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; - if (jj_scan_token(RBRACKET)) 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_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; } final private boolean jj_3R_93() { - if (jj_scan_token(HOOK)) 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; - 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; + if (jj_scan_token(HOOK)) { + 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; + } + 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; } final private boolean jj_3R_57() { - if (jj_3R_70()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_70()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_30() { - if (jj_scan_token(SLASHASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(SLASHASSIGN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_27() { - if (jj_3R_58()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_58()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_56() { - if (jj_scan_token(LPAREN)) 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; - if (jj_scan_token(RPAREN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(LPAREN)) { + 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; + } + if (jj_scan_token(RPAREN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_152() { - 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; + 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; } final private boolean jj_3R_55() { - if (jj_scan_token(SUPER)) return true; - 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; + if (jj_scan_token(SUPER)) { + return true; + } + 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; } final private boolean jj_3R_29() { - if (jj_scan_token(STARASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(STARASSIGN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_68() { - if (jj_3R_74()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_74()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } Token xsp; xsp = jj_scanpos; - if (jj_3R_93()) jj_scanpos = xsp; - else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_93()) { + jj_scanpos = xsp; + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_54() { - if (jj_scan_token(THIS)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(THIS)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_62() { - if (jj_scan_token(IDENTIFIER)) 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; } final private boolean jj_3R_53() { - if (jj_3R_24()) return true; - 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; + } return false; } final private boolean jj_3R_153() { - 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; + 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; } @@ -2364,19 +3336,37 @@ public class ExpressionParser implements ExpressionParserConstants { jj_scanpos = xsp; if (jj_3R_56()) { jj_scanpos = xsp; - if (jj_3R_57()) 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; - } 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_57()) { + 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; + } + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } + } else if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_52() { - if (jj_3R_69()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_69()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } @@ -2405,103 +3395,206 @@ public class ExpressionParser implements ExpressionParserConstants { jj_scanpos = xsp; if (jj_3R_38()) { jj_scanpos = xsp; - if (jj_3R_39()) 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; - } 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; + if (jj_3R_39()) { + 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; + } + } 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; } final private boolean jj_3R_28() { - if (jj_scan_token(ASSIGN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(ASSIGN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_61() { - if (jj_scan_token(LPAREN)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(LPAREN)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3_2() { - if (jj_3R_20()) return true; - 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_20()) { + return true; + } + 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; } final private boolean jj_3R_20() { - if (jj_3R_26()) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_26()) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_27()) { jj_scanpos = xsp; break; } - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_3R_27()) { + jj_scanpos = xsp; + break; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } } return false; } final private boolean jj_3R_60() { - if (jj_scan_token(BANG)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(BANG)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_155() { - if (jj_scan_token(DECR)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(DECR)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_67() { - if (jj_3R_20()) return true; - 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; + if (jj_3R_20()) { + return true; + } + 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; } final private boolean jj_3R_150() { - if (jj_scan_token(LPAREN)) return true; - 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(LPAREN)) { + return true; + } + 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; while (true) { xsp = jj_scanpos; - if (jj_3R_153()) { jj_scanpos = xsp; break; } - 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; + if (jj_3R_153()) { + jj_scanpos = xsp; + break; + } + 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; } final private boolean jj_3R_59() { - if (jj_scan_token(TILDE)) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) return false; + if (jj_scan_token(TILDE)) { + return true; + } + if (jj_la == 0 && jj_scanpos == jj_lastpos) { + return false; + } return false; } final private boolean jj_3R_51() { - if (jj_3R_68()) 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; } @@ -2512,13 +3605,28 @@ public class ExpressionParser implements ExpressionParserConstants { private Token jj_scanpos, jj_lastpos; private int jj_la; public boolean lookingAhead = false; - private boolean jj_semLA; private int jj_gen; 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_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 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_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]; private boolean jj_rescan = false; private int jj_gc = 0; @@ -2529,8 +3637,12 @@ public class ExpressionParser implements ExpressionParserConstants { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 44; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJExpressionParserCalls(); + for (int i = 0; i < 44; i++) { + 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) { @@ -2539,8 +3651,12 @@ public class ExpressionParser implements ExpressionParserConstants { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 44; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJExpressionParserCalls(); + for (int i = 0; i < 44; i++) { + jj_la1[i] = -1; + } + for (int i = 0; i < jj_2_rtns.length; i++) { + jj_2_rtns[i] = new JJExpressionParserCalls(); + } } public ExpressionParser(ExpressionParserTokenManager tm) { @@ -2548,8 +3664,12 @@ public class ExpressionParser implements ExpressionParserConstants { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 44; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJExpressionParserCalls(); + for (int i = 0; i < 44; i++) { + 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) { @@ -2557,23 +3677,32 @@ public class ExpressionParser implements ExpressionParserConstants { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 44; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJExpressionParserCalls(); + for (int i = 0; i < 44; i++) { + 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 { Token oldToken; - if ((oldToken = token).next != null) token = token.next; - else token = token.next = token_source.getNextToken(); + if ((oldToken = token).next != null) { + token = token.next; + } else { + token = token.next = token_source.getNextToken(); + } jj_ntk = -1; if (token.kind == kind) { jj_gen++; if (++jj_gc > 100) { jj_gc = 0; - for (int i = 0; i < jj_2_rtns.length; i++) { - JJExpressionParserCalls c = jj_2_rtns[i]; + for (JJExpressionParserCalls jj_2_rtn : jj_2_rtns) { + JJExpressionParserCalls c = jj_2_rtn; while (c != null) { - if (c.gen < jj_gen) c.first = null; + if (c.gen < jj_gen) { + c.first = null; + } c = c.next; } } @@ -2589,7 +3718,8 @@ public class ExpressionParser implements ExpressionParserConstants { if (jj_scanpos == jj_lastpos) { jj_la--; 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 { jj_lastpos = jj_scanpos = jj_scanpos.next; } @@ -2597,16 +3727,25 @@ public class ExpressionParser implements ExpressionParserConstants { jj_scanpos = jj_scanpos.next; } if (jj_rescan) { - int i = 0; Token tok = token; - while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } - if (tok != null) jj_add_error_token(kind, i); + int i = 0; + Token tok = token; + while (tok != null && tok != jj_scanpos) { + i++; + tok = tok.next; + } + if (tok != null) { + jj_add_error_token(kind, i); + } } return (jj_scanpos.kind != kind); } final public Token getNextToken() { - if (token.next != null) token = token.next; - else token = token.next = token_source.getNextToken(); + if (token.next != null) { + token = token.next; + } else { + token = token.next = token_source.getNextToken(); + } jj_ntk = -1; jj_gen++; return token; @@ -2615,27 +3754,33 @@ public class ExpressionParser implements ExpressionParserConstants { final public Token getToken(int index) { Token t = lookingAhead ? jj_scanpos : token; for (int i = 0; i < index; i++) { - if (t.next != null) t = t.next; - else t = t.next = token_source.getNextToken(); + if (t.next != null) { + t = t.next; + } else { + t = t.next = token_source.getNextToken(); + } } return t; } 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); - else + } else { return (jj_ntk = jj_nt.kind); } + } - private java.util.Vector jj_expentries = new java.util.Vector(); + private java.util.Vector jj_expentries = new java.util.Vector(); private int[] jj_expentry; private int jj_kind = -1; private int[] jj_lasttokens = new int[100]; private int jj_endpos; private void jj_add_error_token(int kind, int pos) { - if (pos >= 100) return; + if (pos >= 100) { + return; + } if (pos == jj_endpos + 1) { jj_lasttokens[jj_endpos++] = kind; } else if (jj_endpos != 0) { @@ -2644,8 +3789,9 @@ public class ExpressionParser implements ExpressionParserConstants { jj_expentry[i] = jj_lasttokens[i]; } boolean exists = false; - for (java.util.Enumeration enum_ = jj_expentries.elements(); enum_.hasMoreElements();) { - int[] oldentry = (int[])(enum_.nextElement()); + for (java.util.Enumeration enum_ = jj_expentries.elements(); enum_ + .hasMoreElements();) { + int[] oldentry = (enum_.nextElement()); if (oldentry.length == jj_expentry.length) { exists = true; for (int i = 0; i < jj_expentry.length; i++) { @@ -2654,11 +3800,17 @@ public class ExpressionParser implements ExpressionParserConstants { break; } } - if (exists) break; - } - } - if (!exists) jj_expentries.addElement(jj_expentry); - if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; + if (exists) { + break; + } + } + } + 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 { jj_add_error_token(0, 0); int[][] exptokseq = new int[jj_expentries.size()][]; 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); } @@ -2719,17 +3871,36 @@ public class ExpressionParser implements ExpressionParserConstants { JJExpressionParserCalls p = jj_2_rtns[i]; do { 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) { - case 0: jj_3_1(); break; - case 1: jj_3_2(); break; - case 2: jj_3_3(); 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; + case 0: + jj_3_1(); + break; + case 1: + jj_3_2(); + break; + case 2: + jj_3_3(); + 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; @@ -2741,10 +3912,15 @@ public class ExpressionParser implements ExpressionParserConstants { final private void jj_save(int index, int xla) { JJExpressionParserCalls p = jj_2_rtns[index]; 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.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; } } diff --git a/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java b/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java index 28472858050a9f90dfb0276eb5576d23d34f8643..9787d5de554dad69ed24ecd67d18373520ed7a90 100644 --- a/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java +++ b/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParserTokenManager.java @@ -25,10 +25,6 @@ /* Generated By:JavaCC: Do not edit this line. ExpressionParserTokenManager.java */ 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 { @@ -37,15 +33,17 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) switch (pos) { case 0: - if ((active1 & 0x4000L) != 0L) + if ((active1 & 0x4000L) != 0L) { return 4; + } if ((active0 & 0x7fffffffffffe00L) != 0L) { jjmatchedKind = 67; return 28; } - if ((active1 & 0x100200000000L) != 0L) + if ((active1 & 0x100200000000L) != 0L) { return 49; + } return -1; case 1: if ((active0 & 0x7ffffffbfcffe00L) != 0L) @@ -57,8 +55,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) } return 28; } - if ((active0 & 0x40300000L) != 0L) + if ((active0 & 0x40300000L) != 0L) { return 28; + } return -1; case 2: if ((active0 & 0x77fffb3afeffe00L) != 0L) @@ -70,8 +69,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) } return 28; } - if ((active0 & 0x80004c10000000L) != 0L) + if ((active0 & 0x80004c10000000L) != 0L) { return 28; + } return -1; case 3: if ((active0 & 0x63bff2b8faf4e00L) != 0L) @@ -80,8 +80,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) jjmatchedPos = 3; return 28; } - if ((active0 & 0x14400902040b000L) != 0L) + if ((active0 & 0x14400902040b000L) != 0L) { return 28; + } return -1; case 4: if ((active0 & 0x2235f2b80ac0600L) != 0L) @@ -93,8 +94,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) } return 28; } - if ((active0 & 0x418a0000f034800L) != 0L) + if ((active0 & 0x418a0000f034800L) != 0L) { return 28; + } return -1; case 5: if ((active0 & 0x222070a848c0600L) != 0L) @@ -103,8 +105,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) jjmatchedPos = 5; return 28; } - if ((active0 & 0x11582100200000L) != 0L) + if ((active0 & 0x11582100200000L) != 0L) { return 28; + } return -1; case 6: if ((active0 & 0x222040a80040200L) != 0L) @@ -113,8 +116,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) jjmatchedPos = 6; return 28; } - if ((active0 & 0x30004880400L) != 0L) + if ((active0 & 0x30004880400L) != 0L) { return 28; + } return -1; case 7: if ((active0 & 0x22040a80000000L) != 0L) @@ -123,8 +127,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) jjmatchedPos = 7; return 28; } - if ((active0 & 0x200000000040200L) != 0L) + if ((active0 & 0x200000000040200L) != 0L) { return 28; + } return -1; case 8: if ((active0 & 0x2000280000000L) != 0L) @@ -133,8 +138,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) jjmatchedPos = 8; return 28; } - if ((active0 & 0x20040800000000L) != 0L) + if ((active0 & 0x20040800000000L) != 0L) { return 28; + } return -1; case 9: if ((active0 & 0x2000000000000L) != 0L) @@ -143,8 +149,9 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) jjmatchedPos = 9; return 28; } - if ((active0 & 0x280000000L) != 0L) + if ((active0 & 0x280000000L) != 0L) { return 28; + } return -1; case 10: if ((active0 & 0x2000000000000L) != 0L) @@ -286,16 +293,19 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1) switch(curChar) { case 38: - if ((active1 & 0x8000000L) != 0L) + if ((active1 & 0x8000000L) != 0L) { return jjStopAtPos(1, 91); + } break; case 43: - if ((active1 & 0x10000000L) != 0L) + if ((active1 & 0x10000000L) != 0L) { return jjStopAtPos(1, 92); + } break; case 45: - if ((active1 & 0x20000000L) != 0L) + if ((active1 & 0x20000000L) != 0L) { return jjStopAtPos(1, 93); + } break; case 60: if ((active1 & 0x4000000000L) != 0L) @@ -305,30 +315,31 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1) } return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x2000000000000L); case 61: - if ((active1 & 0x400000L) != 0L) + if ((active1 & 0x400000L) != 0L) { return jjStopAtPos(1, 86); - else if ((active1 & 0x800000L) != 0L) + } else if ((active1 & 0x800000L) != 0L) { return jjStopAtPos(1, 87); - else if ((active1 & 0x1000000L) != 0L) + } else if ((active1 & 0x1000000L) != 0L) { return jjStopAtPos(1, 88); - else if ((active1 & 0x2000000L) != 0L) + } else if ((active1 & 0x2000000L) != 0L) { return jjStopAtPos(1, 89); - else if ((active1 & 0x20000000000L) != 0L) + } else if ((active1 & 0x20000000000L) != 0L) { return jjStopAtPos(1, 105); - else if ((active1 & 0x40000000000L) != 0L) + } else if ((active1 & 0x40000000000L) != 0L) { return jjStopAtPos(1, 106); - else if ((active1 & 0x80000000000L) != 0L) + } else if ((active1 & 0x80000000000L) != 0L) { return jjStopAtPos(1, 107); - else if ((active1 & 0x100000000000L) != 0L) + } else if ((active1 & 0x100000000000L) != 0L) { return jjStopAtPos(1, 108); - else if ((active1 & 0x200000000000L) != 0L) + } else if ((active1 & 0x200000000000L) != 0L) { return jjStopAtPos(1, 109); - else if ((active1 & 0x400000000000L) != 0L) + } else if ((active1 & 0x400000000000L) != 0L) { return jjStopAtPos(1, 110); - else if ((active1 & 0x800000000000L) != 0L) + } else if ((active1 & 0x800000000000L) != 0L) { return jjStopAtPos(1, 111); - else if ((active1 & 0x1000000000000L) != 0L) + } else if ((active1 & 0x1000000000000L) != 0L) { return jjStopAtPos(1, 112); + } break; case 62: if ((active1 & 0x8000000000L) != 0L) @@ -344,8 +355,9 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1) case 101: return jjMoveStringLiteralDfa2_0(active0, 0x104000080000L, active1, 0L); case 102: - if ((active0 & 0x40000000L) != 0L) + if ((active0 & 0x40000000L) != 0L) { return jjStartNfaWithStates_0(1, 30, 28); + } break; case 104: return jjMoveStringLiteralDfa2_0(active0, 0x41c200000008000L, active1, 0L); @@ -377,8 +389,9 @@ private final int jjMoveStringLiteralDfa1_0(long active0, long active1) case 121: return jjMoveStringLiteralDfa2_0(active0, 0x2000000001000L, active1, 0L); case 124: - if ((active1 & 0x4000000L) != 0L) + if ((active1 & 0x4000000L) != 0L) { return jjStopAtPos(1, 90); + } break; default : break; @@ -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) { - if (((active0 &= old0) | (active1 &= old1)) == 0L) + if (((active0 &= old0) | (active1 &= old1)) == 0L) { return jjStartNfa_0(0, old0, old1); + } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(1, active0, active1); @@ -397,10 +411,11 @@ private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, switch(curChar) { case 61: - if ((active1 & 0x2000000000000L) != 0L) + if ((active1 & 0x2000000000000L) != 0L) { return jjStopAtPos(2, 113); - else if ((active1 & 0x4000000000000L) != 0L) + } else if ((active1 & 0x4000000000000L) != 0L) { return jjStopAtPos(2, 114); + } break; case 62: if ((active1 & 0x10000000000L) != 0L) @@ -430,8 +445,9 @@ private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, case 112: return jjMoveStringLiteralDfa3_0(active0, 0x800180000000L, active1, 0L); case 114: - if ((active0 & 0x10000000L) != 0L) + if ((active0 & 0x10000000L) != 0L) { return jjStartNfaWithStates_0(2, 28, 28); + } return jjMoveStringLiteralDfa3_0(active0, 0x18000000000000L, active1, 0L); case 115: return jjMoveStringLiteralDfa3_0(active0, 0x200402200L, active1, 0L); @@ -445,12 +461,14 @@ private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, case 117: return jjMoveStringLiteralDfa3_0(active0, 0x40000000200000L, active1, 0L); case 119: - if ((active0 & 0x4000000000L) != 0L) + if ((active0 & 0x4000000000L) != 0L) { return jjStartNfaWithStates_0(2, 38, 28); + } break; case 121: - if ((active0 & 0x80000000000000L) != 0L) + if ((active0 & 0x80000000000000L) != 0L) { return jjStartNfaWithStates_0(2, 55, 28); + } break; default : break; @@ -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) { - if (((active0 &= old0) | (active1 &= old1)) == 0L) + if (((active0 &= old0) | (active1 &= old1)) == 0L) { return jjStartNfa_0(1, old0, old1); + } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(2, active0, active1); @@ -469,8 +488,9 @@ private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, switch(curChar) { case 61: - if ((active1 & 0x8000000000000L) != 0L) + if ((active1 & 0x8000000000000L) != 0L) { return jjStopAtPos(3, 115); + } break; case 97: return jjMoveStringLiteralDfa4_0(active0, 0x20000000e080800L, active1, 0L); @@ -479,44 +499,51 @@ private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, case 99: return jjMoveStringLiteralDfa4_0(active0, 0x2000000004000L, active1, 0L); case 100: - if ((active0 & 0x100000000000000L) != 0L) + if ((active0 & 0x100000000000000L) != 0L) { return jjStartNfaWithStates_0(3, 56, 28); + } break; case 101: - if ((active0 & 0x1000L) != 0L) + if ((active0 & 0x1000L) != 0L) { return jjStartNfaWithStates_0(3, 12, 28); - else if ((active0 & 0x2000L) != 0L) + } else if ((active0 & 0x2000L) != 0L) { return jjStartNfaWithStates_0(3, 13, 28); - else if ((active0 & 0x400000L) != 0L) + } else if ((active0 & 0x400000L) != 0L) { return jjStartNfaWithStates_0(3, 22, 28); - else if ((active0 & 0x40000000000000L) != 0L) + } else if ((active0 & 0x40000000000000L) != 0L) { return jjStartNfaWithStates_0(3, 54, 28); + } return jjMoveStringLiteralDfa4_0(active0, 0x800800800000L, active1, 0L); case 103: - if ((active0 & 0x1000000000L) != 0L) + if ((active0 & 0x1000000000L) != 0L) { return jjStartNfaWithStates_0(3, 36, 28); + } break; case 105: return jjMoveStringLiteralDfa4_0(active0, 0x2000000000L, active1, 0L); case 107: return jjMoveStringLiteralDfa4_0(active0, 0x10000000000L, active1, 0L); case 108: - if ((active0 & 0x8000000000L) != 0L) + if ((active0 & 0x8000000000L) != 0L) { return jjStartNfaWithStates_0(3, 39, 28); + } return jjMoveStringLiteralDfa4_0(active0, 0x400080080000400L, active1, 0L); case 110: return jjMoveStringLiteralDfa4_0(active0, 0x20000000000000L, active1, 0L); case 111: - if ((active0 & 0x20000000L) != 0L) + if ((active0 & 0x20000000L) != 0L) { return jjStartNfaWithStates_0(3, 29, 28); + } return jjMoveStringLiteralDfa4_0(active0, 0x18000100000000L, active1, 0L); case 114: - if ((active0 & 0x8000L) != 0L) + if ((active0 & 0x8000L) != 0L) { return jjStartNfaWithStates_0(3, 15, 28); + } return jjMoveStringLiteralDfa4_0(active0, 0x200000000000L, active1, 0L); case 115: - if ((active0 & 0x4000000000000L) != 0L) + if ((active0 & 0x4000000000000L) != 0L) { return jjStartNfaWithStates_0(3, 50, 28); + } return jjMoveStringLiteralDfa4_0(active0, 0x1030000L, active1, 0L); case 116: return jjMoveStringLiteralDfa4_0(active0, 0x1440200040200L, active1, 0L); @@ -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) { - if (((active0 &= old0) | (active1 &= old1)) == 0L) + if (((active0 &= old0) | (active1 &= old1)) == 0L) { return jjStartNfa_0(2, old0, old1); + } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(3, active0, 0L); @@ -545,20 +573,23 @@ private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, case 99: return jjMoveStringLiteralDfa5_0(active0, 0x1000000000000L); case 101: - if ((active0 & 0x1000000L) != 0L) + if ((active0 & 0x1000000L) != 0L) { return jjStartNfaWithStates_0(4, 24, 28); - else if ((active0 & 0x400000000000000L) != 0L) + } else if ((active0 & 0x400000000000000L) != 0L) { return jjStartNfaWithStates_0(4, 58, 28); + } return jjMoveStringLiteralDfa5_0(active0, 0x40080000400L); case 104: - if ((active0 & 0x4000L) != 0L) + if ((active0 & 0x4000L) != 0L) { return jjStartNfaWithStates_0(4, 14, 28); + } return jjMoveStringLiteralDfa5_0(active0, 0x2000000000000L); case 105: return jjMoveStringLiteralDfa5_0(active0, 0x480000040000L); case 107: - if ((active0 & 0x800L) != 0L) + if ((active0 & 0x800L) != 0L) { return jjStartNfaWithStates_0(4, 11, 28); + } break; case 108: if ((active0 & 0x2000000L) != 0L) @@ -570,20 +601,23 @@ private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, case 110: return jjMoveStringLiteralDfa5_0(active0, 0x800000L); case 114: - if ((active0 & 0x800000000000L) != 0L) + if ((active0 & 0x800000000000L) != 0L) { return jjStartNfaWithStates_0(4, 47, 28); + } return jjMoveStringLiteralDfa5_0(active0, 0x100900000200L); case 115: - if ((active0 & 0x10000L) != 0L) + if ((active0 & 0x10000L) != 0L) { return jjStartNfaWithStates_0(4, 16, 28); + } return jjMoveStringLiteralDfa5_0(active0, 0x20000000000000L); case 116: - if ((active0 & 0x20000L) != 0L) + if ((active0 & 0x20000L) != 0L) { return jjStartNfaWithStates_0(4, 17, 28); - else if ((active0 & 0x8000000L) != 0L) + } else if ((active0 & 0x8000000L) != 0L) { return jjStartNfaWithStates_0(4, 27, 28); - else if ((active0 & 0x200000000000L) != 0L) + } else if ((active0 & 0x200000000000L) != 0L) { return jjStartNfaWithStates_0(4, 45, 28); + } return jjMoveStringLiteralDfa5_0(active0, 0x200000000000000L); case 117: return jjMoveStringLiteralDfa5_0(active0, 0x80000L); @@ -603,8 +637,9 @@ private final int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, } private final int jjMoveStringLiteralDfa5_0(long old0, long active0) { - if (((active0 &= old0)) == 0L) + if (((active0 &= old0)) == 0L) { return jjStartNfa_0(3, old0, 0L); + } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(4, active0, 0L); @@ -615,26 +650,29 @@ private final int jjMoveStringLiteralDfa5_0(long old0, long active0) case 97: return jjMoveStringLiteralDfa6_0(active0, 0x600L); case 99: - if ((active0 & 0x80000000000L) != 0L) + if ((active0 & 0x80000000000L) != 0L) { return jjStartNfaWithStates_0(5, 43, 28); - else if ((active0 & 0x400000000000L) != 0L) + } else if ((active0 & 0x400000000000L) != 0L) { return jjStartNfaWithStates_0(5, 46, 28); + } return jjMoveStringLiteralDfa6_0(active0, 0x40000000000L); case 100: return jjMoveStringLiteralDfa6_0(active0, 0x800000L); case 101: - if ((active0 & 0x200000L) != 0L) + if ((active0 & 0x200000L) != 0L) { return jjStartNfaWithStates_0(5, 21, 28); - else if ((active0 & 0x2000000000L) != 0L) + } else if ((active0 & 0x2000000000L) != 0L) { return jjStartNfaWithStates_0(5, 37, 28); + } break; case 102: return jjMoveStringLiteralDfa6_0(active0, 0x800000000L); case 103: return jjMoveStringLiteralDfa6_0(active0, 0x10000000000L); case 104: - if ((active0 & 0x1000000000000L) != 0L) + if ((active0 & 0x1000000000000L) != 0L) { return jjStartNfaWithStates_0(5, 48, 28); + } break; case 105: return jjMoveStringLiteralDfa6_0(active0, 0x220000000000000L); @@ -643,18 +681,21 @@ private final int jjMoveStringLiteralDfa5_0(long old0, long active0) case 109: return jjMoveStringLiteralDfa6_0(active0, 0x80000000L); case 110: - if ((active0 & 0x100000000000L) != 0L) + if ((active0 & 0x100000000000L) != 0L) { return jjStartNfaWithStates_0(5, 44, 28); + } return jjMoveStringLiteralDfa6_0(active0, 0x200040000L); case 114: return jjMoveStringLiteralDfa6_0(active0, 0x2000000000000L); case 115: - if ((active0 & 0x10000000000000L) != 0L) + if ((active0 & 0x10000000000000L) != 0L) { return jjStartNfaWithStates_0(5, 52, 28); + } break; case 116: - if ((active0 & 0x100000000L) != 0L) + if ((active0 & 0x100000000L) != 0L) { return jjStartNfaWithStates_0(5, 32, 28); + } return jjMoveStringLiteralDfa6_0(active0, 0x20000000000L); default : break; @@ -663,8 +704,9 @@ private final int jjMoveStringLiteralDfa5_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); + } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(5, active0, 0L); @@ -677,32 +719,37 @@ private final int jjMoveStringLiteralDfa6_0(long old0, long active0) case 99: return jjMoveStringLiteralDfa7_0(active0, 0x200000200L); case 101: - if ((active0 & 0x10000000000L) != 0L) + if ((active0 & 0x10000000000L) != 0L) { return jjStartNfaWithStates_0(6, 40, 28); - else if ((active0 & 0x20000000000L) != 0L) + } else if ((active0 & 0x20000000000L) != 0L) { return jjStartNfaWithStates_0(6, 41, 28); + } return jjMoveStringLiteralDfa7_0(active0, 0x20000080000000L); case 108: return jjMoveStringLiteralDfa7_0(active0, 0x200000000000000L); case 110: - if ((active0 & 0x400L) != 0L) + if ((active0 & 0x400L) != 0L) { return jjStartNfaWithStates_0(6, 10, 28); + } break; case 111: return jjMoveStringLiteralDfa7_0(active0, 0x2000000000000L); case 115: - if ((active0 & 0x800000L) != 0L) + if ((active0 & 0x800000L) != 0L) { return jjStartNfaWithStates_0(6, 23, 28); + } break; case 116: - if ((active0 & 0x80000L) != 0L) + if ((active0 & 0x80000L) != 0L) { return jjStartNfaWithStates_0(6, 19, 28); + } return jjMoveStringLiteralDfa7_0(active0, 0x40000000000L); case 117: return jjMoveStringLiteralDfa7_0(active0, 0x40000L); case 121: - if ((active0 & 0x4000000L) != 0L) + if ((active0 & 0x4000000L) != 0L) { return jjStartNfaWithStates_0(6, 26, 28); + } break; default : break; @@ -711,8 +758,9 @@ private final int jjMoveStringLiteralDfa6_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); + } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(6, active0, 0L); @@ -723,16 +771,18 @@ private final int jjMoveStringLiteralDfa7_0(long old0, long active0) case 99: return jjMoveStringLiteralDfa8_0(active0, 0x800000000L); case 101: - if ((active0 & 0x40000L) != 0L) + if ((active0 & 0x40000L) != 0L) { return jjStartNfaWithStates_0(7, 18, 28); - else if ((active0 & 0x200000000000000L) != 0L) + } else if ((active0 & 0x200000000000000L) != 0L) { return jjStartNfaWithStates_0(7, 57, 28); + } return jjMoveStringLiteralDfa8_0(active0, 0x40200000000L); case 110: return jjMoveStringLiteralDfa8_0(active0, 0x22000080000000L); case 116: - if ((active0 & 0x200L) != 0L) + if ((active0 & 0x200L) != 0L) { return jjStartNfaWithStates_0(7, 9, 28); + } break; default : break; @@ -741,8 +791,9 @@ private final int jjMoveStringLiteralDfa7_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); + } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(7, active0, 0L); @@ -751,20 +802,23 @@ private final int jjMoveStringLiteralDfa8_0(long old0, long active0) switch(curChar) { case 100: - if ((active0 & 0x40000000000L) != 0L) + if ((active0 & 0x40000000000L) != 0L) { return jjStartNfaWithStates_0(8, 42, 28); + } break; case 101: - if ((active0 & 0x800000000L) != 0L) + if ((active0 & 0x800000000L) != 0L) { return jjStartNfaWithStates_0(8, 35, 28); + } break; case 105: return jjMoveStringLiteralDfa9_0(active0, 0x2000000000000L); case 111: return jjMoveStringLiteralDfa9_0(active0, 0x200000000L); case 116: - if ((active0 & 0x20000000000000L) != 0L) + if ((active0 & 0x20000000000000L) != 0L) { return jjStartNfaWithStates_0(8, 53, 28); + } return jjMoveStringLiteralDfa9_0(active0, 0x80000000L); default : break; @@ -773,8 +827,9 @@ private final int jjMoveStringLiteralDfa8_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); + } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(8, active0, 0L); @@ -783,12 +838,14 @@ private final int jjMoveStringLiteralDfa9_0(long old0, long active0) switch(curChar) { case 102: - if ((active0 & 0x200000000L) != 0L) + if ((active0 & 0x200000000L) != 0L) { return jjStartNfaWithStates_0(9, 33, 28); + } break; case 115: - if ((active0 & 0x80000000L) != 0L) + if ((active0 & 0x80000000L) != 0L) { return jjStartNfaWithStates_0(9, 31, 28); + } break; case 122: return jjMoveStringLiteralDfa10_0(active0, 0x2000000000000L); @@ -799,8 +856,9 @@ private final int jjMoveStringLiteralDfa9_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); + } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(9, active0, 0L); @@ -817,8 +875,9 @@ private final int jjMoveStringLiteralDfa10_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); + } try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(10, active0, 0L); @@ -827,8 +886,9 @@ private final int jjMoveStringLiteralDfa11_0(long old0, long active0) switch(curChar) { case 100: - if ((active0 & 0x2000000000000L) != 0L) + if ((active0 & 0x2000000000000L) != 0L) { return jjStartNfaWithStates_0(11, 49, 28); + } break; default : break; @@ -891,320 +951,395 @@ static final long[] jjbitVec8 = { }; private final int jjMoveNfa_0(int startState, int curPos) { - int[] nextStates; int startsAt = 0; jjnewStateCnt = 67; int i = 1; jjstateSet[0] = startState; - int j, kind = 0x7fffffff; + int kind = 0x7fffffff; for (;;) { - if (++jjround == 0x7fffffff) + if (++jjround == 0x7fffffff) { ReInitRounds(); + } if (curChar < 64) { long l = 1L << curChar; - MatchLoop: do + //MatchLoop + do { switch(jjstateSet[--i]) { case 0: - if ((0x3ff000000000000L & l) != 0L) + if ((0x3ff000000000000L & l) != 0L) { jjCheckNAddStates(0, 6); - else if (curChar == 47) + } else if (curChar == 47) { jjAddStates(7, 9); - else if (curChar == 36) + } else if (curChar == 36) { - if (kind > 67) + if (kind > 67) { kind = 67; + } jjCheckNAdd(28); } - else if (curChar == 34) + else if (curChar == 34) { jjCheckNAddStates(10, 12); - else if (curChar == 39) + } else if (curChar == 39) { jjAddStates(13, 14); - else if (curChar == 46) + } else if (curChar == 46) { jjCheckNAdd(4); + } if ((0x3fe000000000000L & l) != 0L) { - if (kind > 59) + if (kind > 59) { kind = 59; + } jjCheckNAddTwoStates(1, 2); } else if (curChar == 48) { - if (kind > 59) + if (kind > 59) { kind = 59; + } jjCheckNAddStates(15, 17); } break; case 49: - if (curChar == 42) + if (curChar == 42) { jjCheckNAddTwoStates(62, 63); - else if (curChar == 47) + } else if (curChar == 47) { jjCheckNAddStates(18, 20); - if (curChar == 42) + } + if (curChar == 42) { jjstateSet[jjnewStateCnt++] = 54; + } break; case 1: - if ((0x3ff000000000000L & l) == 0L) + if ((0x3ff000000000000L & l) == 0L) { break; - if (kind > 59) + } + if (kind > 59) { kind = 59; + } jjCheckNAddTwoStates(1, 2); break; case 3: - if (curChar == 46) + if (curChar == 46) { jjCheckNAdd(4); + } break; case 4: - if ((0x3ff000000000000L & l) == 0L) + if ((0x3ff000000000000L & l) == 0L) { break; - if (kind > 63) + } + if (kind > 63) { kind = 63; + } jjCheckNAddStates(21, 23); break; case 6: - if ((0x280000000000L & l) != 0L) + if ((0x280000000000L & l) != 0L) { jjCheckNAdd(7); + } break; case 7: - if ((0x3ff000000000000L & l) == 0L) + if ((0x3ff000000000000L & l) == 0L) { break; - if (kind > 63) + } + if (kind > 63) { kind = 63; + } jjCheckNAddTwoStates(7, 8); break; case 9: - if (curChar == 39) + if (curChar == 39) { jjAddStates(13, 14); + } break; case 10: - if ((0xffffff7fffffdbffL & l) != 0L) + if ((0xffffff7fffffdbffL & l) != 0L) { jjCheckNAdd(11); + } break; case 11: - if (curChar == 39 && kind > 65) + if (curChar == 39 && kind > 65) { kind = 65; + } break; case 13: - if ((0x8400000000L & l) != 0L) + if ((0x8400000000L & l) != 0L) { jjCheckNAdd(11); + } break; case 14: - if ((0xff000000000000L & l) != 0L) + if ((0xff000000000000L & l) != 0L) { jjCheckNAddTwoStates(15, 11); + } break; case 15: - if ((0xff000000000000L & l) != 0L) + if ((0xff000000000000L & l) != 0L) { jjCheckNAdd(11); + } break; case 16: - if ((0xf000000000000L & l) != 0L) + if ((0xf000000000000L & l) != 0L) { jjstateSet[jjnewStateCnt++] = 17; + } break; case 17: - if ((0xff000000000000L & l) != 0L) + if ((0xff000000000000L & l) != 0L) { jjCheckNAdd(15); + } break; case 18: - if (curChar == 34) + if (curChar == 34) { jjCheckNAddStates(10, 12); + } break; case 19: - if ((0xfffffffbffffdbffL & l) != 0L) + if ((0xfffffffbffffdbffL & l) != 0L) { jjCheckNAddStates(10, 12); + } break; case 21: - if ((0x8400000000L & l) != 0L) + if ((0x8400000000L & l) != 0L) { jjCheckNAddStates(10, 12); + } break; case 22: - if (curChar == 34 && kind > 66) + if (curChar == 34 && kind > 66) { kind = 66; + } break; case 23: - if ((0xff000000000000L & l) != 0L) + if ((0xff000000000000L & l) != 0L) { jjCheckNAddStates(24, 27); + } break; case 24: - if ((0xff000000000000L & l) != 0L) + if ((0xff000000000000L & l) != 0L) { jjCheckNAddStates(10, 12); + } break; case 25: - if ((0xf000000000000L & l) != 0L) + if ((0xf000000000000L & l) != 0L) { jjstateSet[jjnewStateCnt++] = 26; + } break; case 26: - if ((0xff000000000000L & l) != 0L) + if ((0xff000000000000L & l) != 0L) { jjCheckNAdd(24); + } break; case 27: - if (curChar != 36) + if (curChar != 36) { break; - if (kind > 67) + } + if (kind > 67) { kind = 67; + } jjCheckNAdd(28); break; case 28: - if ((0x3ff001000000000L & l) == 0L) + if ((0x3ff001000000000L & l) == 0L) { break; - if (kind > 67) + } + if (kind > 67) { kind = 67; + } jjCheckNAdd(28); break; case 29: - if ((0x3ff000000000000L & l) != 0L) + if ((0x3ff000000000000L & l) != 0L) { jjCheckNAddStates(0, 6); + } break; case 30: - if ((0x3ff000000000000L & l) != 0L) + if ((0x3ff000000000000L & l) != 0L) { jjCheckNAddTwoStates(30, 31); + } break; case 31: - if (curChar != 46) + if (curChar != 46) { break; - if (kind > 63) + } + if (kind > 63) { kind = 63; + } jjCheckNAddStates(28, 30); break; case 32: - if ((0x3ff000000000000L & l) == 0L) + if ((0x3ff000000000000L & l) == 0L) { break; - if (kind > 63) + } + if (kind > 63) { kind = 63; + } jjCheckNAddStates(28, 30); break; case 34: - if ((0x280000000000L & l) != 0L) + if ((0x280000000000L & l) != 0L) { jjCheckNAdd(35); + } break; case 35: - if ((0x3ff000000000000L & l) == 0L) + if ((0x3ff000000000000L & l) == 0L) { break; - if (kind > 63) + } + if (kind > 63) { kind = 63; + } jjCheckNAddTwoStates(35, 8); break; case 36: - if ((0x3ff000000000000L & l) != 0L) + if ((0x3ff000000000000L & l) != 0L) { jjCheckNAddTwoStates(36, 37); + } break; case 38: - if ((0x280000000000L & l) != 0L) + if ((0x280000000000L & l) != 0L) { jjCheckNAdd(39); + } break; case 39: - if ((0x3ff000000000000L & l) == 0L) + if ((0x3ff000000000000L & l) == 0L) { break; - if (kind > 63) + } + if (kind > 63) { kind = 63; + } jjCheckNAddTwoStates(39, 8); break; case 40: - if ((0x3ff000000000000L & l) != 0L) + if ((0x3ff000000000000L & l) != 0L) { jjCheckNAddStates(31, 33); + } break; case 42: - if ((0x280000000000L & l) != 0L) + if ((0x280000000000L & l) != 0L) { jjCheckNAdd(43); + } break; case 43: - if ((0x3ff000000000000L & l) != 0L) + if ((0x3ff000000000000L & l) != 0L) { jjCheckNAddTwoStates(43, 8); + } break; case 44: - if (curChar != 48) + if (curChar != 48) { break; - if (kind > 59) + } + if (kind > 59) { kind = 59; + } jjCheckNAddStates(15, 17); break; case 46: - if ((0x3ff000000000000L & l) == 0L) + if ((0x3ff000000000000L & l) == 0L) { break; - if (kind > 59) + } + if (kind > 59) { kind = 59; + } jjCheckNAddTwoStates(46, 2); break; case 47: - if ((0xff000000000000L & l) == 0L) + if ((0xff000000000000L & l) == 0L) { break; - if (kind > 59) + } + if (kind > 59) { kind = 59; + } jjCheckNAddTwoStates(47, 2); break; case 48: - if (curChar == 47) + if (curChar == 47) { jjAddStates(7, 9); + } break; case 50: - if ((0xffffffffffffdbffL & l) != 0L) + if ((0xffffffffffffdbffL & l) != 0L) { jjCheckNAddStates(18, 20); + } break; case 51: - if ((0x2400L & l) != 0L && kind > 6) + if ((0x2400L & l) != 0L && kind > 6) { kind = 6; + } break; case 52: - if (curChar == 10 && kind > 6) + if (curChar == 10 && kind > 6) { kind = 6; + } break; case 53: - if (curChar == 13) + if (curChar == 13) { jjstateSet[jjnewStateCnt++] = 52; + } break; case 54: - if (curChar == 42) + if (curChar == 42) { jjCheckNAddTwoStates(55, 56); + } break; case 55: - if ((0xfffffbffffffffffL & l) != 0L) + if ((0xfffffbffffffffffL & l) != 0L) { jjCheckNAddTwoStates(55, 56); + } break; case 56: - if (curChar == 42) + if (curChar == 42) { jjCheckNAddStates(34, 36); + } break; case 57: - if ((0xffff7bffffffffffL & l) != 0L) + if ((0xffff7bffffffffffL & l) != 0L) { jjCheckNAddTwoStates(58, 56); + } break; case 58: - if ((0xfffffbffffffffffL & l) != 0L) + if ((0xfffffbffffffffffL & l) != 0L) { jjCheckNAddTwoStates(58, 56); + } break; case 59: - if (curChar == 47 && kind > 7) + if (curChar == 47 && kind > 7) { kind = 7; + } break; case 60: - if (curChar == 42) + if (curChar == 42) { jjstateSet[jjnewStateCnt++] = 54; + } break; case 61: - if (curChar == 42) + if (curChar == 42) { jjCheckNAddTwoStates(62, 63); + } break; case 62: - if ((0xfffffbffffffffffL & l) != 0L) + if ((0xfffffbffffffffffL & l) != 0L) { jjCheckNAddTwoStates(62, 63); + } break; case 63: - if (curChar == 42) + if (curChar == 42) { jjCheckNAddStates(37, 39); + } break; case 64: - if ((0xffff7bffffffffffL & l) != 0L) + if ((0xffff7bffffffffffL & l) != 0L) { jjCheckNAddTwoStates(65, 63); + } break; case 65: - if ((0xfffffbffffffffffL & l) != 0L) + if ((0xfffffbffffffffffL & l) != 0L) { jjCheckNAddTwoStates(65, 63); + } break; case 66: - if (curChar == 47 && kind > 8) + if (curChar == 47 && kind > 8) { kind = 8; + } break; default : break; } @@ -1213,75 +1348,93 @@ private final int jjMoveNfa_0(int startState, int curPos) else if (curChar < 128) { long l = 1L << (curChar & 077); - MatchLoop: do + //MatchLoop + do { switch(jjstateSet[--i]) { case 0: case 28: - if ((0x7fffffe87fffffeL & l) == 0L) + if ((0x7fffffe87fffffeL & l) == 0L) { break; - if (kind > 67) + } + if (kind > 67) { kind = 67; + } jjCheckNAdd(28); break; case 2: - if ((0x100000001000L & l) != 0L && kind > 59) + if ((0x100000001000L & l) != 0L && kind > 59) { kind = 59; + } break; case 5: - if ((0x2000000020L & l) != 0L) + if ((0x2000000020L & l) != 0L) { jjAddStates(40, 41); + } break; case 8: - if ((0x5000000050L & l) != 0L && kind > 63) + if ((0x5000000050L & l) != 0L && kind > 63) { kind = 63; + } break; case 10: - if ((0xffffffffefffffffL & l) != 0L) + if ((0xffffffffefffffffL & l) != 0L) { jjCheckNAdd(11); + } break; case 12: - if (curChar == 92) + if (curChar == 92) { jjAddStates(42, 44); + } break; case 13: - if ((0x14404410000000L & l) != 0L) + if ((0x14404410000000L & l) != 0L) { jjCheckNAdd(11); + } break; case 19: - if ((0xffffffffefffffffL & l) != 0L) + if ((0xffffffffefffffffL & l) != 0L) { jjCheckNAddStates(10, 12); + } break; case 20: - if (curChar == 92) + if (curChar == 92) { jjAddStates(45, 47); + } break; case 21: - if ((0x14404410000000L & l) != 0L) + if ((0x14404410000000L & l) != 0L) { jjCheckNAddStates(10, 12); + } break; case 33: - if ((0x2000000020L & l) != 0L) + if ((0x2000000020L & l) != 0L) { jjAddStates(48, 49); + } break; case 37: - if ((0x2000000020L & l) != 0L) + if ((0x2000000020L & l) != 0L) { jjAddStates(50, 51); + } break; case 41: - if ((0x2000000020L & l) != 0L) + if ((0x2000000020L & l) != 0L) { jjAddStates(52, 53); + } break; case 45: - if ((0x100000001000000L & l) != 0L) + if ((0x100000001000000L & l) != 0L) { jjCheckNAdd(46); + } break; case 46: - if ((0x7e0000007eL & l) == 0L) + if ((0x7e0000007eL & l) == 0L) { break; - if (kind > 59) + } + if (kind > 59) { kind = 59; + } jjCheckNAddTwoStates(46, 2); break; case 50: @@ -1312,47 +1465,57 @@ private final int jjMoveNfa_0(int startState, int curPos) long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; long l2 = 1L << (curChar & 077); - MatchLoop: do + //MatchLoop + do { switch(jjstateSet[--i]) { case 0: case 28: - if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) + if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) { break; - if (kind > 67) + } + if (kind > 67) { kind = 67; + } jjCheckNAdd(28); break; case 10: - if (jjCanMove_0(hiByte, i1, i2, l1, l2)) + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) { jjstateSet[jjnewStateCnt++] = 11; + } break; case 19: - if (jjCanMove_0(hiByte, i1, i2, l1, l2)) + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) { jjAddStates(10, 12); + } break; case 50: - if (jjCanMove_0(hiByte, i1, i2, l1, l2)) + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) { jjAddStates(18, 20); + } break; case 55: - if (jjCanMove_0(hiByte, i1, i2, l1, l2)) + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) { jjCheckNAddTwoStates(55, 56); + } break; case 57: case 58: - if (jjCanMove_0(hiByte, i1, i2, l1, l2)) + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) { jjCheckNAddTwoStates(58, 56); + } break; case 62: - if (jjCanMove_0(hiByte, i1, i2, l1, l2)) + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) { jjCheckNAddTwoStates(62, 63); + } break; case 64: case 65: - if (jjCanMove_0(hiByte, i1, i2, l1, l2)) + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) { jjCheckNAddTwoStates(65, 63); + } break; default : break; } @@ -1365,8 +1528,9 @@ private final int jjMoveNfa_0(int startState, int curPos) kind = 0x7fffffff; } ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 67 - (jjnewStateCnt = startsAt))) + if ((i = jjnewStateCnt) == (startsAt = 67 - (jjnewStateCnt = startsAt))) { return curPos; + } try { curChar = input_stream.readChar(); } 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 case 0: return ((jjbitVec2[i2] & l2) != 0L); default : - if ((jjbitVec0[i1] & l1) != 0L) + if ((jjbitVec0[i1] & l1) != 0L) { return true; + } return false; } } @@ -1404,8 +1569,9 @@ private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, lo case 61: return ((jjbitVec8[i2] & l2) != 0L); default : - if ((jjbitVec3[i1] & l1) != 0L) + if ((jjbitVec3[i1] & l1) != 0L) { return true; + } return false; } } @@ -1449,8 +1615,9 @@ private final int[] jjstateSet = new int[134]; protected char curChar; 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."); + } input_stream = stream; } public ExpressionParserTokenManager(ASCII_UCodeESC_CharStream stream, int lexState) @@ -1469,9 +1636,10 @@ private final void ReInitRounds() { int i; jjround = 0x80000001; - for (i = 67; i-- > 0;) + for (i = 67; i-- > 0;) { jjrounds[i] = 0x80000000; } +} public void ReInit(ASCII_UCodeESC_CharStream stream, int lexState) { ReInit(stream); @@ -1479,11 +1647,12 @@ public void ReInit(ASCII_UCodeESC_CharStream stream, 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); - else + } else { curLexState = lexState; } +} private final Token jjFillToken() { @@ -1507,7 +1676,6 @@ int jjmatchedKind; public final Token getNextToken() { - int kind; Token specialToken = null; Token matchedToken; int curPos = 0; @@ -1528,17 +1696,19 @@ public final Token getNextToken() } try { - while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L) + while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L) { curChar = input_stream.BeginToken(); } + } catch (java.io.IOException e1) { continue EOFLoop; } jjmatchedKind = 0x7fffffff; jjmatchedPos = 0; curPos = jjMoveStringLiteralDfa0_0(); if (jjmatchedKind != 0x7fffffff) { - if (jjmatchedPos + 1 < curPos) + if (jjmatchedPos + 1 < curPos) { input_stream.backup(curPos - jjmatchedPos - 1); + } if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); @@ -1550,9 +1720,9 @@ public final Token getNextToken() if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) { matchedToken = jjFillToken(); - if (specialToken == null) + if (specialToken == null) { specialToken = matchedToken; - else + } else { matchedToken.specialToken = specialToken; specialToken = (specialToken.next = matchedToken); @@ -1572,9 +1742,9 @@ public final Token getNextToken() if (curChar == '\n' || curChar == '\r') { error_line++; error_column = 0; - } - else + } else { error_column++; + } } if (!EOFSeen) { input_stream.backup(1); diff --git a/src/share/classes/com/sun/tools/example/debug/expr/LValue.java b/src/share/classes/com/sun/tools/example/debug/expr/LValue.java index 5dd8cf43d106036a2db180d20d91aafd9b8fe1eb..42ef2963e0b2e8cbe371504a1da3a71806a65721 100644 --- a/src/share/classes/com/sun/tools/example/debug/expr/LValue.java +++ b/src/share/classes/com/sun/tools/example/debug/expr/LValue.java @@ -156,6 +156,7 @@ abstract class LValue { return new LValueArrayElement(interiorGetValue(), index); } + @Override public String toString() { try { return interiorGetValue().toString(); @@ -419,6 +420,7 @@ abstract class LValue { this.var = var; } + @Override Value getValue() { if (jdiValue == null) { jdiValue = frame.getValue(var); @@ -426,12 +428,14 @@ abstract class LValue { return jdiValue; } + @Override void setValue0(Value val) throws InvalidTypeException, ClassNotLoadedException { frame.setValue(var, val); jdiValue = val; } + @Override void invokeWith(List arguments) throws ParseException { throw new ParseException(var.name() + " is not a method"); } @@ -469,6 +473,7 @@ abstract class LValue { } } + @Override Value getValue() throws InvocationException, InvalidTypeException, ClassNotLoadedException, IncompatibleThreadStateException, ParseException { @@ -485,6 +490,7 @@ abstract class LValue { } } + @Override void setValue0(Value val) throws ParseException, InvalidTypeException, ClassNotLoadedException { @@ -495,6 +501,7 @@ abstract class LValue { jdiValue = val; } + @Override void invokeWith(List arguments) throws ParseException { if (matchingMethod != null) { throw new ParseException("Invalid consecutive invocations"); @@ -531,6 +538,7 @@ abstract class LValue { } } + @Override Value getValue() throws InvocationException, InvalidTypeException, ClassNotLoadedException, IncompatibleThreadStateException, ParseException { @@ -548,6 +556,7 @@ abstract class LValue { } } + @Override void setValue0(Value val) throws ParseException, InvalidTypeException, ClassNotLoadedException { @@ -562,6 +571,7 @@ abstract class LValue { jdiValue = val; } + @Override void invokeWith(List arguments) throws ParseException { if (matchingMethod != null) { throw new ParseException("Invalid consecutive invocations"); @@ -589,6 +599,7 @@ abstract class LValue { this.arrayRef = value; } + @Override Value getValue() { if (jdiValue == null) { jdiValue = arrayRef.virtualMachine().mirrorOf(arrayRef.length()); @@ -596,10 +607,12 @@ abstract class LValue { return jdiValue; } + @Override void setValue0(Value value) throws ParseException { throw new ParseException("Cannot set constant: " + value); } + @Override void invokeWith(List arguments) throws ParseException { throw new ParseException("Array element is not a method"); } @@ -618,6 +631,7 @@ abstract class LValue { this.index = index; } + @Override Value getValue() { if (jdiValue == null) { jdiValue = array.getValue(index); @@ -625,12 +639,14 @@ abstract class LValue { return jdiValue; } + @Override void setValue0(Value val) throws InvalidTypeException, ClassNotLoadedException { array.setValue(index, val); jdiValue = val; } + @Override void invokeWith(List arguments) throws ParseException { throw new ParseException("Array element is not a method"); } @@ -643,6 +659,7 @@ abstract class LValue { this.value = value; } + @Override Value getValue() { if (jdiValue == null) { jdiValue = value; @@ -650,10 +667,12 @@ abstract class LValue { return jdiValue; } + @Override void setValue0(Value val) throws ParseException { throw new ParseException("Cannot set constant: " + value); } + @Override void invokeWith(List arguments) throws ParseException { throw new ParseException("Constant is not a method"); } diff --git a/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java b/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java index bf615935604775e6a821c9803001bd670c284774..8ee53728f028a1baf60b576250d53d1ce26988c0 100644 --- a/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java +++ b/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java @@ -37,6 +37,8 @@ package com.sun.tools.example.debug.expr; */ public class ParseException extends Exception { + private static final long serialVersionUID = 7978489144303647901L; + /** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates @@ -119,20 +121,21 @@ public class ParseException extends Exception { * of the final stack trace, and hence the correct error message * gets displayed. */ + @Override public String getMessage() { if (!specialConstructor) { return super.getMessage(); } String expected = ""; int maxSize = 0; - for (int i = 0; i < expectedTokenSequences.length; i++) { - if (maxSize < expectedTokenSequences[i].length) { - maxSize = expectedTokenSequences[i].length; + for (int[] expectedTokenSequence : expectedTokenSequences) { + if (maxSize < expectedTokenSequence.length) { + maxSize = expectedTokenSequence.length; } - for (int j = 0; j < expectedTokenSequences[i].length; j++) { - expected += tokenImage[expectedTokenSequences[i][j]] + " "; + for (int j = 0; j < expectedTokenSequence.length; j++) { + expected += tokenImage[expectedTokenSequence[j]] + " "; } - if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { + if (expectedTokenSequence[expectedTokenSequence.length - 1] != 0) { expected += "..."; } expected += eol + " "; @@ -140,7 +143,9 @@ public class ParseException extends Exception { String retval = "Encountered \""; Token tok = currentToken.next; for (int i = 0; i < maxSize; i++) { - if (i != 0) retval += " "; + if (i != 0) { + retval += " "; + } if (tok.kind == 0) { retval += tokenImage[0]; break; diff --git a/src/share/classes/com/sun/tools/example/debug/expr/Token.java b/src/share/classes/com/sun/tools/example/debug/expr/Token.java index ea0a9ef33d728f05120b94005aee184f361065b6..534120014f30ff10097003cc56c1c94bda78fff7 100644 --- a/src/share/classes/com/sun/tools/example/debug/expr/Token.java +++ b/src/share/classes/com/sun/tools/example/debug/expr/Token.java @@ -78,6 +78,7 @@ public class Token { /** * Returns the image. */ + @Override public final String toString() { return image; diff --git a/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java b/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java index 2f4365018feda8c80d8e0de198b3b8a8941be6be..16a40df286e38c035a0c9b63ef3c5b357c3b0f17 100644 --- a/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java +++ b/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java @@ -32,6 +32,8 @@ public class TokenMgrError extends Error * Ordinals for various reasons why an Error of this type can be thrown. */ + private static final long serialVersionUID = -6236440836177601522L; + /** * Lexical error occured. */ @@ -136,6 +138,7 @@ public class TokenMgrError extends Error * * from this method for such cases in the release version of your parser. */ + @Override public String getMessage() { return super.getMessage(); } diff --git a/src/share/classes/com/sun/tools/example/debug/gui/ApplicationTool.java b/src/share/classes/com/sun/tools/example/debug/gui/ApplicationTool.java index 8eee7c76418f3731874bd9ad345cf95e79f07ffc..e9a4c0b7808ecf57063c00667dee7f6b898d0714 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/ApplicationTool.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/ApplicationTool.java @@ -29,12 +29,12 @@ import javax.swing.*; import java.awt.*; import java.awt.event.*; -import com.sun.jdi.*; import com.sun.tools.example.debug.bdi.*; public class ApplicationTool extends JPanel { - private Environment env; + private static final long serialVersionUID = 310966063293205714L; + private ExecutionManager runtime; private TypeScript script; @@ -45,13 +45,13 @@ public class ApplicationTool extends JPanel { super(new BorderLayout()); - this.env = env; this.runtime = env.getExecutionManager(); this.script = new TypeScript(PROMPT, false); // No implicit echo. this.add(script); script.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { runtime.sendLineToApplication(script.readln()); } diff --git a/src/share/classes/com/sun/tools/example/debug/gui/ClassTreeTool.java b/src/share/classes/com/sun/tools/example/debug/gui/ClassTreeTool.java index abfc86a810b0db22df8ec686c9cb16e402ccb305..945243458bf5ec831de25aa1577334fb215c7093 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/ClassTreeTool.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/ClassTreeTool.java @@ -25,12 +25,10 @@ package com.sun.tools.example.debug.gui; -import java.io.*; import java.util.*; import javax.swing.*; import javax.swing.tree.*; -import javax.swing.event.*; import java.awt.*; import java.awt.event.*; @@ -40,6 +38,8 @@ import com.sun.tools.example.debug.bdi.*; public class ClassTreeTool extends JPanel { + private static final long serialVersionUID = 526178912591739259L; + private Environment env; private ExecutionManager runtime; @@ -49,7 +49,7 @@ public class ClassTreeTool extends JPanel { private JTree tree; private DefaultTreeModel treeModel; private ClassTreeNode root; - private SearchPath sourcePath; +// private SearchPath sourcePath; private CommandInterpreter interpreter; @@ -87,6 +87,7 @@ public class ClassTreeTool extends JPanel { ******/ MouseListener ml = new MouseAdapter() { + @Override public void mouseClicked(MouseEvent e) { int selRow = tree.getRowForLocation(e.getX(), e.getY()); TreePath selPath = tree.getPathForLocation(e.getX(), e.getY()); @@ -121,6 +122,7 @@ public class ClassTreeTool extends JPanel { // SessionListener + @Override public void sessionStart(EventObject e) { // Get system classes and any others loaded before attaching. try { @@ -134,19 +136,24 @@ public class ClassTreeTool extends JPanel { } } + @Override public void sessionInterrupt(EventObject e) {} + @Override public void sessionContinue(EventObject e) {} // JDIListener + @Override public void classPrepare(ClassPrepareEventSet e) { root.addClass(e.getReferenceType()); } + @Override public void classUnload(ClassUnloadEventSet e) { root.removeClass(e.getClassName()); } + @Override public void vmDisconnect(VMDisconnectEventSet e) { // Clear contents of this view. root = createClassTree(HEADING); @@ -169,6 +176,7 @@ public class ClassTreeTool extends JPanel { this.refTy = refTy; } + @Override public String toString() { return name; } @@ -185,6 +193,7 @@ public class ClassTreeTool extends JPanel { return (refTy == null); } + @Override public boolean isLeaf() { return !isPackage(); } diff --git a/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java b/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java index 1ff8163b6832670335d4c7dff332012fe115fd73..97ab320bf8be18a516447928778e63e8f8c35371 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java @@ -29,8 +29,6 @@ import java.io.*; import java.util.*; import com.sun.jdi.*; -import com.sun.jdi.request.*; - import com.sun.tools.example.debug.bdi.*; public class CommandInterpreter { @@ -93,9 +91,9 @@ public class CommandInterpreter { try { ThreadReference[] threads = threads(); long threadID = Long.parseLong(id, 16); - for (int i = 0; i < threads.length; i++) { - if (threads[i].uniqueID() == threadID) { - thread = threads[i]; + for (ThreadReference thread2 : threads) { + if (thread2.uniqueID() == threadID) { + thread = thread2; break; } } @@ -239,16 +237,18 @@ public class CommandInterpreter { for (int i = 0 ; i < tlist.size() ; i++) { ThreadReference thr = tlist.get(i); int len = Utils.description(thr).length(); - if (len > maxId) + if (len > maxId) { maxId = len; + } String name = thr.name(); int iDot = name.lastIndexOf('.'); if (iDot >= 0 && name.length() > iDot) { name = name.substring(iDot + 1); } - if (name.length() > maxName) + if (name.length() > maxName) { maxName = name.length(); } + } String maxNumString = String.valueOf(iThread + tlist.size()); int maxNumDigits = maxNumString.length(); for (int i = 0 ; i < tlist.size() ; i++) { @@ -616,7 +616,6 @@ public class CommandInterpreter { int cnt = 1; if (t.hasMoreTokens()) { String idToken = t.nextToken(); - int n; try { cnt = Integer.valueOf(idToken).intValue(); } catch (NumberFormatException e) { @@ -885,7 +884,6 @@ public class CommandInterpreter { } private void commandStop(StringTokenizer t) throws NoSessionException { - Location bploc; String token; if (!t.hasMoreTokens()) { diff --git a/src/share/classes/com/sun/tools/example/debug/gui/CommandTool.java b/src/share/classes/com/sun/tools/example/debug/gui/CommandTool.java index 1f47adfcf97968815b6237e7a7c9c82ed10b1a80..42157e4423edca9f0b7f69c078e5b6ba8377983a 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/CommandTool.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/CommandTool.java @@ -40,6 +40,8 @@ import com.sun.tools.example.debug.event.*; public class CommandTool extends JPanel { + private static final long serialVersionUID = 8613516856378346415L; + private Environment env; private ContextManager context; @@ -68,6 +70,7 @@ public class CommandTool extends JPanel { // Establish handler for incoming commands. script.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { interpreter.executeCommand(script.readln()); } @@ -107,15 +110,17 @@ public class CommandTool extends JPanel { // JDIListener + @Override public void accessWatchpoint(AccessWatchpointEventSet e) { setThread(e); for (EventIterator it = e.eventIterator(); it.hasNext(); ) { - Event evt = it.nextEvent(); + it.nextEvent(); diagnostics.putString("Watchpoint hit: " + locationString(e)); } } + @Override public void classPrepare(ClassPrepareEventSet e) { if (context.getVerboseFlag()) { String name = e.getReferenceType().name(); @@ -123,6 +128,7 @@ public class CommandTool extends JPanel { } } + @Override public void classUnload(ClassUnloadEventSet e) { if (context.getVerboseFlag()) { diagnostics.putString("Class " + e.getClassName() + @@ -130,12 +136,14 @@ public class CommandTool extends JPanel { } } + @Override public void exception(ExceptionEventSet e) { setThread(e); String name = e.getException().referenceType().name(); diagnostics.putString("Exception: " + name); } + @Override public void locationTrigger(LocationTriggerEventSet e) { String locString = locationString(e); setThread(e); @@ -155,15 +163,17 @@ public class CommandTool extends JPanel { } } + @Override public void modificationWatchpoint(ModificationWatchpointEventSet e) { setThread(e); for (EventIterator it = e.eventIterator(); it.hasNext(); ) { - Event evt = it.nextEvent(); + it.nextEvent(); diagnostics.putString("Watchpoint hit: " + locationString(e)); } } + @Override public void threadDeath(ThreadDeathEventSet e) { if (context.getVerboseFlag()) { diagnostics.putString("Thread " + e.getThread() + @@ -171,6 +181,7 @@ public class CommandTool extends JPanel { } } + @Override public void threadStart(ThreadStartEventSet e) { if (context.getVerboseFlag()) { diagnostics.putString("Thread " + e.getThread() + @@ -178,16 +189,19 @@ public class CommandTool extends JPanel { } } + @Override public void vmDeath(VMDeathEventSet e) { script.setPrompt(DEFAULT_CMD_PROMPT); diagnostics.putString("VM exited"); } + @Override public void vmDisconnect(VMDisconnectEventSet e) { script.setPrompt(DEFAULT_CMD_PROMPT); diagnostics.putString("Disconnected from VM"); } + @Override public void vmStart(VMStartEventSet e) { script.setPrompt(DEFAULT_CMD_PROMPT); diagnostics.putString("VM started"); @@ -195,14 +209,17 @@ public class CommandTool extends JPanel { // SessionListener + @Override public void sessionStart(EventObject e) {} + @Override public void sessionInterrupt(EventObject e) { Thread.yield(); // fetch output diagnostics.putString("VM interrupted by user."); script.setPrompt(DEFAULT_CMD_PROMPT); } + @Override public void sessionContinue(EventObject e) { diagnostics.putString("Execution resumed."); script.setPrompt(DEFAULT_CMD_PROMPT); @@ -210,23 +227,28 @@ public class CommandTool extends JPanel { // SpecListener + @Override public void breakpointSet(SpecEvent e) { EventRequestSpec spec = e.getEventRequestSpec(); diagnostics.putString("Breakpoint set at " + spec + "."); } + @Override public void breakpointDeferred(SpecEvent e) { EventRequestSpec spec = e.getEventRequestSpec(); diagnostics.putString("Breakpoint will be set at " + spec + " when its class is loaded."); } + @Override public void breakpointDeleted(SpecEvent e) { EventRequestSpec spec = e.getEventRequestSpec(); diagnostics.putString("Breakpoint at " + spec.toString() + " deleted."); } + @Override public void breakpointResolved(SpecEvent e) { EventRequestSpec spec = e.getEventRequestSpec(); diagnostics.putString("Breakpoint resolved to " + spec.toString() + "."); } + @Override public void breakpointError(SpecErrorEvent e) { EventRequestSpec spec = e.getEventRequestSpec(); diagnostics.putString("Deferred breakpoint at " + @@ -236,25 +258,35 @@ public class CommandTool extends JPanel { //### Add info for watchpoints and exceptions + @Override public void watchpointSet(SpecEvent e) { } + @Override public void watchpointDeferred(SpecEvent e) { } + @Override public void watchpointDeleted(SpecEvent e) { } + @Override public void watchpointResolved(SpecEvent e) { } + @Override public void watchpointError(SpecErrorEvent e) { } + @Override public void exceptionInterceptSet(SpecEvent e) { } + @Override public void exceptionInterceptDeferred(SpecEvent e) { } + @Override public void exceptionInterceptDeleted(SpecEvent e) { } + @Override public void exceptionInterceptResolved(SpecEvent e) { } + @Override public void exceptionInterceptError(SpecErrorEvent e) { } @@ -263,6 +295,7 @@ public class CommandTool extends JPanel { // If the user selects a new current thread or frame, update prompt. + @Override public void currentFrameChanged(CurrentFrameChangedEvent e) { // Update prompt only if affect thread is current. ThreadReference thread = e.getThread(); diff --git a/src/share/classes/com/sun/tools/example/debug/gui/ContextManager.java b/src/share/classes/com/sun/tools/example/debug/gui/ContextManager.java index 3765cd76969d7e9e3a5e2dfa74db508564fca7bc..2ce04907ab2979807377738279ae093f66521ff8 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/ContextManager.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/ContextManager.java @@ -46,7 +46,7 @@ public class ContextManager { private boolean verbose; - private Vector contextListeners = new Vector(); + private ArrayList contextListeners = new ArrayList(); public ContextManager(Environment env) { classManager = env.getClassManager(); @@ -264,11 +264,11 @@ public class ContextManager { private void notifyCurrentFrameChanged(ThreadInfo tinfo, int index, boolean invalidate) { - Vector l = (Vector)contextListeners.clone(); + ArrayList l = new ArrayList(contextListeners); CurrentFrameChangedEvent evt = new CurrentFrameChangedEvent(this, tinfo, index, invalidate); 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 { // SessionListener + @Override public void sessionStart(EventObject e) { invalidateCurrentThread(); } + @Override public void sessionInterrupt(EventObject e) { setCurrentThreadInvalidate(currentThread); } + @Override public void sessionContinue(EventObject e) { invalidateCurrentThread(); } // JDIListener + @Override public void locationTrigger(LocationTriggerEventSet e) { setCurrentThreadInvalidate(e.getThread()); } + @Override public void exception(ExceptionEventSet e) { setCurrentThreadInvalidate(e.getThread()); } + @Override public void vmDisconnect(VMDisconnectEventSet e) { invalidateCurrentThread(); } diff --git a/src/share/classes/com/sun/tools/example/debug/gui/CurrentFrameChangedEvent.java b/src/share/classes/com/sun/tools/example/debug/gui/CurrentFrameChangedEvent.java index 5470d0b8e73da98c158f3ba0f11ca7da714382d5..00c827fd3c9f0f1b5a24604c9bef10e447ce5dfa 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/CurrentFrameChangedEvent.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/CurrentFrameChangedEvent.java @@ -31,6 +31,7 @@ import java.util.EventObject; public class CurrentFrameChangedEvent extends EventObject { + private static final long serialVersionUID = 4214479486546762179L; private ThreadInfo tinfo; private int index; private boolean invalidate; diff --git a/src/share/classes/com/sun/tools/example/debug/gui/Environment.java b/src/share/classes/com/sun/tools/example/debug/gui/Environment.java index d82c49997212257b4b4494cc325f7ba7ee4a66aa..f9884c7d53d284d9439d3fbe392bbd457b770e42 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/Environment.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/Environment.java @@ -26,8 +26,6 @@ package com.sun.tools.example.debug.gui; import java.io.*; -import java.util.*; - import com.sun.jdi.*; import com.sun.tools.example.debug.bdi.*; diff --git a/src/share/classes/com/sun/tools/example/debug/gui/GUI.java b/src/share/classes/com/sun/tools/example/debug/gui/GUI.java index 5744c5b9d0b2a59a3b0445800cce776d7670edee..1fa88bb28a907019180afdf7d3ae54cb84c64aa2 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/GUI.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/GUI.java @@ -26,8 +26,6 @@ package com.sun.tools.example.debug.gui; import java.io.*; -import java.util.*; - import javax.swing.*; import javax.swing.border.*; import java.awt.*; @@ -38,6 +36,7 @@ import com.sun.tools.example.debug.bdi.*; public class GUI extends JPanel { + private static final long serialVersionUID = 3292463234530679091L; private CommandTool cmdTool; private ApplicationTool appTool; //###HACK## @@ -87,7 +86,7 @@ public class GUI extends JPanel { threadTreeTool = new ThreadTreeTool(env); 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("Classes", null, classTreeTool); treePane.addTab("Threads", null, threadTreeTool); @@ -139,12 +138,9 @@ public class GUI extends JPanel { } public static void main(String argv[]) { - String remote = null; String clsName = ""; String progArgs = ""; String javaArgs = ""; - boolean verbose = false; //### Not implemented. - final Environment env = new Environment(); JPanel mainPanel = new GUI(env); @@ -246,13 +242,14 @@ public class GUI extends JPanel { frame.setContentPane(mainPanel); frame.addWindowListener(new WindowAdapter() { + @Override public void windowClosing(WindowEvent e) { env.terminate(); } }); frame.pack(); - frame.show(); + frame.setVisible(true); } diff --git a/src/share/classes/com/sun/tools/example/debug/gui/JDBFileFilter.java b/src/share/classes/com/sun/tools/example/debug/gui/JDBFileFilter.java index 577f8d8b1f95f5daef281b91e2cfa9cde410ef9b..3a6f107bbbc667639f2946295a3fd5c7a5641411 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/JDBFileFilter.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/JDBFileFilter.java @@ -28,7 +28,6 @@ package com.sun.tools.example.debug.gui; import java.io.File; import java.util.Hashtable; import java.util.Enumeration; -import javax.swing.*; import javax.swing.filechooser.*; //### Renamed from 'ExampleFileFilter.java' provided with Swing demos. @@ -93,8 +92,12 @@ public class JDBFileFilter extends FileFilter { */ public JDBFileFilter(String extension, String description) { this(); - if(extension!=null) addExtension(extension); - if(description!=null) setDescription(description); + if(extension!=null) { + addExtension(extension); + } + if(description!=null) { + setDescription(description); + } } /** @@ -120,11 +123,13 @@ public class JDBFileFilter extends FileFilter { */ public JDBFileFilter(String[] filters, String description) { this(); - for (int i = 0; i < filters.length; i++) { + for (String filter : filters) { // 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 { * @see #getExtension * @see FileFilter#accepts */ + @Override public boolean accept(File f) { if(f != null) { if(f.isDirectory()) { @@ -196,6 +202,7 @@ public class JDBFileFilter extends FileFilter { * @see isExtensionListInDescription * @see FileFilter#getDescription */ + @Override public String getDescription() { if(fullDescription == null) { if(description == null || isExtensionListInDescription()) { diff --git a/src/share/classes/com/sun/tools/example/debug/gui/JDBMenuBar.java b/src/share/classes/com/sun/tools/example/debug/gui/JDBMenuBar.java index ee8378386b8a436cfdec2ca2fe8c05f1c28c8ca2..c224b57c4f8a842cce6688d857de97fa4c51667a 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/JDBMenuBar.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/JDBMenuBar.java @@ -31,7 +31,6 @@ import java.awt.event.*; import java.util.Vector; import java.util.List; -import com.sun.jdi.*; import com.sun.tools.example.debug.bdi.*; //### This is currently just a placeholder! @@ -57,6 +56,7 @@ class JDBMenuBar extends JMenuBar { JMenuItem openItem = new JMenuItem("Open...", 'O'); openItem.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { openCommand(); } @@ -93,6 +93,7 @@ class JDBMenuBar extends JMenuBar { JMenuItem monitorItem = new JMenuItem("Monitor Expression...", 'M'); monitorItem.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { monitorCommand(); } @@ -101,6 +102,7 @@ class JDBMenuBar extends JMenuBar { JMenuItem unmonitorItem = new JMenuItem("Unmonitor Expression..."); unmonitorItem.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { unmonitorCommand(); } @@ -110,6 +112,7 @@ class JDBMenuBar extends JMenuBar { JMenu breakpointMenu = new JMenu("Breakpoint"); JMenuItem stopItem = new JMenuItem("Stop in...", 'S'); stopItem.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { buildBreakpoint(); } @@ -176,6 +179,7 @@ class JDBMenuBar extends JMenuBar { mi.setToolTipText(toolTip); final String cmd = command; mi.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { interpreter.executeCommand(cmd); } diff --git a/src/share/classes/com/sun/tools/example/debug/gui/JDBToolBar.java b/src/share/classes/com/sun/tools/example/debug/gui/JDBToolBar.java index f73a12d081d23c35f771153175f95bc08147ac2f..02982b9f70bec9122cd102a405242b48f8b50662 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/JDBToolBar.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/JDBToolBar.java @@ -26,10 +26,8 @@ package com.sun.tools.example.debug.gui; import javax.swing.*; -import java.awt.*; import java.awt.event.*; -import com.sun.jdi.*; import com.sun.tools.example.debug.bdi.*; class JDBToolBar extends JToolBar { @@ -92,6 +90,7 @@ class JDBToolBar extends JToolBar { button.setToolTipText(toolTip); final String cmd = command; button.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { interpreter.executeCommand(cmd); } diff --git a/src/share/classes/com/sun/tools/example/debug/gui/LaunchTool.java b/src/share/classes/com/sun/tools/example/debug/gui/LaunchTool.java index f6456a44960209baae5692b7a7e88c19ede2c920..cb1d77b22feeb65d6d51db0a2a55518f73acaf67 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/LaunchTool.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/LaunchTool.java @@ -29,18 +29,10 @@ import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; -import java.util.Iterator; - -import java.io.IOException; - import java.awt.BorderLayout; -import java.awt.Color; import java.awt.Container; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; - import javax.swing.*; import javax.swing.border.Border; import javax.swing.border.TitledBorder; @@ -98,6 +90,7 @@ class LaunchTool { comp.add(panel); } + @Override String getText() { return textField.getText(); } @@ -114,6 +107,7 @@ class LaunchTool { comp.add(panel); } + @Override String getText() { return ((Connector.BooleanArgument)arg) .stringValueOf(check.getModel().isSelected()); @@ -147,6 +141,7 @@ class LaunchTool { final boolean[] oked = {false}; JPanel buttonPanel = okCancel( dialog, new ActionListener() { + @Override public void actionPerformed(ActionEvent event) { if (radioGroup.getSelection() == null) { JOptionPane.showMessageDialog(dialog, @@ -162,7 +157,7 @@ class LaunchTool { } ); content.add(BorderLayout.SOUTH, buttonPanel); dialog.pack(); - dialog.show(); + dialog.setVisible(true); return oked[0] ? modelToConnector.get(radioGroup.getSelection()) : @@ -178,7 +173,7 @@ class LaunchTool { Container content = dialog.getContentPane(); JPanel guts = new JPanel(); Border etched = BorderFactory.createEtchedBorder(); - Border titled = BorderFactory.createTitledBorder(etched, + BorderFactory.createTitledBorder(etched, connector.description(), TitledBorder.LEFT, TitledBorder.TOP); guts.setBorder(etched); @@ -199,6 +194,7 @@ class LaunchTool { content.add(guts); JPanel buttonPanel = okCancel( dialog, new ActionListener() { + @Override public void actionPerformed(ActionEvent event) { for (ArgRep ar : argReps) { if (!ar.isSpecified()) { @@ -236,7 +232,7 @@ class LaunchTool { } ); content.add(BorderLayout.SOUTH, buttonPanel); dialog.pack(); - dialog.show(); + dialog.setVisible(true); } private JPanel okCancel(final JDialog dialog, ActionListener okListener) { @@ -247,6 +243,7 @@ class LaunchTool { buttonPanel.add(cancel); ok.addActionListener(okListener); cancel.addActionListener( new ActionListener() { + @Override public void actionPerformed(ActionEvent event) { dialog.setVisible(false); dialog.dispose(); diff --git a/src/share/classes/com/sun/tools/example/debug/gui/MonitorListModel.java b/src/share/classes/com/sun/tools/example/debug/gui/MonitorListModel.java index 91c87a4d74c24511dee5dff57fe1e7ab8f6eb2f7..c46219f4720cc81c4cf75f1a42bf329330e74c9c 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/MonitorListModel.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/MonitorListModel.java @@ -42,10 +42,12 @@ public class MonitorListModel extends AbstractListModel { //### remove listeners on exit! } + @Override public Object getElementAt(int index) { return monitors.get(index); } + @Override public int getSize() { return monitors.size(); } @@ -70,7 +72,7 @@ public class MonitorListModel extends AbstractListModel { return Collections.unmodifiableList(monitors); } - public Iterator iterator() { + public Iterator iterator() { return monitors().iterator(); } @@ -80,7 +82,8 @@ public class MonitorListModel extends AbstractListModel { private class MonitorListListener implements ContextListener { - public void currentFrameChanged(CurrentFrameChangedEvent e) { + @Override + public void currentFrameChanged(final CurrentFrameChangedEvent e) { invalidate(); } } diff --git a/src/share/classes/com/sun/tools/example/debug/gui/MonitorTool.java b/src/share/classes/com/sun/tools/example/debug/gui/MonitorTool.java index 21d0fc19bbd92c226194241c8406b992ba7f7186..cf7c10c51c2d7acf96ddba61ef31d9435939e7ee 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/MonitorTool.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/MonitorTool.java @@ -25,15 +25,9 @@ package com.sun.tools.example.debug.gui; -import java.io.*; -import java.util.*; - import javax.swing.*; -import javax.swing.tree.*; import javax.swing.event.*; import java.awt.*; -import java.awt.event.*; - import com.sun.jdi.*; import com.sun.tools.example.debug.bdi.*; import com.sun.tools.example.debug.expr.ExpressionParser; @@ -41,6 +35,7 @@ import com.sun.tools.example.debug.expr.ParseException; public class MonitorTool extends JPanel { + private static final long serialVersionUID = -645235951031726647L; private ExecutionManager runtime; private ContextManager context; @@ -64,6 +59,7 @@ public class MonitorTool extends JPanel { } private class MonitorToolListener implements ListSelectionListener { + @Override public void valueChanged(ListSelectionEvent e) { int index = list.getSelectedIndex(); if (index != -1) { @@ -78,6 +74,7 @@ public class MonitorTool extends JPanel { IncompatibleThreadStateException { ExpressionParser.GetFrame frameGetter = new ExpressionParser.GetFrame() { + @Override public StackFrame get() throws IncompatibleThreadStateException { @@ -93,6 +90,7 @@ public class MonitorTool extends JPanel { private class MonitorRenderer extends DefaultListCellRenderer { + @Override public Component getListCellRendererComponent(JList list, Object value, int index, diff --git a/src/share/classes/com/sun/tools/example/debug/gui/SearchPath.java b/src/share/classes/com/sun/tools/example/debug/gui/SearchPath.java index e02b8400276ddcf1af679479a236de33833182c4..30905696660817f7ecbfb5d515c1d8911e5bdb97 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/SearchPath.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/SearchPath.java @@ -58,8 +58,8 @@ public class SearchPath { } public File resolve(String relativeFileName) { - for (int i = 0; i < pathArray.length; i++) { - File path = new File(pathArray[i], relativeFileName); + for (String element : pathArray) { + File path = new File(element, relativeFileName); if (path.exists()) { return path; } @@ -76,8 +76,8 @@ public class SearchPath { // classpath is retained. This is the one that will be // found if we later do a 'resolve'. SortedSet s = new TreeSet(); // sorted, no duplicates - for (int i = 0; i < pathArray.length; i++) { - File path = new File(pathArray[i], relativeDirName); + for (String element : pathArray) { + File path = new File(element, relativeDirName); if (path.exists()) { String[] childArray = path.list(filter); if (childArray != null) { diff --git a/src/share/classes/com/sun/tools/example/debug/gui/SingleLeafTreeSelectionModel.java b/src/share/classes/com/sun/tools/example/debug/gui/SingleLeafTreeSelectionModel.java index 2d1b2aa07a8c6e3aaa9bf4f5bb9603546800c444..47df28d1168c893d23e26ad9c26ddbb8e55be909 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/SingleLeafTreeSelectionModel.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/SingleLeafTreeSelectionModel.java @@ -25,22 +25,25 @@ package com.sun.tools.example.debug.gui; -import javax.swing.*; import javax.swing.tree.*; public class SingleLeafTreeSelectionModel extends DefaultTreeSelectionModel { + private static final long serialVersionUID = -7849105107888117679L; + SingleLeafTreeSelectionModel() { super(); selectionMode = SINGLE_TREE_SELECTION; } + @Override public void setSelectionPath(TreePath path) { if(((TreeNode)(path.getLastPathComponent())).isLeaf()) { super.setSelectionPath(path); } } + @Override public void setSelectionPaths(TreePath[] paths) { // Only look at first path, as all others will be // ignored anyway in single tree selection mode. @@ -49,12 +52,14 @@ public class SingleLeafTreeSelectionModel extends DefaultTreeSelectionModel { } } + @Override public void addSelectionPath(TreePath path) { if(((TreeNode)(path.getLastPathComponent())).isLeaf()) { super.setSelectionPath(path); } } + @Override public void addSelectionPaths(TreePath[] paths) { // Only look at first path, as all others will be // ignored anyway in single tree selection mode. diff --git a/src/share/classes/com/sun/tools/example/debug/gui/SourceManager.java b/src/share/classes/com/sun/tools/example/debug/gui/SourceManager.java index 6e8ae7a292e97910869b27814331ac0e1b44dae3..eda83460e83424ebbdc1af45ab91955f17724e5e 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/SourceManager.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/SourceManager.java @@ -31,7 +31,6 @@ import java.util.*; import com.sun.jdi.*; import com.sun.tools.example.debug.event.*; -import com.sun.tools.example.debug.bdi.*; /** * Manage the list of source files. @@ -45,7 +44,7 @@ public class SourceManager { private List sourceList; private SearchPath sourcePath; - private Vector sourceListeners = new Vector(); + private ArrayList sourceListeners = new ArrayList(); private Map classToSource = new HashMap(); @@ -79,18 +78,18 @@ public class SourceManager { } public void addSourceListener(SourceListener l) { - sourceListeners.addElement(l); + sourceListeners.add(l); } public void removeSourceListener(SourceListener l) { - sourceListeners.removeElement(l); + sourceListeners.remove(l); } private void notifySourcepathChanged() { - Vector l = (Vector)sourceListeners.clone(); + ArrayList l = new ArrayList(sourceListeners); SourcepathChangedEvent evt = new SourcepathChangedEvent(this); 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 { private class SMClassListener extends JDIAdapter implements JDIListener { + @Override public void classPrepare(ClassPrepareEventSet e) { ReferenceType refType = e.getReferenceType(); SourceModel sm = sourceForClass(refType); @@ -171,6 +171,7 @@ public class SourceManager { } } + @Override public void classUnload(ClassUnloadEventSet e) { //### iterate through looking for (e.getTypeName()). //### then remove it. diff --git a/src/share/classes/com/sun/tools/example/debug/gui/SourceModel.java b/src/share/classes/com/sun/tools/example/debug/gui/SourceModel.java index 4ad47069589e5860757f804c512b52d31cf76870..b65be0b5a2ddbec68a56331bac767ba62bbfcb6e 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/SourceModel.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/SourceModel.java @@ -31,8 +31,6 @@ import java.util.*; import com.sun.jdi.*; import com.sun.jdi.request.*; -import com.sun.tools.example.debug.bdi.*; - import javax.swing.*; /** @@ -101,6 +99,7 @@ public class SourceModel extends AbstractListModel { // **** Implement ListModel ***** + @Override public Object getElementAt(int index) { if (sourceLines == null) { initialize(); @@ -108,6 +107,7 @@ public class SourceModel extends AbstractListModel { return sourceLines.get(index); } + @Override public int getSize() { if (sourceLines == null) { initialize(); diff --git a/src/share/classes/com/sun/tools/example/debug/gui/SourceTool.java b/src/share/classes/com/sun/tools/example/debug/gui/SourceTool.java index 0f0c24d83e58bb09b6f35b83c1d8d8772671466a..cecbeaf2479dd006728603cf732cb78b6496c4d6 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/SourceTool.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/SourceTool.java @@ -26,8 +26,6 @@ package com.sun.tools.example.debug.gui; import java.io.*; -import java.util.*; - import java.awt.*; import java.awt.event.*; import javax.swing.*; @@ -35,13 +33,12 @@ import javax.swing.*; import com.sun.jdi.*; import com.sun.jdi.request.*; -import com.sun.tools.example.debug.event.*; import com.sun.tools.example.debug.bdi.*; -import java.util.List; - public class SourceTool extends JPanel { + private static final long serialVersionUID = -5461299294186395257L; + private Environment env; private ExecutionManager runtime; @@ -99,6 +96,7 @@ public class SourceTool extends JPanel { // ContextListener + @Override public void currentFrameChanged(CurrentFrameChangedEvent e) { showSourceContext(e.getThread(), e.getIndex()); } @@ -108,6 +106,7 @@ public class SourceTool extends JPanel { // SourceListener + @Override public void sourcepathChanged(SourcepathChangedEvent e) { // Reload source view if its contents depend // on the source path. @@ -120,12 +119,15 @@ public class SourceTool extends JPanel { // SpecListener + @Override public void breakpointSet(SpecEvent e) { breakpointResolved(e); } + @Override public void breakpointDeferred(SpecEvent e) { } + @Override public void breakpointDeleted(SpecEvent e) { BreakpointRequest req = (BreakpointRequest)e.getEventRequest(); Location loc = req.location(); @@ -139,6 +141,7 @@ public class SourceTool extends JPanel { } } + @Override public void breakpointResolved(SpecEvent e) { BreakpointRequest req = (BreakpointRequest)e.getEventRequest(); Location loc = req.location(); @@ -150,29 +153,40 @@ public class SourceTool extends JPanel { } } + @Override public void breakpointError(SpecErrorEvent e) { breakpointDeleted(e); } + @Override public void watchpointSet(SpecEvent e) { } + @Override public void watchpointDeferred(SpecEvent e) { } + @Override public void watchpointDeleted(SpecEvent e) { } + @Override public void watchpointResolved(SpecEvent e) { } + @Override public void watchpointError(SpecErrorEvent e) { } + @Override public void exceptionInterceptSet(SpecEvent e) { } + @Override public void exceptionInterceptDeferred(SpecEvent e) { } + @Override public void exceptionInterceptDeleted(SpecEvent e) { } + @Override public void exceptionInterceptResolved(SpecEvent e) { } + @Override public void exceptionInterceptError(SpecErrorEvent e) { } } @@ -269,6 +283,7 @@ public class SourceTool extends JPanel { private class SourceLineRenderer extends DefaultListCellRenderer { + @Override public Component getListCellRendererComponent(JList list, Object value, int index, @@ -301,6 +316,7 @@ public class SourceTool extends JPanel { return this; } + @Override public Dimension getPreferredSize() { Dimension dim = super.getPreferredSize(); return new Dimension(dim.width, dim.height-5); @@ -309,6 +325,7 @@ public class SourceTool extends JPanel { } private class STMouseListener extends MouseAdapter implements MouseListener { + @Override public void mousePressed(MouseEvent e) { if (e.isPopupTrigger()) { showPopupMenu((Component)e.getSource(), @@ -316,6 +333,7 @@ public class SourceTool extends JPanel { } } + @Override public void mouseReleased(MouseEvent e) { if (e.isPopupTrigger()) { showPopupMenu((Component)e.getSource(), @@ -354,6 +372,7 @@ public class SourceTool extends JPanel { private JMenuItem commandItem(String label, final String cmd) { JMenuItem item = new JMenuItem(label); item.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { interpreter.executeCommand(cmd); } diff --git a/src/share/classes/com/sun/tools/example/debug/gui/SourceTreeTool.java b/src/share/classes/com/sun/tools/example/debug/gui/SourceTreeTool.java index e6837e29d5eefed0543ed211b5a0ed7fd112442a..5f572c70896055c20ac161c755db2986333ff51f 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/SourceTreeTool.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/SourceTreeTool.java @@ -30,15 +30,15 @@ import java.util.*; import javax.swing.*; import javax.swing.tree.*; -import javax.swing.event.*; import java.awt.*; import java.awt.event.*; -import com.sun.jdi.*; import com.sun.tools.example.debug.bdi.*; public class SourceTreeTool extends JPanel { + private static final long serialVersionUID = 3336680912107956419L; + private Environment env; private ExecutionManager runtime; @@ -81,6 +81,7 @@ public class SourceTreeTool extends JPanel { ******/ MouseListener ml = new MouseAdapter() { + @Override public void mouseClicked(MouseEvent e) { int selRow = tree.getRowForLocation(e.getX(), e.getY()); TreePath selPath = tree.getPathForLocation(e.getX(), e.getY()); @@ -112,6 +113,7 @@ public class SourceTreeTool extends JPanel { private class SourceTreeToolListener implements SourceListener { + @Override public void sourcepathChanged(SourcepathChangedEvent e) { sourcePath = sourceManager.getSourcePath(); root = createDirectoryTree(HEADING); @@ -121,6 +123,7 @@ public class SourceTreeTool extends JPanel { } private static class SourceOrDirectoryFilter implements FilenameFilter { + @Override public boolean accept(File dir, String name) { return (name.endsWith(".java") || new File(dir, name).isDirectory()); @@ -158,6 +161,7 @@ public class SourceTreeTool extends JPanel { this.isDirectory = isDirectory; } + @Override public String toString() { return name; } @@ -195,6 +199,7 @@ public class SourceTreeTool extends JPanel { * Returns the child TreeNode at index * childIndex. */ + @Override public TreeNode getChildAt(int childIndex) { expandIfNeeded(); return children[childIndex]; @@ -204,6 +209,7 @@ public class SourceTreeTool extends JPanel { * Returns the number of children TreeNodes the receiver * contains. */ + @Override public int getChildCount() { expandIfNeeded(); return children.length; @@ -212,6 +218,7 @@ public class SourceTreeTool extends JPanel { /** * Returns the parent TreeNode of the receiver. */ + @Override public TreeNode getParent() { return parent; } @@ -221,18 +228,21 @@ public class SourceTreeTool extends JPanel { * If the receiver does not contain node, -1 will be * returned. */ + @Override public int getIndex(TreeNode node) { expandIfNeeded(); for (int i = 0; i < children.length; i++) { - if (children[i] == node) + if (children[i] == node) { return i; } + } return -1; } /** * Returns true if the receiver allows children. */ + @Override public boolean getAllowsChildren() { return isDirectory; } @@ -240,6 +250,7 @@ public class SourceTreeTool extends JPanel { /** * Returns true if the receiver is a leaf. */ + @Override public boolean isLeaf() { expandIfNeeded(); return !isDirectory; @@ -248,13 +259,16 @@ public class SourceTreeTool extends JPanel { /** * Returns the children of the receiver as an Enumeration. */ + @Override public Enumeration children() { expandIfNeeded(); return new Enumeration() { int i = 0; + @Override public boolean hasMoreElements() { return (i < children.length); } + @Override public Object nextElement() throws NoSuchElementException { if (i >= children.length) { throw new NoSuchElementException(); diff --git a/src/share/classes/com/sun/tools/example/debug/gui/SourcepathChangedEvent.java b/src/share/classes/com/sun/tools/example/debug/gui/SourcepathChangedEvent.java index 53b3f0382f24e2c82473a97c91bde3fe14e0df4e..975571b0dad95dc0db81736eea885055408e43cb 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/SourcepathChangedEvent.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/SourcepathChangedEvent.java @@ -29,6 +29,8 @@ import java.util.EventObject; public class SourcepathChangedEvent extends EventObject { + private static final long serialVersionUID = 8762169481005804121L; + public SourcepathChangedEvent(Object source) { super(source); } diff --git a/src/share/classes/com/sun/tools/example/debug/gui/StackTraceTool.java b/src/share/classes/com/sun/tools/example/debug/gui/StackTraceTool.java index 8d28755778330eb30c2548ff839640dcc6844125..1e3b68eabc684870c02954c01a1d1578e80efb49 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/StackTraceTool.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/StackTraceTool.java @@ -25,21 +25,16 @@ 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.tree.*; import javax.swing.event.*; import java.awt.*; -import java.awt.event.*; - import com.sun.jdi.*; import com.sun.tools.example.debug.bdi.*; public class StackTraceTool extends JPanel { + private static final long serialVersionUID = 9140041989427965718L; + private Environment env; private ExecutionManager runtime; @@ -85,6 +80,7 @@ public class StackTraceTool extends JPanel { //### I suspect we handle the case badly that the VM is not interrupted. + @Override public void currentFrameChanged(CurrentFrameChangedEvent e) { // If the current frame of the thread appearing in this // view is changed, move the selection to track it. @@ -103,6 +99,7 @@ public class StackTraceTool extends JPanel { // ListSelectionListener + @Override public void valueChanged(ListSelectionEvent e) { int index = list.getSelectedIndex(); if (index != -1) { @@ -117,6 +114,7 @@ public class StackTraceTool extends JPanel { private class StackFrameRenderer extends DefaultListCellRenderer { + @Override public Component getListCellRendererComponent(JList list, Object value, int index, @@ -174,6 +172,7 @@ public class StackTraceTool extends JPanel { this.tinfo = tinfo; } + @Override public Object getElementAt(int index) { try { return tinfo == null? null : tinfo.getFrame(index); @@ -186,6 +185,7 @@ public class StackTraceTool extends JPanel { } } + @Override public int getSize() { try { return tinfo == null? 1 : tinfo.getFrameCount(); diff --git a/src/share/classes/com/sun/tools/example/debug/gui/ThreadTreeTool.java b/src/share/classes/com/sun/tools/example/debug/gui/ThreadTreeTool.java index 2aefdc309e63d8e31a80da1c0675e9e70b7a9740..02cf374f0276ebbd1f882d99efe59e52afc311fc 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/ThreadTreeTool.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/ThreadTreeTool.java @@ -25,13 +25,11 @@ 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.tree.*; -import javax.swing.event.*; import java.awt.*; import java.awt.event.*; @@ -45,6 +43,8 @@ import com.sun.tools.example.debug.bdi.*; public class ThreadTreeTool extends JPanel { + private static final long serialVersionUID = 4168599992853038878L; + private Environment env; private ExecutionManager runtime; @@ -79,6 +79,7 @@ public class ThreadTreeTool extends JPanel { tree.setSelectionModel(new SingleLeafTreeSelectionModel()); MouseListener ml = new MouseAdapter() { + @Override public void mouseClicked(MouseEvent e) { int selRow = tree.getRowForLocation(e.getX(), e.getY()); TreePath selPath = tree.getPathForLocation(e.getX(), e.getY()); @@ -131,6 +132,7 @@ public class ThreadTreeTool extends JPanel { // SessionListener + @Override public void sessionStart(EventObject e) { try { for (ThreadReference thread : runtime.allThreads()) { @@ -143,20 +145,25 @@ public class ThreadTreeTool extends JPanel { } } + @Override public void sessionInterrupt(EventObject e) {} + @Override public void sessionContinue(EventObject e) {} // JDIListener + @Override public void threadStart(ThreadStartEventSet e) { root.addThread(e.getThread()); } + @Override public void threadDeath(ThreadDeathEventSet e) { root.removeThread(e.getThread()); } + @Override public void vmDisconnect(VMDisconnectEventSet e) { // Clear the contents of this view. root = createThreadTree(HEADING); @@ -193,6 +200,7 @@ public class ThreadTreeTool extends JPanel { } } + @Override public String toString() { return description; } @@ -213,6 +221,7 @@ public class ThreadTreeTool extends JPanel { return (thread == null); } + @Override public boolean isLeaf() { return !isThreadGroup(); } diff --git a/src/share/classes/com/sun/tools/example/debug/gui/TypeScript.java b/src/share/classes/com/sun/tools/example/debug/gui/TypeScript.java index 84c3262e25efcd6b579755ed52e626a6e2628901..c99a4cd9e27c93ecb112b5c756a8b1b6046777b6 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/TypeScript.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/TypeScript.java @@ -28,10 +28,10 @@ package com.sun.tools.example.debug.gui; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import javax.swing.border.*; public class TypeScript extends JPanel { + private static final long serialVersionUID = -983704841363534885L; private JTextArea history; private JTextField entry; @@ -41,7 +41,6 @@ public class TypeScript extends JPanel { private JScrollBar historyHScrollBar; private boolean echoInput = false; - private boolean nlPending = false; private static String newline = System.getProperty("line.separator"); diff --git a/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptOutputListener.java b/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptOutputListener.java index 6731023760de8486c2db4fea27a773fd89b3fe98..bb3cda6921db52508d4436b3c2544033472ea56c 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptOutputListener.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptOutputListener.java @@ -25,7 +25,6 @@ package com.sun.tools.example.debug.gui; -import javax.swing.*; import com.sun.tools.example.debug.bdi.OutputListener; public class TypeScriptOutputListener implements OutputListener { @@ -42,10 +41,12 @@ public class TypeScriptOutputListener implements OutputListener { this.appendNewline = appendNewline; } + @Override public void putString(String s) { script.append(s); - if (appendNewline) + if (appendNewline) { script.newline(); } + } } diff --git a/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptWriter.java b/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptWriter.java index 89ca4c32aacc1e274f4cbd65b66d2758e285c716..64b5ec2b4439fddcefa2a4e9068e411b08ea0b1d 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptWriter.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/TypeScriptWriter.java @@ -35,14 +35,17 @@ public class TypeScriptWriter extends Writer { this.script = script; } + @Override public void write(char[] cbuf, int off, int len) throws IOException { script.append(String.valueOf(cbuf, off, len)); } + @Override public void flush() { script.flush(); } + @Override public void close() { script.flush(); } diff --git a/src/share/classes/com/sun/tools/example/debug/tty/AccessWatchpointSpec.java b/src/share/classes/com/sun/tools/example/debug/tty/AccessWatchpointSpec.java index 1eedd7af593d6ba97777a1ee759d6e8ed34581d5..1b83363d171a221b6f6a7e572cd5a893be115694 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/AccessWatchpointSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/AccessWatchpointSpec.java @@ -38,6 +38,7 @@ class AccessWatchpointSpec extends WatchpointSpec { /** * The 'refType' is known to match, return the EventRequest. */ + @Override EventRequest resolveEventRequest(ReferenceType refType) throws NoSuchFieldException { Field field = refType.fieldByName(fieldId); @@ -48,6 +49,7 @@ class AccessWatchpointSpec extends WatchpointSpec { return wp; } + @Override public String toString() { return MessageOutput.format("watch accesses of", new Object [] {refSpec.toString(), diff --git a/src/share/classes/com/sun/tools/example/debug/tty/AmbiguousMethodException.java b/src/share/classes/com/sun/tools/example/debug/tty/AmbiguousMethodException.java index 9975fa54e612b44cbec0d19068498b367c2f2c69..eb210dd4588ef61e867b6e16baa9d3ba59808c5c 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/AmbiguousMethodException.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/AmbiguousMethodException.java @@ -27,6 +27,8 @@ package com.sun.tools.example.debug.tty; public class AmbiguousMethodException extends Exception { + private static final long serialVersionUID = -5372629264936918654L; + public AmbiguousMethodException() { super(); diff --git a/src/share/classes/com/sun/tools/example/debug/tty/BreakpointSpec.java b/src/share/classes/com/sun/tools/example/debug/tty/BreakpointSpec.java index 1105c9e6d3792506587f0f38e5ce2844213a3a4c..ed6c2a10fc57d13c91ed2ad7b35e55c9540def7a 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/BreakpointSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/BreakpointSpec.java @@ -30,7 +30,6 @@ import com.sun.jdi.request.*; import java.util.ArrayList; import java.util.List; -import java.util.Iterator; class BreakpointSpec extends EventRequestSpec { String methodId; @@ -58,6 +57,7 @@ class BreakpointSpec extends EventRequestSpec { /** * The 'refType' is known to match, return the EventRequest. */ + @Override EventRequest resolveEventRequest(ReferenceType refType) throws AmbiguousMethodException, AbsentInformationException, @@ -91,12 +91,14 @@ class BreakpointSpec extends EventRequestSpec { return (methodId != null); } + @Override public int hashCode() { return refSpec.hashCode() + lineNumber + ((methodId != null) ? methodId.hashCode() : 0) + ((methodArgs != null) ? methodArgs.hashCode() : 0); } + @Override public boolean equals(Object obj) { if (obj instanceof BreakpointSpec) { BreakpointSpec breakpoint = (BreakpointSpec)obj; @@ -114,6 +116,7 @@ class BreakpointSpec extends EventRequestSpec { } } + @Override String errorMessageFor(Exception e) { if (e instanceof AmbiguousMethodException) { return (MessageOutput.format("Method is overloaded; specify arguments", @@ -140,6 +143,7 @@ class BreakpointSpec extends EventRequestSpec { } } + @Override public String toString() { StringBuffer buffer = new StringBuffer(refSpec.toString()); if (isMethodBreakpoint()) { diff --git a/src/share/classes/com/sun/tools/example/debug/tty/Commands.java b/src/share/classes/com/sun/tools/example/debug/tty/Commands.java index 48436c9cc96021d0feb5be1dfeee1fd311c3fad8..14a88267fe6eda8a44451a5f27c6631e8594d440 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/Commands.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/Commands.java @@ -51,6 +51,7 @@ class Commands { final ThreadInfo threadInfo = ThreadInfo.getCurrentThreadInfo(); final int stackFrame = threadInfo == null? 0 : threadInfo.getCurrentFrameIndex(); Thread thread = new Thread("asynchronous jdb command") { + @Override public void run() { try { action(); @@ -95,6 +96,7 @@ class Commands { final ThreadInfo threadInfo = ThreadInfo.getCurrentThreadInfo(); if ((threadInfo != null) && (threadInfo.getCurrentFrame() != null)) { frameGetter = new ExpressionParser.GetFrame() { + @Override public StackFrame get() throws IncompatibleThreadStateException { return threadInfo.getCurrentFrame(); } @@ -224,7 +226,6 @@ class Commands { } void commandClass(StringTokenizer t) { - List list = Env.vm().allClasses(); if (!t.hasMoreTokens()) { MessageOutput.println("No class specified."); @@ -709,6 +710,7 @@ class Commands { void doKillThread(final ThreadReference threadToKill, final StringTokenizer tokenizer) { new AsyncExecution() { + @Override void action() { doKill(threadToKill, tokenizer); } @@ -1118,7 +1120,6 @@ class Commands { } void commandStop(StringTokenizer t) { - Location bploc; String atIn; byte suspendPolicy = EventRequest.SUSPEND_ALL; @@ -1665,6 +1666,7 @@ class Commands { void commandPrint(final StringTokenizer t, final boolean dumpObject) { new AsyncExecution() { + @Override void action() { doPrint(t, dumpObject); } @@ -1734,6 +1736,7 @@ class Commands { void commandLock(final StringTokenizer t) { new AsyncExecution() { + @Override void action() { doLock(t); } @@ -1809,6 +1812,7 @@ class Commands { void commandDisableGC(final StringTokenizer t) { new AsyncExecution() { + @Override void action() { doDisableGC(t); } @@ -1837,6 +1841,7 @@ class Commands { void commandEnableGC(final StringTokenizer t) { new AsyncExecution() { + @Override void action() { doEnableGC(t); } @@ -1892,6 +1897,7 @@ class Commands { } } else { new AsyncExecution() { + @Override void action() { doSave(t); } diff --git a/src/share/classes/com/sun/tools/example/debug/tty/Env.java b/src/share/classes/com/sun/tools/example/debug/tty/Env.java index b664d094dd687bddaceb5a71f6148fa304d9beb5..e39732692ccd6c189d5de723853901aec1025ac3 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/Env.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/Env.java @@ -29,7 +29,6 @@ import com.sun.jdi.*; import com.sun.jdi.request.StepRequest; import com.sun.jdi.request.MethodEntryRequest; import com.sun.jdi.request.MethodExitRequest; -import com.sun.tools.jdi.*; import java.util.*; import java.io.*; diff --git a/src/share/classes/com/sun/tools/example/debug/tty/EventHandler.java b/src/share/classes/com/sun/tools/example/debug/tty/EventHandler.java index 0147666d9be06d8c82d2668a43cade5b3950a9d4..31e5035fe8e3588b87d0cfca7957ae2a17397918 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/EventHandler.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/EventHandler.java @@ -27,14 +27,8 @@ package com.sun.tools.example.debug.tty; import com.sun.jdi.*; import com.sun.jdi.event.*; -import com.sun.jdi.request.EventRequestManager; 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 { EventNotifier notifier; @@ -59,6 +53,7 @@ public class EventHandler implements Runnable { } } + @Override public void run() { EventQueue queue = Env.vm().eventQueue(); while (connected) { diff --git a/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpec.java b/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpec.java index 47ae8b4667aef416fffd3d6f9fafd65003d29b50..5c0177b45485717ad2446fd9058933b00292c2ac 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpec.java @@ -30,9 +30,7 @@ import com.sun.jdi.request.EventRequest; import com.sun.jdi.request.ExceptionRequest; import com.sun.jdi.request.ClassPrepareRequest; import com.sun.jdi.event.ClassPrepareEvent; -import java.util.List; import java.util.ArrayList; -import java.util.Iterator; abstract class EventRequestSpec { diff --git a/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpecList.java b/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpecList.java index 0816b74a0ce5c18e0154d9aa3db3d4299c879d9d..58dc664f0ed5c03a95be86cc503ae511b70122e2 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpecList.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/EventRequestSpecList.java @@ -25,15 +25,12 @@ package com.sun.tools.example.debug.tty; -import com.sun.jdi.*; import com.sun.jdi.request.EventRequest; import com.sun.jdi.event.ClassPrepareEvent; import java.util.ArrayList; import java.util.Collections; -import java.util.Iterator; import java.util.List; -import java.util.StringTokenizer; class EventRequestSpecList { diff --git a/src/share/classes/com/sun/tools/example/debug/tty/ExceptionSpec.java b/src/share/classes/com/sun/tools/example/debug/tty/ExceptionSpec.java index b0075061e3d406a883a21fb7798c551607484a1c..f1a3c27272478b5b75f914f004b0207ba1c49407 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/ExceptionSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/ExceptionSpec.java @@ -28,10 +28,6 @@ package com.sun.tools.example.debug.tty; import com.sun.jdi.ReferenceType; import com.sun.jdi.request.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Iterator; - class ExceptionSpec extends EventRequestSpec { private boolean notifyCaught; private boolean notifyUncaught; @@ -51,6 +47,7 @@ class ExceptionSpec extends EventRequestSpec { /** * The 'refType' is known to match, return the EventRequest. */ + @Override EventRequest resolveEventRequest(ReferenceType refType) { EventRequestManager em = refType.virtualMachine().eventRequestManager(); ExceptionRequest excReq = em.createExceptionRequest(refType, @@ -68,6 +65,7 @@ class ExceptionSpec extends EventRequestSpec { return notifyUncaught; } + @Override public int hashCode() { //Reference: Effective Java[tm] (Bloch, 2001), Item 8 int result = 17; @@ -77,6 +75,7 @@ class ExceptionSpec extends EventRequestSpec { return result; } + @Override public boolean equals(Object obj) { if (obj instanceof ExceptionSpec) { ExceptionSpec es = (ExceptionSpec)obj; @@ -90,6 +89,7 @@ class ExceptionSpec extends EventRequestSpec { return false; } + @Override public String toString() { String s; if (notifyCaught && !notifyUncaught) { diff --git a/src/share/classes/com/sun/tools/example/debug/tty/LineNotFoundException.java b/src/share/classes/com/sun/tools/example/debug/tty/LineNotFoundException.java index 5fb6a0ea5fa6f0caf238537333ab878baede73aa..442b798aaae224d57f31ba42dd1c59b18cd7339d 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/LineNotFoundException.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/LineNotFoundException.java @@ -27,6 +27,8 @@ package com.sun.tools.example.debug.tty; public class LineNotFoundException extends Exception { + private static final long serialVersionUID = 3748297722519448995L; + public LineNotFoundException() { super(); diff --git a/src/share/classes/com/sun/tools/example/debug/tty/MalformedMemberNameException.java b/src/share/classes/com/sun/tools/example/debug/tty/MalformedMemberNameException.java index dacf7aca78a71a8aa4d7733eadaa3e0a585070b5..3f2bf46c627b5f36174adeddebd868450b5f93a4 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/MalformedMemberNameException.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/MalformedMemberNameException.java @@ -26,6 +26,8 @@ package com.sun.tools.example.debug.tty; class MalformedMemberNameException extends Exception { + private static final long serialVersionUID = 7759071468833196630L; + public MalformedMemberNameException() { super(); } diff --git a/src/share/classes/com/sun/tools/example/debug/tty/ModificationWatchpointSpec.java b/src/share/classes/com/sun/tools/example/debug/tty/ModificationWatchpointSpec.java index 05436c7a614496eed0ad77a4848958f8bc1973a7..ee3a63e969487c63e098a08743c742b57e9d06b5 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/ModificationWatchpointSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/ModificationWatchpointSpec.java @@ -38,6 +38,7 @@ class ModificationWatchpointSpec extends WatchpointSpec { /** * The 'refType' is known to match, return the EventRequest. */ + @Override EventRequest resolveEventRequest(ReferenceType refType) throws NoSuchFieldException { Field field = refType.fieldByName(fieldId); @@ -48,6 +49,7 @@ class ModificationWatchpointSpec extends WatchpointSpec { return wp; } + @Override public String toString() { return MessageOutput.format("watch modification of", new Object [] {refSpec.toString(), diff --git a/src/share/classes/com/sun/tools/example/debug/tty/PatternReferenceTypeSpec.java b/src/share/classes/com/sun/tools/example/debug/tty/PatternReferenceTypeSpec.java index b6c01774df4a8881d1c9b51b30854d31fc0906c0..cc4473cefd86958728fc0f14c57130e1f1b2ca25 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/PatternReferenceTypeSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/PatternReferenceTypeSpec.java @@ -55,6 +55,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { /** * Does the specified ReferenceType match this spec. */ + @Override public boolean matches(ReferenceType refType) { if (classId.startsWith("*")) { return refType.name().endsWith(stem); @@ -65,6 +66,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { } } + @Override public ClassPrepareRequest createPrepareRequest() { ClassPrepareRequest request = Env.vm().eventRequestManager().createClassPrepareRequest(); @@ -73,10 +75,12 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { return request; } + @Override public int hashCode() { return classId.hashCode(); } + @Override public boolean equals(Object obj) { if (obj instanceof PatternReferenceTypeSpec) { PatternReferenceTypeSpec spec = (PatternReferenceTypeSpec)obj; @@ -125,6 +129,7 @@ class PatternReferenceTypeSpec implements ReferenceTypeSpec { return true; } + @Override public String toString() { return classId; } diff --git a/src/share/classes/com/sun/tools/example/debug/tty/ReferenceTypeSpec.java b/src/share/classes/com/sun/tools/example/debug/tty/ReferenceTypeSpec.java index 6f085b93d1b1701cdd80d4ca428bd9075a064773..0e76be0cb4c5914ca9811c0eac649ff28fa01801 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/ReferenceTypeSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/ReferenceTypeSpec.java @@ -35,7 +35,9 @@ interface ReferenceTypeSpec { boolean matches(ReferenceType refType); ClassPrepareRequest createPrepareRequest(); + @Override int hashCode(); + @Override boolean equals(Object obj); } diff --git a/src/share/classes/com/sun/tools/example/debug/tty/SourceMapper.java b/src/share/classes/com/sun/tools/example/debug/tty/SourceMapper.java index 95f82b539565b8f42c3c097c603317de20d6f943..941f6c24722d447ddd97111b2184b0364f099d1e 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/SourceMapper.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/SourceMapper.java @@ -27,11 +27,8 @@ package com.sun.tools.example.debug.tty; import com.sun.jdi.Location; import com.sun.jdi.AbsentInformationException; -import java.util.Map; -import java.util.HashMap; import java.util.List; import java.util.ArrayList; -import java.util.Iterator; import java.util.StringTokenizer; import java.io.*; diff --git a/src/share/classes/com/sun/tools/example/debug/tty/TTY.java b/src/share/classes/com/sun/tools/example/debug/tty/TTY.java index c717b6ca4b7a9a4f34704a5d2850b6c3a9fe9d86..6514592d67d71f5317a2d957c7d4fab24a67a57f 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/TTY.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/TTY.java @@ -47,34 +47,43 @@ public class TTY implements EventNotifier { */ private static final String progname = "jdb"; + @Override public void vmStartEvent(VMStartEvent se) { Thread.yield(); // fetch output MessageOutput.lnprint("VM Started:"); } + @Override public void vmDeathEvent(VMDeathEvent e) { } + @Override public void vmDisconnectEvent(VMDisconnectEvent e) { } + @Override public void threadStartEvent(ThreadStartEvent e) { } + @Override public void threadDeathEvent(ThreadDeathEvent e) { } + @Override public void classPrepareEvent(ClassPrepareEvent e) { } + @Override public void classUnloadEvent(ClassUnloadEvent e) { } + @Override public void breakpointEvent(BreakpointEvent be) { Thread.yield(); // fetch output MessageOutput.lnprint("Breakpoint hit:"); } + @Override public void fieldWatchEvent(WatchpointEvent fwe) { Field field = fwe.field(); ObjectReference obj = fwe.object(); @@ -90,11 +99,13 @@ public class TTY implements EventNotifier { } } + @Override public void stepEvent(StepEvent se) { Thread.yield(); // fetch output MessageOutput.lnprint("Step completed:"); } + @Override public void exceptionEvent(ExceptionEvent ee) { Thread.yield(); // fetch output Location catchLocation = ee.catchLocation(); @@ -108,6 +119,7 @@ public class TTY implements EventNotifier { } } + @Override public void methodEntryEvent(MethodEntryEvent me) { Thread.yield(); // fetch output /* @@ -125,6 +137,7 @@ public class TTY implements EventNotifier { } } + @Override public boolean methodExitEvent(MethodExitEvent me) { Thread.yield(); // fetch output /* @@ -173,6 +186,7 @@ public class TTY implements EventNotifier { return false; } + @Override public void vmInterrupted() { Thread.yield(); // fetch output printCurrentLocation(); @@ -184,6 +198,7 @@ public class TTY implements EventNotifier { MessageOutput.printPrompt(); } + @Override public void receivedEvent(Event event) { } @@ -317,18 +332,19 @@ public class TTY implements EventNotifier { // Adapted for use with String[][0]. int low = 0; int high = commandList.length - 1; - long i = 0; while (low <= high) { int mid = (low + high) >>> 1; String midVal = commandList[mid][0]; int compare = midVal.compareTo(key); - if (compare < 0) + if (compare < 0) { low = mid + 1; - else if (compare > 0) + } else if (compare > 0) { high = mid - 1; - else + } + else { return mid; // key found } + } return -(low + 1); // key not found. }; @@ -336,7 +352,9 @@ public class TTY implements EventNotifier { * Return true if the command is OK when disconnected. */ 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")); } @@ -344,7 +362,9 @@ public class TTY implements EventNotifier { * Return true if the command is OK when readonly. */ 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")); }; diff --git a/src/share/classes/com/sun/tools/example/debug/tty/TTYResources.java b/src/share/classes/com/sun/tools/example/debug/tty/TTYResources.java index 6193d9ba4c8b2b40c4d0b76575f07a272274e037..f6ba9d74ca71596014a09f18a954b67d3ddc9982 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/TTYResources.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/TTYResources.java @@ -44,6 +44,7 @@ public class TTYResources extends java.util.ListResourceBundle { * * @return the contents of this ResourceBundle. */ + @Override public Object[][] getContents() { Object[][] temp = new Object[][] { // NOTE: The value strings in this file containing "{0}" are diff --git a/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_ja.java b/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_ja.java index 5544145981533e3abb6c6ae841c4f67fb3864325..2dcace1c486d05a050729560aa0513d903289785 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_ja.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_ja.java @@ -44,6 +44,7 @@ public class TTYResources_ja extends java.util.ListResourceBundle { * * @return the contents of this ResourceBundle. */ + @Override public Object[][] getContents() { Object[][] temp = new Object[][] { // NOTE: The value strings in this file containing "{0}" are diff --git a/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_zh_CN.java b/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_zh_CN.java index ac948fb9950a181b5ebf30bc4d5d4e939e8fd99e..dc84bdf4f9cbec6693b3ba78d028a96946b46c02 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_zh_CN.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/TTYResources_zh_CN.java @@ -44,6 +44,7 @@ public class TTYResources_zh_CN extends java.util.ListResourceBundle { * * @return the contents of this ResourceBundle. */ + @Override public Object[][] getContents() { Object[][] temp = new Object[][] { // NOTE: The value strings in this file containing "{0}" are diff --git a/src/share/classes/com/sun/tools/example/debug/tty/ThreadGroupIterator.java b/src/share/classes/com/sun/tools/example/debug/tty/ThreadGroupIterator.java index 1190c33b42334442a90024891f844055cb95ea4c..dd3ad08106cf6d3b6cf8caf30072078c56ba32c7 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/ThreadGroupIterator.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/ThreadGroupIterator.java @@ -26,7 +26,6 @@ package com.sun.tools.example.debug.tty; import com.sun.jdi.ThreadGroupReference; -import com.sun.jdi.ThreadReference; import java.util.List; import java.util.Stack; import java.util.ArrayList; @@ -70,10 +69,12 @@ class ThreadGroupIterator implements Iterator { } } + @Override public boolean hasNext() { return !stack.isEmpty(); } + @Override public ThreadGroupReference next() { return nextThreadGroup(); } @@ -84,6 +85,7 @@ class ThreadGroupIterator implements Iterator { return tg; } + @Override public void remove() { throw new UnsupportedOperationException(); } diff --git a/src/share/classes/com/sun/tools/example/debug/tty/ThreadInfo.java b/src/share/classes/com/sun/tools/example/debug/tty/ThreadInfo.java index 1432239f6488d1920c34891f5eaaa8e6a40ddd8e..8ac294fbcaf6bc6928d2342b09d007d76f7244c3 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/ThreadInfo.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/ThreadInfo.java @@ -32,8 +32,6 @@ import com.sun.jdi.StackFrame; import java.util.List; import java.util.ArrayList; import java.util.Collections; -import java.util.Iterator; -import java.io.*; class ThreadInfo { // This is a list of all known ThreadInfo objects. It survives diff --git a/src/share/classes/com/sun/tools/example/debug/tty/ThreadIterator.java b/src/share/classes/com/sun/tools/example/debug/tty/ThreadIterator.java index 58ec98495e0b415f403fecbb80b6089ffbfa3940..6acb2ea9d099e0aba3250356e677d7dd14a44228 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/ThreadIterator.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/ThreadIterator.java @@ -46,6 +46,7 @@ class ThreadIterator implements Iterator { tgi = new ThreadGroupIterator(); } + @Override public boolean hasNext() { while (it == null || !it.hasNext()) { if (!tgi.hasNext()) { @@ -56,6 +57,7 @@ class ThreadIterator implements Iterator { return true; } + @Override public ThreadReference next() { return it.next(); } @@ -64,6 +66,7 @@ class ThreadIterator implements Iterator { return next(); } + @Override public void remove() { throw new UnsupportedOperationException(); } diff --git a/src/share/classes/com/sun/tools/example/debug/tty/VMConnection.java b/src/share/classes/com/sun/tools/example/debug/tty/VMConnection.java index fead3f797882e583162302cda8165e670c9f9445..0b77f9824a2f3735820498d5102ba2b645f77505 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/VMConnection.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/VMConnection.java @@ -28,7 +28,6 @@ package com.sun.tools.example.debug.tty; import com.sun.jdi.*; import com.sun.jdi.connect.*; import com.sun.jdi.request.EventRequestManager; -import com.sun.jdi.request.ExceptionRequest; import com.sun.jdi.request.ThreadStartRequest; import com.sun.jdi.request.ThreadDeathRequest; @@ -292,6 +291,7 @@ class VMConnection { */ private void displayRemoteOutput(final InputStream stream) { Thread thr = new Thread("output reader") { + @Override public void run() { try { dumpStream(stream); diff --git a/src/share/classes/com/sun/tools/example/debug/tty/VMNotConnectedException.java b/src/share/classes/com/sun/tools/example/debug/tty/VMNotConnectedException.java index 448561d04d5bf43df1b5d5a95e0bf8169a106b66..780301ca60799c3e85318c5d47ded4c77c29c940 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/VMNotConnectedException.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/VMNotConnectedException.java @@ -27,6 +27,8 @@ package com.sun.tools.example.debug.tty; public class VMNotConnectedException extends RuntimeException { + private static final long serialVersionUID = -7433430494903950165L; + public VMNotConnectedException() { super(); } diff --git a/src/share/classes/com/sun/tools/example/debug/tty/WatchpointSpec.java b/src/share/classes/com/sun/tools/example/debug/tty/WatchpointSpec.java index e424c40d62a506d29db2350c41761a3d3abe4cc9..6c7da78f48500deadf73d28d6e3822963ee00969 100644 --- a/src/share/classes/com/sun/tools/example/debug/tty/WatchpointSpec.java +++ b/src/share/classes/com/sun/tools/example/debug/tty/WatchpointSpec.java @@ -25,8 +25,6 @@ package com.sun.tools.example.debug.tty; -import com.sun.jdi.*; - abstract class WatchpointSpec extends EventRequestSpec { final String fieldId; @@ -39,11 +37,13 @@ abstract class WatchpointSpec extends EventRequestSpec { } } + @Override public int hashCode() { return refSpec.hashCode() + fieldId.hashCode() + getClass().hashCode(); } + @Override public boolean equals(Object obj) { if (obj instanceof WatchpointSpec) { WatchpointSpec watchpoint = (WatchpointSpec)obj; @@ -56,6 +56,7 @@ abstract class WatchpointSpec extends EventRequestSpec { } } + @Override String errorMessageFor(Exception e) { if (e instanceof NoSuchFieldException) { return (MessageOutput.format("No field in", diff --git a/src/share/classes/com/sun/tools/example/trace/EventThread.java b/src/share/classes/com/sun/tools/example/trace/EventThread.java index 7e729a16b07fce0922e82132be5051c8a2be26e8..229a41689890ac67611a4511d0055709a8ede6c0 100644 --- a/src/share/classes/com/sun/tools/example/trace/EventThread.java +++ b/src/share/classes/com/sun/tools/example/trace/EventThread.java @@ -49,7 +49,8 @@ public class EventThread extends Thread { private boolean vmDied = true; // VMDeath occurred // Maps ThreadReference to ThreadTrace instances - private Map traceMap = new HashMap(); + private Map traceMap = + new HashMap<>(); EventThread(VirtualMachine vm, String[] excludes, PrintWriter writer) { super("event-handler"); @@ -63,6 +64,7 @@ public class EventThread extends Thread { * As long as we are connected, get event sets off * the queue and dispatch the events within them. */ + @Override public void run() { EventQueue queue = vm.eventQueue(); while (connected) { @@ -208,7 +210,7 @@ public class EventThread extends Thread { * creating one if needed. */ ThreadTrace threadTrace(ThreadReference thread) { - ThreadTrace trace = (ThreadTrace)traceMap.get(thread); + ThreadTrace trace = traceMap.get(thread); if (trace == null) { trace = new ThreadTrace(thread); traceMap.put(thread, trace); @@ -297,7 +299,7 @@ public class EventThread extends Thread { } 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 trace.threadDeathEvent(event); // Forward event } @@ -309,9 +311,8 @@ public class EventThread extends Thread { */ private void classPrepareEvent(ClassPrepareEvent event) { EventRequestManager mgr = vm.eventRequestManager(); - List fields = event.referenceType().visibleFields(); - for (Iterator it = fields.iterator(); it.hasNext(); ) { - Field field = (Field)it.next(); + List fields = event.referenceType().visibleFields(); + for (Field field : fields) { ModificationWatchpointRequest req = mgr.createModificationWatchpointRequest(field); for (int i=0; i arguments = + connectorArguments(connector, mainArgs); try { return connector.launch(arguments); } catch (IOException exc) { @@ -186,10 +186,8 @@ public class Trace { * Find a com.sun.jdi.CommandLineLaunch connector */ LaunchingConnector findLaunchingConnector() { - List connectors = Bootstrap.virtualMachineManager().allConnectors(); - Iterator iter = connectors.iterator(); - while (iter.hasNext()) { - Connector connector = (Connector)iter.next(); + List connectors = Bootstrap.virtualMachineManager().allConnectors(); + for (Connector connector : connectors) { if (connector.name().equals("com.sun.jdi.CommandLineLaunch")) { return (LaunchingConnector)connector; } @@ -200,8 +198,8 @@ public class Trace { /** * Return the launching connector's arguments. */ - Map connectorArguments(LaunchingConnector connector, String mainArgs) { - Map arguments = connector.defaultArguments(); + Map connectorArguments(LaunchingConnector connector, String mainArgs) { + Map arguments = connector.defaultArguments(); Connector.Argument mainArg = (Connector.Argument)arguments.get("main"); if (mainArg == null) { diff --git a/src/share/demo/jvmti/minst/Minst.java b/src/share/demo/jvmti/minst/Minst.java index 6e21926f7d8414ffb8ee921766934b2fa14aeace..04504c79f66355e07bdeeacd5953af9697766c7b 100644 --- a/src/share/demo/jvmti/minst/Minst.java +++ b/src/share/demo/jvmti/minst/Minst.java @@ -45,7 +45,7 @@ public class Minst { */ public static void method_entry(int cnum, int mnum) { - Class x = Minst.class; + Class x = Minst.class; synchronized ( x ) { if ( engaged > 0 ) { engaged = 0; diff --git a/src/share/demo/management/FullThreadDump/Deadlock.java b/src/share/demo/management/FullThreadDump/Deadlock.java index 0a92427f3bb6eb0787ba20741c4fa4036d3048b0..2cc2d3e518d56045b71da837bdd43a442a90a69b 100644 --- a/src/share/demo/management/FullThreadDump/Deadlock.java +++ b/src/share/demo/management/FullThreadDump/Deadlock.java @@ -48,7 +48,7 @@ import java.io.IOException; */ public class Deadlock { public static void main(String[] argv) { - Deadlock dl = new Deadlock(); + new Deadlock(); // Now find deadlock ThreadMonitor monitor = new ThreadMonitor(); @@ -112,6 +112,7 @@ public class Deadlock { this.mon2 = mon2; this.useSync = false; } + @Override public void run() { if (useSync) { syncLock(); diff --git a/src/share/demo/management/FullThreadDump/ThreadMonitor.java b/src/share/demo/management/FullThreadDump/ThreadMonitor.java index 8b9360c81c7e9b07ce3db2c512d3102fc98b023a..eb4ed7803d253e080162baa9438c2fa7f46aa333 100644 --- a/src/share/demo/management/FullThreadDump/ThreadMonitor.java +++ b/src/share/demo/management/FullThreadDump/ThreadMonitor.java @@ -39,7 +39,6 @@ import java.lang.management.LockInfo; import java.lang.management.MonitorInfo; import javax.management.*; import java.io.*; -import java.util.*; /** * Example of using the java.lang.management API to dump stack trace @@ -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); for (MonitorInfo mi : monitors) { System.out.println(INDENT + " - " + mi + " locked at "); @@ -201,6 +201,7 @@ public class ThreadMonitor { ThreadInfo[] infos = tmbean.getThreadInfo(tids, true, true); for (ThreadInfo ti : infos) { printThreadInfo(ti); + printMonitorInfo(ti); printLockInfo(ti.getLockedSynchronizers()); System.out.println(); } diff --git a/src/share/demo/management/JTop/JTop.java b/src/share/demo/management/JTop/JTop.java index 3ec7eedbfd1f68f8266f3280b22b425d9e3f3268..39f4cab133a5fdba12db3d65de1bc87072803624 100644 --- a/src/share/demo/management/JTop/JTop.java +++ b/src/share/demo/management/JTop/JTop.java @@ -57,7 +57,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import java.util.SortedMap; import java.util.Timer; @@ -69,10 +68,8 @@ import java.net.MalformedURLException; import static java.lang.management.ManagementFactory.*; import java.awt.*; -import java.awt.event.*; import javax.swing.*; import javax.swing.border.*; -import javax.swing.event.*; import javax.swing.table.*; /** @@ -80,6 +77,8 @@ import javax.swing.table.*; * in a table. */ public class JTop extends JPanel { + + private static final long serialVersionUID = -1499762160973870696L; private MBeanServerConnection server; private ThreadMXBean tmbean; private MyTableModel tmodel; @@ -122,29 +121,34 @@ public class JTop extends JPanel { } class MyTableModel extends AbstractTableModel { + private static final long serialVersionUID = -7877310288576779514L; private String[] columnNames = {"ThreadName", "CPU(sec)", "State"}; // List of all threads. The key of each entry is the CPU time // and its value is the ThreadInfo object with no stack trace. private List> threadList = - Collections.EMPTY_LIST; + Collections.emptyList(); public MyTableModel() { } + @Override public int getColumnCount() { return columnNames.length; } + @Override public int getRowCount() { return threadList.size(); } + @Override public String getColumnName(int col) { return columnNames[col]; } + @Override public Object getValueAt(int row, int col) { Map.Entry me = threadList.get(row); switch (col) { @@ -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(); } @@ -207,12 +212,14 @@ public class JTop extends JPanel { * Format Double with 4 fraction digits */ class DoubleRenderer extends DefaultTableCellRenderer { + private static final long serialVersionUID = 1704639497162584382L; NumberFormat formatter; public DoubleRenderer() { super(); setHorizontalAlignment(JLabel.RIGHT); } + @Override public void setValue(Object value) { if (formatter==null) { formatter = NumberFormat.getInstance(); @@ -238,12 +245,14 @@ public class JTop extends JPanel { } // Get the current thread info and CPU time + @Override public List> doInBackground() { return getThreadList(); } // fire table data changed to trigger GUI update // when doInBackground() is finished + @Override protected void done() { try { // Set table model with the new thread list @@ -290,6 +299,7 @@ public class JTop extends JPanel { // A timer task to update GUI per each interval TimerTask timerTask = new TimerTask() { + @Override public void run() { // Schedule the SwingWorker to update the GUI jtop.newSwingWorker().execute(); @@ -299,6 +309,7 @@ public class JTop extends JPanel { // Create the standalone window with JTop panel // by the event dispatcher thread SwingUtilities.invokeAndWait(new Runnable() { + @Override public void run() { createAndShowGUI(jtop); } diff --git a/src/share/demo/management/JTop/JTopPlugin.java b/src/share/demo/management/JTop/JTopPlugin.java index 03352f5d90bdf9fd0285221bda4bc8b808b52803..9586f9ad48dc187dddde2f405e5d8c6f81bc424a 100644 --- a/src/share/demo/management/JTop/JTopPlugin.java +++ b/src/share/demo/management/JTop/JTopPlugin.java @@ -40,13 +40,13 @@ import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.LinkedHashMap; import java.util.Map; -import javax.management.MBeanServerConnection; + import javax.swing.JPanel; import javax.swing.SwingWorker; -import com.sun.tools.jconsole.JConsolePlugin; import com.sun.tools.jconsole.JConsoleContext; import com.sun.tools.jconsole.JConsoleContext.ConnectionState; +import 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 /* * Returns a JTop tab to be added in JConsole. */ + @Override public synchronized Map getTabs() { if (tabs == null) { jtop = new JTop(); @@ -86,6 +87,7 @@ public class JTopPlugin extends JConsolePlugin implements PropertyChangeListener /* * Returns a SwingWorker which is responsible for updating the JTop tab. */ + @Override public SwingWorker newSwingWorker() { return jtop.newSwingWorker(); } @@ -101,10 +103,10 @@ public class JTopPlugin extends JConsolePlugin implements PropertyChangeListener * Property listener to reset the MBeanServerConnection * at reconnection time. */ + @Override public void propertyChange(PropertyChangeEvent ev) { String prop = ev.getPropertyName(); if (prop == JConsoleContext.CONNECTION_STATE_PROPERTY) { - ConnectionState oldState = (ConnectionState)ev.getOldValue(); ConnectionState newState = (ConnectionState)ev.getNewValue(); // JConsole supports disconnection and reconnection // The MBeanServerConnection will become invalid when diff --git a/src/share/demo/management/MemoryMonitor/MemoryMonitor.java b/src/share/demo/management/MemoryMonitor/MemoryMonitor.java index d43c4a7f3dd44452782e5fe9c8667177b6ee99b7..676b698f3fbe696a9a63df5de536242e570d52e2 100644 --- a/src/share/demo/management/MemoryMonitor/MemoryMonitor.java +++ b/src/share/demo/management/MemoryMonitor/MemoryMonitor.java @@ -42,9 +42,6 @@ import javax.swing.*; import javax.swing.border.EtchedBorder; import javax.swing.border.TitledBorder; import java.lang.management.*; -import java.util.*; - - /** * Demo code which plots the memory usage by all memory pools. * The memory usage is sampled at some time interval using @@ -53,6 +50,7 @@ import java.util.*; */ public class MemoryMonitor extends JPanel { + private static final long serialVersionUID = -3463003810776195761L; static JCheckBox dateStampCB = new JCheckBox("Output Date Stamp"); public Surface surf; JPanel controls; @@ -84,6 +82,7 @@ public class MemoryMonitor extends JPanel { controls.add(dateStampCB); dateStampCB.setFont(font); addMouseListener(new MouseAdapter() { + @Override public void mouseClicked(MouseEvent e) { removeAll(); if ((doControls = !doControls)) { @@ -128,28 +127,32 @@ public class MemoryMonitor extends JPanel { public Surface() { setBackground(Color.black); addMouseListener(new MouseAdapter() { + @Override public void mouseClicked(MouseEvent e) { if (thread == null) start(); else stop(); } }); - int i = 0; usedMem = new float[numPools][]; ptNum = new int[numPools]; } + @Override public Dimension getMinimumSize() { return getPreferredSize(); } + @Override public Dimension getMaximumSize() { return getPreferredSize(); } + @Override public Dimension getPreferredSize() { return new Dimension(135,80); } + @Override public void paint(Graphics g) { if (big == null) { @@ -315,13 +318,14 @@ public class MemoryMonitor extends JPanel { notify(); } + @Override public void run() { Thread me = Thread.currentThread(); while (thread == me && !isShowing() || getSize().width == 0) { try { - thread.sleep(500); + Thread.sleep(500); } catch (InterruptedException e) { return; } } @@ -339,7 +343,7 @@ public class MemoryMonitor extends JPanel { } repaint(); try { - thread.sleep(sleepAmount); + Thread.sleep(sleepAmount); } catch (InterruptedException e) { break; } if (MemoryMonitor.dateStampCB.isSelected()) { System.out.println(new Date().toString() + " " + usedStr); @@ -354,6 +358,7 @@ public class MemoryMonitor extends JPanel { static class Memeater extends ClassLoader implements Runnable { Object y[]; public Memeater() {} + @Override public void run() { y = new Object[10000000]; int k =0; @@ -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 TestNNNNNN(); @@ -424,15 +429,15 @@ public class MemoryMonitor extends JPanel { int len = begin.length + value.length + end.length; byte b[] = new byte[len]; - int i, pos=0; - for (i=0; i mbeans = server.queryNames(poolName, null); if (mbeans != null) { pools = new ArrayList(); - Iterator iterator = mbeans.iterator(); - while (iterator.hasNext()) { - ObjectName objName = (ObjectName) iterator.next(); + for (ObjectName objName : mbeans) { MemoryPoolMXBean p = newPlatformMXBeanProxy(server, objName.getCanonicalName(), @@ -88,9 +86,7 @@ public class PrintGCStat { mbeans = server.queryNames(gcName, null); if (mbeans != null) { gcmbeans = new ArrayList(); - Iterator iterator = mbeans.iterator(); - while (iterator.hasNext()) { - ObjectName objName = (ObjectName) iterator.next(); + for (ObjectName objName : mbeans) { GarbageCollectorMXBean gc = newPlatformMXBeanProxy(server, objName.getCanonicalName(), @@ -116,7 +112,9 @@ public class PrintGCStat { * of all memory pools as well as the GC statistics. */ 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) { System.out.print(" [" + gc.getName() + ": "); System.out.print("Count=" + gc.getCollectionCount()); diff --git a/src/share/demo/management/VerboseGC/VerboseGC.java b/src/share/demo/management/VerboseGC/VerboseGC.java index 9ba2415e7fba9a96745a04434a4823763cadbec5..963389423bae8d2a66c44842ab6e7f7106ac7ae3 100644 --- a/src/share/demo/management/VerboseGC/VerboseGC.java +++ b/src/share/demo/management/VerboseGC/VerboseGC.java @@ -95,9 +95,8 @@ public class VerboseGC { int port = -1; long interval = 5000; // default is 5 second interval long mins = 5; - for (int argIndex = 0; argIndex < args.length; argIndex++) { - String arg = args[argIndex]; - if (args[argIndex].startsWith("-")) { + for (String arg: args) { + if (arg.startsWith("-")) { if (arg.equals("-h") || arg.equals("-help") || arg.equals("-?")) { diff --git a/src/share/demo/nio/zipfs/Demo.java b/src/share/demo/nio/zipfs/Demo.java index dfe77b877ed14553a59314837210fd6682faadf5..394a5f7d013d992533919cfea840e16e348c3a37 100644 --- a/src/share/demo/nio/zipfs/Demo.java +++ b/src/share/demo/nio/zipfs/Demo.java @@ -42,7 +42,6 @@ import java.util.*; import static java.nio.file.StandardOpenOption.*; import static java.nio.file.StandardCopyOption.*; - /* * ZipFileSystem usage demo * @@ -157,7 +156,6 @@ public class Demo { env.put("create", "true"); try (FileSystem fs = provider.newFileSystem(Paths.get(args[1]), env)) { Path path, src, dst; - boolean isRename = false; switch (action) { case rename: src = fs.getPath(args[2]); @@ -303,6 +301,7 @@ public class Demo { final String fStr = (args.length > 3)?args[3]:""; try (DirectoryStream ds = Files.newDirectoryStream(path, new DirectoryStream.Filter() { + @Override public boolean accept(Path path) { return path.toString().contains(fStr); } @@ -358,10 +357,18 @@ public class Demo { return null; } + @SuppressWarnings("unused") + /** + * Not used in demo, but included for demonstrational purposes. + */ private static byte[] getBytes(String name) { return name.getBytes(); } + @SuppressWarnings("unused") + /** + * Not used in demo, but included for demonstrational purposes. + */ private static String getString(byte[] name) { return new String(name); } @@ -534,6 +541,10 @@ public class Demo { Files.createDirectory(path); } + @SuppressWarnings("unused") + /** + * Not used in demo, but included for demonstrational purposes. + */ private static void rmdirs(Path path) throws IOException { while (path != null && path.getNameCount() != 0) { Files.delete(path); @@ -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 { //System.out.printf("checking <%s> vs <%s>...%n", diff --git a/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/EditableAtEndDocument.java b/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/EditableAtEndDocument.java index 8ed93f7900e07de6c0193dac14efff6ce7d8a8ea..fa9bf1d5480c6b47276053d38dbc74f2870075b2 100644 --- a/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/EditableAtEndDocument.java +++ b/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/EditableAtEndDocument.java @@ -38,14 +38,18 @@ import javax.swing.text.*; * document. This is used in ScriptShellPanel class as document for editor. */ public class EditableAtEndDocument extends PlainDocument { + + private static final long serialVersionUID = 5358116444851502167L; private int mark; + @Override public void insertString(int offset, String text, AttributeSet a) throws BadLocationException { int len = getLength(); super.insertString(len, text, a); } + @Override public void remove(int offs, int len) throws BadLocationException { int start = offs; int end = offs + len; diff --git a/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptJConsolePlugin.java b/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptJConsolePlugin.java index bcc6f77dd5a2bd865e16736dc5397e2166ec4848..6bae2c80f8b5d8a2fa33a1784d81ac41fe282fd2 100644 --- a/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptJConsolePlugin.java +++ b/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptJConsolePlugin.java @@ -32,14 +32,10 @@ package com.sun.demo.scripting.jconsole; import com.sun.tools.jconsole.*; -import java.awt.*; -import java.awt.event.*; import java.io.*; -import java.lang.reflect.*; import java.util.concurrent.CountDownLatch; import javax.script.*; import javax.swing.*; -import javax.swing.event.*; import java.util.*; /** @@ -86,6 +82,7 @@ public class ScriptJConsolePlugin extends JConsolePlugin tabs.put("Script Shell", window); new Thread(new Runnable() { + @Override public void run() { // initialize the script engine initScriptEngine(); @@ -103,10 +100,12 @@ public class ScriptJConsolePlugin extends JConsolePlugin window.dispose(); } + @Override public String getPrompt() { return prompt; } + @Override public String executeCommand(String cmd) { String res; try { @@ -176,7 +175,7 @@ public class ScriptJConsolePlugin extends JConsolePlugin String oldFilename = (String) engine.get(ScriptEngine.FILENAME); engine.put(ScriptEngine.FILENAME, ""); try { - Class myClass = this.getClass(); + Class myClass = this.getClass(); InputStream stream = myClass.getResourceAsStream("/resources/jconsole." + extension); if (stream != null) { diff --git a/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptShellPanel.java b/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptShellPanel.java index b36c679c5168385ebd6f396e75e4db64070503d0..54731af539f2a2b00a542828517b4728e0ae9549 100644 --- a/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptShellPanel.java +++ b/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptShellPanel.java @@ -44,8 +44,11 @@ import javax.swing.text.*; * A JPanel subclass containing a scrollable text area displaying the * jconsole's script console. */ + class ScriptShellPanel extends JPanel { + private static final long serialVersionUID = 4116273141148726319L; + // interface to evaluate script command and script prompt interface CommandProcessor { // execute given String as script and return the result @@ -75,9 +78,11 @@ class ScriptShellPanel extends JPanel { add(scroller, BorderLayout.CENTER); editor.getDocument().addDocumentListener(new DocumentListener() { + @Override public void changedUpdate(DocumentEvent e) { } + @Override public void insertUpdate(DocumentEvent e) { if (updating) return; beginUpdate(); @@ -90,10 +95,12 @@ class ScriptShellPanel extends JPanel { // Trim "\\n" combinations final String cmd1 = trimContinuations(cmd); commandExecutor.execute(new Runnable() { + @Override public void run() { final String result = executeCommand(cmd1); SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { if (result != null) { print(result + "\n"); @@ -113,6 +120,7 @@ class ScriptShellPanel extends JPanel { } } + @Override public void removeUpdate(DocumentEvent e) { } }); @@ -121,6 +129,7 @@ class ScriptShellPanel extends JPanel { // the JEditorPane to update the caret's position precisely the // size of the insertion editor.addCaretListener(new CaretListener() { + @Override public void caretUpdate(CaretEvent e) { int len = editor.getDocument().getLength(); if (e.getDot() > len) { @@ -133,6 +142,7 @@ class ScriptShellPanel extends JPanel { hbox.add(Box.createGlue()); JButton button = new JButton("Clear"); // FIXME: i18n? button.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { clear(); } @@ -148,6 +158,7 @@ class ScriptShellPanel extends JPanel { commandExecutor.shutdown(); } + @Override public void requestFocus() { editor.requestFocus(); }