"wolfc" wrote : It should then check whether the declaring class is assignable
from the target class.
I'll add this check to ReflectionUtils:
| protected static void checkMember(Object target, Member member, String memberType)
throws Throwable
| {
| if (member == null)
| throw new IllegalArgumentException("Null " + memberType);
|
| if (target != null)
| {
| Class<?> declaringClass = member.getDeclaringClass();
| if (declaringClass.isInstance(target) == false)
| throw new IllegalArgumentException("Target (" +
Strings.defaultToString(target) + ") doesn't match " + memberType + "
's (" + member + ") declaring class.");
| }
|
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157372#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...