Let the type system know that we don't care what type our classes are.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2262 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -910,7 +910,7 @@ public class Table<T>
|
|||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
serializableClass = Serializable.class;
|
serializableClass = Serializable.class;
|
||||||
Class c = Class.forName("java.lang.reflect.AccessibleObject");
|
Class<?> c = Class.forName("java.lang.reflect.AccessibleObject");
|
||||||
Class[] param = { Boolean.TYPE };
|
Class[] param = { Boolean.TYPE };
|
||||||
setBypass = c.getMethod("setAccessible", param);
|
setBypass = c.getMethod("setAccessible", param);
|
||||||
} catch(Exception ex) {}
|
} catch(Exception ex) {}
|
||||||
|
|||||||
@@ -165,10 +165,10 @@ public class ClassUtil
|
|||||||
* @return the nearest method located, or null if there is no such method.
|
* @return the nearest method located, or null if there is no such method.
|
||||||
*/
|
*/
|
||||||
public static Method getAccessibleMethodFrom (
|
public static Method getAccessibleMethodFrom (
|
||||||
Class clazz, String methodName, Class[] parameterTypes)
|
Class<?> clazz, String methodName, Class[] parameterTypes)
|
||||||
{
|
{
|
||||||
// Look for overridden method in the superclass.
|
// Look for overridden method in the superclass.
|
||||||
Class superclass = clazz.getSuperclass();
|
Class<?> superclass = clazz.getSuperclass();
|
||||||
Method overriddenMethod = null;
|
Method overriddenMethod = null;
|
||||||
|
|
||||||
if (superclass != null && classIsAccessible(superclass)) {
|
if (superclass != null && classIsAccessible(superclass)) {
|
||||||
@@ -185,7 +185,7 @@ public class ClassUtil
|
|||||||
|
|
||||||
// If here, then clazz represents Object, or an interface, or the superclass did not have
|
// If here, then clazz represents Object, or an interface, or the superclass did not have
|
||||||
// an override. Check implemented interfaces.
|
// an override. Check implemented interfaces.
|
||||||
Class[] interfaces = clazz.getInterfaces();
|
Class<?>[] interfaces = clazz.getInterfaces();
|
||||||
for (int i = 0; i < interfaces.length; ++i) {
|
for (int i = 0; i < interfaces.length; ++i) {
|
||||||
overriddenMethod = null;
|
overriddenMethod = null;
|
||||||
|
|
||||||
|
|||||||
@@ -642,7 +642,7 @@ public class StringUtil
|
|||||||
public static void fieldsToString (
|
public static void fieldsToString (
|
||||||
StringBuilder buf, Object object, String sep)
|
StringBuilder buf, Object object, String sep)
|
||||||
{
|
{
|
||||||
Class clazz = object.getClass();
|
Class<?> clazz = object.getClass();
|
||||||
Field[] fields = clazz.getFields();
|
Field[] fields = clazz.getFields();
|
||||||
int written = 0;
|
int written = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user