Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.TypeInfoFactory


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

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

      if (mapping == null)
         return null;
     
      try
      {
         TypeInfoFactory factory = classInfo.getTypeInfoFactory();
         ClassInfo mapperClass = (ClassInfo) factory.getTypeInfo(mapping.value());
         ConstructorInfo constructor = mapperClass.getDeclaredConstructor(null);
         mapper = (MetaMapper<?>) constructor.newInstance(null);
         typeInfo.setAttachment(MetaMapper.class.getName(), mapper);
         return mapper;
      }
View Full Code Here

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

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

      checkUnload( weakReferenceOnLoader,"org.jboss.test.classinfo.support.SimpleBean","./leak-report.html");         
   }
  
   protected ClassInfo getClassInfo(ClassLoader loader,Class<?> clazz)
   {
      TypeInfoFactory factory = getTypeInfoFactory();
      TypeInfo info=null;
      try{
          info = factory.getTypeInfo(clazz.getName(),loader);
      }catch(Exception e){
          System.out.println(e);
      }
      assertNotNull(info);
      assertTrue(info instanceof ClassInfo);
View Full Code Here

      assertEquals(bean.toString(), joinpoint.dispatch());
   }

   protected JoinpointFactory getJointpointFactory(Class<?> clazz)
   {
      TypeInfoFactory typeFactory = getTypeInfoFactory();
      ClassInfo info = (ClassInfo) typeFactory.getTypeInfo(clazz);
      return new BasicJoinpointFactory(info);
   }
View Full Code Here

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

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

/*     */
/* 711 */     if (cl == null) {
/* 712 */       cl = info.getClassInfo().getType().getClassLoader();
/*     */     }
/* 714 */     Set properties = info.getProperties();
/*     */     TypeInfoFactory tif;
/* 715 */     if ((properties != null) && (properties.size() > 0))
/*     */     {
/* 717 */       ClassInfo classInfo = info.getClassInfo();
/* 718 */       tif = classInfo.getTypeInfoFactory();
/* 719 */       if (tif == null) {
View Full Code Here

/* 72 */     return getType().isInterface();
/*    */   }
/*    */
/*    */   Object readResolve()
/*    */   {
/* 77 */     TypeInfoFactory typeInfoFactory = IntrospectionTypeInfoFactory.getDelegate();
/* 78 */     return typeInfoFactory.getTypeInfo(getType());
/*    */   }
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.