[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Install Items
alesj
do-not-reply at jboss.com
Thu Apr 19 16:48:56 EDT 2007
Would this work:
| MethodInfo mi = Configurator.findMethodInfo(getClassInfo(context), methodName, new String[]{signature});
| TypeInfo info = mi.getParameterTypes()[0];
| Class parameterType = info.getType();
| if (Collection.class.isAssignableFrom(parameterType))
| {
| if (info instanceof ParameterizedArrayInfo)
| {
| ParameterizedArrayInfo pai = (ParameterizedArrayInfo)info;
| callback = CollectionCallbackItemFactory.createCollectionCallbackItem(parameterType, pai.getComponentType().getType(), whenRequired, dependentState, context, methodName);
| }
| else
| throw new IllegalArgumentException("Unable to determine collection element class type: " + this);
| }
|
Or how to get element class type?
Is this (the only) way?
- http://www.jboss.org/index.html?module=bb&op=viewtopic&t=88613&postdays=0&postorder=asc&start=30
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039045#4039045
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039045
More information about the jboss-dev-forums
mailing list