Constructor.java (toString): Use `getName' for parameter types.

* java/lang/reflect/Constructor.java (toString): Use `getName' for
	parameter types.
	* java/lang/reflect/Method.java (toString): Use `getName' for
	return type.

From-SVN: r36214
This commit is contained in:
Tom Tromey 2000-09-06 22:24:34 +00:00 committed by Tom Tromey
parent dbb4d33a9b
commit 9579ea7efd
3 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,10 @@
2000-09-06 Tom Tromey <tromey@cygnus.com>
* java/lang/reflect/Constructor.java (toString): Use `getName' for
parameter types.
* java/lang/reflect/Method.java (toString): Use `getName' for
return type.
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Accept null
`args' if method takes no parameters.

View File

@ -1,6 +1,6 @@
// Constructor.java - Represents a constructor for a class.
/* Copyright (C) 1998, 1999 Free Software Foundation
/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
This file is part of libgcj.
@ -79,7 +79,7 @@ public final class Constructor extends AccessibleObject implements Member
b.append("(");
for (int i = 0; i < parameter_types.length; ++i)
{
b.append(parameter_types[i].toString());
b.append(parameter_types[i].getName());
if (i < parameter_types.length - 1)
b.append(",");
}

View File

@ -80,7 +80,7 @@ public final class Method extends AccessibleObject implements Member
StringBuffer b = new StringBuffer ();
Modifier.toString(getModifiers(), b);
b.append(" ");
b.append(return_type.toString());
b.append(return_type.getName());
b.append(" ");
b.append(declaringClass.getName());
b.append(".");