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 /vm | |
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 'vm')
-rw-r--r-- | vm/reference/gnu/classpath/jdwp/VMVirtualMachine.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/vm/reference/gnu/classpath/jdwp/VMVirtualMachine.java b/vm/reference/gnu/classpath/jdwp/VMVirtualMachine.java index c49298288..7b1ba9f64 100644 --- a/vm/reference/gnu/classpath/jdwp/VMVirtualMachine.java +++ b/vm/reference/gnu/classpath/jdwp/VMVirtualMachine.java @@ -46,8 +46,8 @@ import gnu.classpath.jdwp.exception.InvalidMethodException; import gnu.classpath.jdwp.exception.JdwpException; import gnu.classpath.jdwp.util.MethodResult; import gnu.classpath.jdwp.util.MonitorInfo; +import gnu.classpath.jdwp.value.Value; -import java.lang.reflect.Method; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collection; @@ -284,21 +284,23 @@ public class VMVirtualMachine throws JdwpException; /** - * Executes a method in the virtual machine + * Executes a method in the virtual machine. The thread must already + * be suspended by a previous event. When the method invocation is + * complete, the thread (or all threads if INVOKE_SINGLE_THREADED is + * not set in options) must be suspended before this method returns. * * @param obj instance in which to invoke method (null for static) * @param thread the thread in which to invoke the method * @param clazz the class in which the method is defined * @param method the method to invoke * @param values arguments to pass to method - * @param nonVirtual "otherwise, normal virtual invoke - * (instance methods only) " + * @param options invocation options * @return a result object containing the results of the invocation */ - public static native MethodResult executeMethod(Object obj, Thread thread, - Class clazz, Method method, - Object[] values, - boolean nonVirtual) + public static native MethodResult executeMethod (Object obj, Thread thread, + Class clazz, VMMethod method, + Value[] values, + int options) throws JdwpException; /** |