diff options
author | Keith Seitz <keiths@redhat.com> | 2007-06-19 21:57:15 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2007-06-19 21:57:15 +0000 |
commit | a622dee98c655a7140b61402adcf7cab5324726c (patch) | |
tree | df7dc19c03e00e50b9a2736cf0122b0f15760abb /gnu/classpath/jdwp/util/MethodResult.java | |
parent | 69b614d897811e1e8af95be6264c5668ce98f336 (diff) | |
download | classpath-a622dee98c655a7140b61402adcf7cab5324726c.tar.gz |
* gnu/classpath/jdwp/processor/ClassTypeCommandSet.java
(executeInvokeMethod): No need to use ValueFactory any more;
MethodResult.getReturnedValue now returns a Value.
(executeNewInstance): Double-check that return result is
an ObjectValue; throw JdwpInternalErrorException if it is not.
(invokeMethod): Method IDs come from VMMethod, not VMIdManager.
Arguments are Values not Objects.
Use ValueFactory to create arguments.
Pass invocation options to VMVirtualMachine.executeMethod.
Don't do any thread suspend/resume work: VMVM.executeMethod
will take care of it.
* gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
(executeInvokeMethod): Method IDs come from VMMethod, not
VMIdManager.
Arguments should be Values instead of Objects.
Use ValueFactory to create Values.
Remove specific option handling and pass options to
VMVirtualMachine.executeMethod.
Remove thread suspension.
Use MethodResult.getReturnedValue to get method's result.
* gnu/classpath/jdwp/util/MethodResult.java
(returnedValue): Change type to Value.
(thrownException): Change type to Throwable.
(resType): Remove.
(MethodResult): New constructor.
(setReturnedValue): Remove.
(SetThrownException): Remove.
(getResultType): Remove.
(setResultType): Remove.
* gnu/classpath/jdwp/value/ObjectValue.java (getValue):
New method.
* vm/reference/gnu/classpath/jdwp/VMVirtualMachine.java
(executeMethod): Replace "nonVirtual" parameter with more
generic "options" parameter.
Replace java.lang.reflect.Method parameter with VMMethod.
Replace Objet[] parameter with Value[] parameter.
Diffstat (limited to 'gnu/classpath/jdwp/util/MethodResult.java')
-rw-r--r-- | gnu/classpath/jdwp/util/MethodResult.java | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/gnu/classpath/jdwp/util/MethodResult.java b/gnu/classpath/jdwp/util/MethodResult.java index 190511de8..bf3ee8ed5 100644 --- a/gnu/classpath/jdwp/util/MethodResult.java +++ b/gnu/classpath/jdwp/util/MethodResult.java @@ -1,6 +1,6 @@ /* MethodResult.java -- class to wrap around values returned from a Method call in the VM - Copyright (C) 2005 Free Software Foundation + Copyright (C) 2005, 2007 Free Software Foundation This file is part of GNU Classpath. @@ -40,6 +40,8 @@ exception statement from your version. */ package gnu.classpath.jdwp.util; +import gnu.classpath.jdwp.value.Value; + /** * A class to wrap around values returned from a Method call in the VM. * @@ -48,42 +50,37 @@ package gnu.classpath.jdwp.util; public class MethodResult { // The Object returned by the executing method - private Object returnedValue; + private Value returnedValue; // Any Exception that was thrown by the executing method - private Exception thrownException; + private Throwable thrownException; - // The type of this result - private Class resType; - - public Object getReturnedValue() + /** + * Constructs a new MethodResult object + * + * @param return_value the return value of the method invocation + * @param exc exception thrown during the invocation (or null if none) + */ + public MethodResult (Value return_value, Throwable exc) { - return returnedValue; + returnedValue = return_value; + thrownException = exc; } - public void setReturnedValue(Object returnedValue) + /** + * Returns the return value of the method invocation + */ + public Value getReturnedValue() { - this.returnedValue = returnedValue; + return returnedValue; } - public Exception getThrownException() + /** + * Returns the exception thrown during the method invocation + * (or null if none) + */ + public Throwable getThrownException() { return thrownException; } - - public void setThrownException(Exception thrownException) - { - this.thrownException = thrownException; - } - - public Class getResultType() - { - return resType; - } - - public void setResultType(Class type) - { - resType = type; - } - } |