[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Bean instantiate order with contextual injection

adrian@jboss.org do-not-reply at jboss.com
Wed Aug 16 11:00:02 EDT 2006


There is, but it is a seperate task to genercize the BeanInfo/ClassInfo:

example:

  | package test;
  | 
  | import java.lang.reflect.Method;
  | import java.lang.reflect.ParameterizedType;
  | import java.lang.reflect.Type;
  | import java.util.List;
  | 
  | public class Test
  | {
  |    public List<String> getSomething()
  |    {
  |       return null;
  |    }
  |    
  |    public static void main(String[] args) throws Exception
  |    {
  |       Class<?> test = Test.class;
  |       Method getSomething = test.getMethod("getSomething", new Class[0]);
  |       ParameterizedType type = (ParameterizedType) getSomething.getGenericReturnType();
  |       for (Type t : type.getActualTypeArguments())
  |          System.out.println(((Class) t).getName());
  |    }
  | }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965499#3965499

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965499



More information about the jboss-dev-forums mailing list