Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.TypeInfoFactory


      if (cl == null)
         cl = Thread.currentThread().getContextClassLoader();

      try
      {
         TypeInfoFactory tif = configuration.getTypeInfoFactory();
         if (metaType.isArray())
         {
            ArrayMetaType arrayMetaType = (ArrayMetaType)metaType;
            MetaType elementMetaType = arrayMetaType.getElementType();
            String elementTypeName = elementMetaType.getTypeName();
            if (arrayMetaType.isPrimitiveArray())
               elementTypeName = ArrayMetaType.getPrimitiveName(elementTypeName);
            TypeInfo elementTypeInfo = tif.getTypeInfo(elementTypeName, cl);
            int dimension = arrayMetaType.getDimension() - 1; // minus 1, since we already use first in next line
            TypeInfo typeInfo = elementTypeInfo.getArrayType();
            while(dimension > 0)
            {
               typeInfo = typeInfo.getArrayType();
               dimension--;
            }
            return typeInfo;
         }
         return tif.getTypeInfo(metaType.getTypeName(), cl);
      }
      catch (ClassNotFoundException e)
      {
         throw new UndeclaredThrowableException(e);
      }
View Full Code Here


      if (cl == null)
         cl = Thread.currentThread().getContextClassLoader();

      try
      {
         TypeInfoFactory tif = configuration.getTypeInfoFactory();
         if (metaType.isArray())
         {
            ArrayMetaType arrayMetaType = (ArrayMetaType)metaType;
            MetaType elementMetaType = arrayMetaType.getElementType();
            String elementTypeName = elementMetaType.getTypeName();
            if (arrayMetaType.isPrimitiveArray())
               elementTypeName = ArrayMetaType.getPrimitiveName(elementTypeName);
            TypeInfo elementTypeInfo = tif.getTypeInfo(elementTypeName, cl);
            int dimension = arrayMetaType.getDimension() - 1; // minus 1, since we already use first in next line
            TypeInfo typeInfo = elementTypeInfo.getArrayType();
            while(dimension > 0)
            {
               typeInfo = typeInfo.getArrayType();
               dimension--;
            }
            return typeInfo;
         }
         return tif.getTypeInfo(metaType.getTypeName(), cl);
      }
      catch (ClassNotFoundException e)
      {
         throw new UndeclaredThrowableException(e);
      }
View Full Code Here

      }
      else if (trace)
         log.trace("No properties");

      // get Object's class info - it's cached so it shouldn't take much
      TypeInfoFactory tif = classInfo.getTypeInfoFactory();
      TypeInfo objectTI = tif.getTypeInfo(Object.class);

      // methods
      Set<MethodInfo> methods = info.getMethods();
      if (methods != null && methods.isEmpty() == false)
      {
View Full Code Here

      if (cl == null)
         cl = info.getClassInfo().getType().getClassLoader();

      PropertyInfo ainfo = info.getProperty(name);
      ClassInfo classInfo = info.getClassInfo();
      TypeInfoFactory tif = classInfo.getTypeInfoFactory();
      if (tif == null)
         throw new IllegalArgumentException("TypeInfoFactory is null: " + classInfo);

      // check for possible progression
      String[] typeNames = {type};
View Full Code Here

      }
      else if (trace)
         log.trace("No properties");

      // get Object's class info - it's cached so it shouldn't take much
      TypeInfoFactory tif = classInfo.getTypeInfoFactory();
      TypeInfo objectTI = tif.getTypeInfo(Object.class);

      // method plugins
      Iterable<T> methodPlugins = null;

      // methods
View Full Code Here

   {
      if (annotatedElement == null)
      {
         try
         {
            TypeInfoFactory tif = SerializationHelper.getTypeInfoFactory();
            annotatedElement = tif.getTypeInfo(name, componentType.getType().getClassLoader()).getType();
         }
         catch (Throwable t)
         {
            throw new UndeclaredThrowableException(t);
         }
View Full Code Here

      return (name != null ? name.hashCode() : 0);
   }

   Object readResolve()
   {
      TypeInfoFactory typeInfoFactory = SerializationHelper.getTypeInfoFactory();
      return typeInfoFactory.getTypeInfo(getType());
   }
View Full Code Here

      return getType().isInterface();
   }

   Object readResolve()
   {
      TypeInfoFactory typeInfoFactory = IntrospectionTypeInfoFactory.getDelegate();
      return typeInfoFactory.getTypeInfo(getType());
   }
View Full Code Here

      this.configuration = configuration;
   }
  
   public ClassAdapter getClassAdapter(Class clazz)
   {
      TypeInfoFactory typeInfoFactory = configuration.getTypeInfoFactory();
      TypeInfo typeInfo = typeInfoFactory.getTypeInfo(clazz);
      return getClassAdapter(typeInfo);
   }
View Full Code Here

      return getClassAdapter(typeInfo);
   }
  
   public ClassAdapter getClassAdapter(String name, ClassLoader cl) throws ClassNotFoundException
   {
      TypeInfoFactory typeInfoFactory = configuration.getTypeInfoFactory();
      TypeInfo typeInfo = typeInfoFactory.getTypeInfo(name, cl);
      return getClassAdapter(typeInfo);
   }
View Full Code Here

TOP

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

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.