Examples of ClassInfo


Examples of org.jboss.reflect.spi.ClassInfo

         else
         {
            MetaType metaType = collectionValue.getMetaType();
            collectionInfo = configuration.getBeanInfo(metaType.getTypeName(), Thread.currentThread().getContextClassLoader());
         }
         ClassInfo classInfo = collectionInfo.getClassInfo();
         Collection collection = (Collection)createNewInstance(collectionInfo);

         TypeInfo componentType = classInfo.getComponentType();
         boolean isObjectTypeInfo = OBJECT_TYPE_INFO.equals(componentType);

         for (MetaValue metaValue : collectionValue)
         {
            TypeInfo iterTypeInfo = isObjectTypeInfo ? getTypeInfo(metaValue.getMetaType(), null) : componentType;
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

   protected Object unwrapTable(TableValue tableValue, TypeInfo type)
   {
      if (type instanceof ParameterizedClassInfo)
      {
         ParameterizedClassInfo parameterizedType = (ParameterizedClassInfo)type;
         ClassInfo rawType = parameterizedType.getRawType();
         if (Map.class.isAssignableFrom(rawType.getType()))
         {
            TypeInfo keyType = parameterizedType.getActualTypeArguments()[0];
            TypeInfo valueType = parameterizedType.getActualTypeArguments()[1];
            return createMap(tableValue, keyType, valueType);
         }
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

    * @throws Throwable for any error
    */
   @SuppressWarnings("deprecation")
   protected Object createNewInstance(BeanInfo beanInfo) throws Throwable
   {
      ClassInfo classInfo = beanInfo.getClassInfo();
      if (classInfo.isInterface())
      {
         InstanceFactory<?> instanceFactory = instanceFactoryMap.get(classInfo.getType());
         if (instanceFactory == null)
            throw new IllegalArgumentException("Cannot instantiate interface BeanInfo, missing InstanceFactory: " + classInfo);

         return instanceFactory.instantiate(beanInfo);
      }
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

    * @throws Throwable for any error
    */
   @SuppressWarnings("deprecation")
   protected Object createNewInstance(BeanInfo beanInfo) throws Throwable
   {
      ClassInfo classInfo = beanInfo.getClassInfo();
      if (classInfo.isInterface())
      {
         InstanceFactory<?> instanceFactory = instanceFactoryMap.get(classInfo.getType());
         if (instanceFactory == null)
            throw new IllegalArgumentException("Cannot instantiate interface BeanInfo, missing InstanceFactory: " + classInfo);

         return instanceFactory.instantiate(beanInfo);
      }
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

      catch (Exception e)
      {
         throw new RuntimeException("Unable to determine component type for " + type, e);
      }
     
      ClassInfo classInfo = configuration.getClassInfo(value.getClass());
      if (classInfo.isArray())
      {
         // See if this is a primitive array
         ArrayInfo arrayInfo = ArrayInfo.class.cast(classInfo);
         TypeInfo compInfo = arrayInfo.getComponentType();
         while(compInfo instanceof ArrayInfo)
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

         cl = Thread.currentThread().getContextClassLoader();
     
      try
      {
         BeanInfo beanInfo = configuration.getBeanInfo(typeName, cl);
         ClassInfo classInfo = beanInfo.getClassInfo();
         Class<?> clazz = classInfo.getType();
         if (classInfo.isInterface())
         {
            // Handle map specially
            if (clazz.isAssignableFrom(Map.class))
               return unwrapCompositeMap(compositeValue);
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

         else
         {
            MetaType metaType = collectionValue.getMetaType();
            collectionInfo = configuration.getBeanInfo(metaType.getTypeName(), Thread.currentThread().getContextClassLoader());
         }
         ClassInfo classInfo = collectionInfo.getClassInfo();
         Collection collection = (Collection)createNewInstance(collectionInfo);

         TypeInfo componentType = classInfo.getComponentType();
         boolean isObjectTypeInfo = OBJECT_TYPE_INFO.equals(componentType);

         for (MetaValue metaValue : collectionValue)
         {
            TypeInfo iterTypeInfo = isObjectTypeInfo ? getTypeInfo(metaValue.getMetaType(), null) : componentType;
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

   protected Object unwrapTable(TableValue tableValue, TypeInfo type)
   {
      if (type instanceof ParameterizedClassInfo)
      {
         ParameterizedClassInfo parameterizedType = (ParameterizedClassInfo)type;
         ClassInfo rawType = parameterizedType.getRawType();
         if (Map.class.isAssignableFrom(rawType.getType()))
         {
            TypeInfo keyType = parameterizedType.getActualTypeArguments()[0];
            TypeInfo valueType = parameterizedType.getActualTypeArguments()[1];
            return createMap(tableValue, keyType, valueType);
         }
View Full Code Here

Examples of org.jboss.xb.binding.introspection.ClassInfo

      }
   }

   public void testFieldInfoNANonRequired() throws Exception
   {
      ClassInfo classInfo = ClassInfos.getClassInfo(A.class);
      assertNull(classInfo.getFieldInfo("field99", false));
   }
View Full Code Here

Examples of org.jreversepro.reflect.ClassInfo

    // If GUI is enabled.
    if (cli.isGuiEnabled()) {
      (new GUIMain(context)).setVisible(true);
      return;
    }
    ClassInfo info;
    try {
      info = context.loadResource(cli.getInputResource());

      System.out.println(context.print(cli.getOutputType(), info));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.