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
This commit is contained in:
parent
f0f3a77740
commit
d7ec12ae74
@ -1,5 +1,10 @@
|
||||
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,
|
||||
¶meter_types,
|
||||
&return_type);
|
||||
|
||||
// FIXME: for now we have no way to get exception information.
|
||||
exception_types = (JArray<jclass> *) JvNewObjectArray (0, &ClassClass,
|
||||
NULL);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user