summaryrefslogtreecommitdiffstats
path: root/libjava/gnu/classpath
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/gnu/classpath')
-rw-r--r--libjava/gnu/classpath/jdwp/VMMethod.h1
-rw-r--r--libjava/gnu/classpath/jdwp/VMMethod.java13
-rw-r--r--libjava/gnu/classpath/jdwp/util/Location.h1
3 files changed, 14 insertions, 1 deletions
diff --git a/libjava/gnu/classpath/jdwp/VMMethod.h b/libjava/gnu/classpath/jdwp/VMMethod.h
index f1bf3d76cfd..00f4d874c08 100644
--- a/libjava/gnu/classpath/jdwp/VMMethod.h
+++ b/libjava/gnu/classpath/jdwp/VMMethod.h
@@ -49,6 +49,7 @@ public:
virtual ::java::lang::String * toString();
virtual void writeId(::java::io::DataOutputStream *);
static ::gnu::classpath::jdwp::VMMethod * readId(::java::lang::Class *, ::java::nio::ByteBuffer *);
+ virtual jboolean equals(::java::lang::Object *);
static const jint SIZE = 8;
private:
::java::lang::Class * __attribute__((aligned(__alignof__( ::java::lang::Object)))) _class;
diff --git a/libjava/gnu/classpath/jdwp/VMMethod.java b/libjava/gnu/classpath/jdwp/VMMethod.java
index d345bc1b515..6a2b04ecf97 100644
--- a/libjava/gnu/classpath/jdwp/VMMethod.java
+++ b/libjava/gnu/classpath/jdwp/VMMethod.java
@@ -1,5 +1,5 @@
/* VMMethod.java -- a method in a virtual machine
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -175,4 +175,15 @@ public class VMMethod
{
return VMVirtualMachine.getClassMethod(klass, bb.getLong());
}
+
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof VMMethod)
+ {
+ VMMethod m = (VMMethod) obj;
+ return (getId() == m.getId());
+ }
+
+ return false;
+ }
}
diff --git a/libjava/gnu/classpath/jdwp/util/Location.h b/libjava/gnu/classpath/jdwp/util/Location.h
index 4b742748250..2e8710533aa 100644
--- a/libjava/gnu/classpath/jdwp/util/Location.h
+++ b/libjava/gnu/classpath/jdwp/util/Location.h
@@ -43,6 +43,7 @@ public:
virtual ::gnu::classpath::jdwp::VMMethod * getMethod();
virtual jlong getIndex();
virtual ::java::lang::String * toString();
+ virtual jboolean equals(::java::lang::Object *);
private:
::gnu::classpath::jdwp::VMMethod * __attribute__((aligned(__alignof__( ::java::lang::Object)))) method;
jlong index;
OpenPOWER on IntegriCloud