Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.InterfaceInfo


      TypeInfoFactory factory = getTypeInfoFactory();
      ClassInfo typeInfo = (ClassInfo) factory.getTypeInfo(clazz);
      InterfaceInfo[] superInterfaces = typeInfo.getGenericInterfaces();
      assertNotNull(superInterfaces);
      assertEquals(1, superInterfaces.length);
      InterfaceInfo superInterface = superInterfaces[0];
      getLog().debug("Checking superInterface: " + genericClass + " against " + superInterface);
      ClassInfo genericClassInfo = (ClassInfo) factory.getTypeInfo(genericClass);
      assertEquals(genericClassInfo, superInterface);

      TypeInfo[] types = new TypeInfo[genericTypes.length];
      for (int i = 0; i < types.length; ++i)
         types[i] = factory.getTypeInfo(genericTypes[i]);
      TypeInfo[] actualTypes = superInterface.getActualTypeArguments();
      getLog().debug("Checking superInterface types: " + Arrays.asList(genericTypes) + " against " + Arrays.asList(actualTypes));
      assertEquals(types.length, actualTypes.length);
      for (int i = 0; i < types.length; ++i)
         assertEquals(types[i], actualTypes[i]);
   }
View Full Code Here

TOP

Related Classes of org.jboss.reflect.spi.InterfaceInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.