I've added TypeInfo::isInstance(Object) to JBoss Reflect,
so check if it is already available when you implement this:
| if (componentType != null)
| {
| TypeInfoFactory tif = componentType.getTypeInfoFactory();
| TypeInfo childTypeInfo = tif.getTypeInfo(child.getClass());
| if (componentType.isAssignableFrom(childTypeInfo) == false)
| throw new IllegalArgumentException("Illegal child type");
| }
|
vs.
| if (componentType != null && componentType.isInstance(child) == false)
| {
| throw new IllegalArgumentException("Illegal child type");
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192006#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...