Commit d7ec12ae by Tom Tromey Committed by Tom Tromey

Method.java (hashCode): Use getName().

	* java/lang/reflect/Method.java (hashCode): Use getName().
	(toString): Likewise.
	* java/lang/reflect/natMethod.cc (getType): Initialize
	exception_types.

From-SVN: r35561
parent f0f3a777
2000-08-07 Tom Tromey <tromey@cygnus.com>
* java/lang/reflect/Method.java (hashCode): Use getName().
(toString): Likewise.
* java/lang/reflect/natMethod.cc (getType): Initialize
exception_types.
* java/lang/reflect/Method.java (toString): Use Class.getName, not
Class.toString.
* java/lang/reflect/Field.java (toString): Correct formatting.
......
......@@ -65,7 +65,7 @@ public final class Method extends AccessibleObject implements Member
public int hashCode ()
{
// FIXME.
return name.hashCode() + declaringClass.getName().hashCode();
return getName().hashCode() + declaringClass.getName().hashCode();
}
public native Object invoke (Object obj, Object[] args)
......@@ -84,7 +84,7 @@ public final class Method extends AccessibleObject implements Member
b.append(" ");
b.append(declaringClass.getName());
b.append(".");
b.append(name);
b.append(getName());
b.append("(");
for (int i = 0; i < parameter_types.length; ++i)
{
......
......@@ -203,6 +203,10 @@ java::lang::reflect::Method::getType ()
declaringClass,
&parameter_types,
&return_type);
// FIXME: for now we have no way to get exception information.
exception_types = (JArray<jclass> *) JvNewObjectArray (0, &ClassClass,
NULL);
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment