|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2001, 2008 IBM Corporation and others. |
2 |
* Copyright (c) 2001, 2011 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 73-88
Link Here
|
| 73 |
// doesn't implement A, then the isInstance call will return false. |
73 |
// doesn't implement A, then the isInstance call will return false. |
| 74 |
// |
74 |
// |
| 75 |
// So, instead of using Class.isInstance, do the checking myself. |
75 |
// So, instead of using Class.isInstance, do the checking myself. |
|
|
76 |
final String filterClassName = filterClass.getName(); |
| 76 |
for (Class cl = objectClass; cl != null; cl = cl.getSuperclass()) { |
77 |
for (Class cl = objectClass; cl != null; cl = cl.getSuperclass()) { |
| 77 |
if (cl.getName().equals(filterClass.getName())) { |
78 |
if (cl.getName().equals(filterClassName))return true; |
| 78 |
return true; |
|
|
| 79 |
} |
| 80 |
Class[] clInterfaces = cl.getInterfaces(); |
79 |
Class[] clInterfaces = cl.getInterfaces(); |
| 81 |
for (int i = 0; i < clInterfaces.length; i++) { |
80 |
for (int i = 0; i < clInterfaces.length; i++) { |
| 82 |
if (clInterfaces[i].getName().equals(filterClass.getName())) { |
81 |
if (clInterfaces[i].getName().equals(filterClassName))return true; |
| 83 |
return true; |
82 |
if (isInstance(clInterfaces[i], filterClass))return true; |
| 84 |
} |
|
|
| 85 |
return isInstance(clInterfaces[i], filterClass); |
| 86 |
} |
83 |
} |
| 87 |
} |
84 |
} |
| 88 |
return false; |
85 |
return false; |