Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.TypeInfoFactory


      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

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

   Object readResolve()
   {
      TypeInfoFactory typeInfoFactory = SerializationHelper.getTypeInfoFactory();
      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

   }

   @SuppressWarnings("deprecation")
   Object readResolve()
   {
      TypeInfoFactory typeInfoFactory = IntrospectionTypeInfoFactory.getDelegate();
      return typeInfoFactory.getTypeInfo(getType());
   }
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

   }
  
   @SuppressWarnings("deprecation")
   protected TypeInfo testBasics(Class<?> clazz, TypeInfo expected) throws Throwable
   {
      TypeInfoFactory factory = getTypeInfoFactory();
      getLog().debug("Using typeInfoFactory: " + factory);
     
      TypeInfo info = factory.getTypeInfo(clazz.getName(), getClass().getClassLoader());
      getLog().debug("Got: " + info + " from " + clazz);
      assertNotNull(info);
      assertEquals(info, expected);

      ClassLoader cl = getClass().getClassLoader();
      info = factory.getTypeInfo(clazz);
      getLog().debug("Got: " + info + " from " + clazz.getName() + " cl=" + cl);
      assertNotNull(info);
      assertEquals(info, expected);
     
      getLog().debug("Name: " + info.getName());
View Full Code Here

      assertNull(packageInfo);
   }
  
   protected void assertSuperClass(Class<?> clazz, ClassInfo classInfo) throws Throwable
   {
      TypeInfoFactory factory = getTypeInfoFactory();
      Class<?> superClass = clazz.getSuperclass();
      TypeInfo superType = classInfo.getSuperclass();
      getLog().debug(clazz + " superClass: " + superClass + " superType=" + superType);
      if (superClass == null)
      {
         assertNull(classInfo.getSuperclass());
         return;
      }
      TypeInfo expected = factory.getTypeInfo(clazz.getSuperclass());

      TypeInfo actual = classInfo.getSuperclass();
      assertEquals(expected, actual);
   }
View Full Code Here

      assertEquals(expected, actual);
   }
  
   protected void assertInterfaces(Class<?> clazz, ClassInfo classInfo) throws Throwable
   {
      TypeInfoFactory factory = getTypeInfoFactory();
      Set<TypeInfo> expected = new HashSet<TypeInfo>();
      for (Class<?> c : clazz.getInterfaces())
      {
         TypeInfo type = factory.getTypeInfo(c);
         expected.add(type);
      }
     
      InterfaceInfo[] interfaces = classInfo.getInterfaces();
      if (expected.isEmpty())
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.