Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.TypeInfoFactory


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


/* 660 */     return this.name != null ? this.name.hashCode() : 0;
/*     */   }
/*     */
/*     */   Object readResolve()
/*     */   {
/* 665 */     TypeInfoFactory typeInfoFactory = SerializationHelper.getTypeInfoFactory();
/* 666 */     return typeInfoFactory.getTypeInfo(getType());
/*     */   }
View Full Code Here

/*  870 */     if (cl == null) {
/*  871 */       cl = Thread.currentThread().getContextClassLoader();
/*      */     }
/*      */     try
/*      */     {
/*  875 */       TypeInfoFactory tif = configuration.getTypeInfoFactory();
/*  876 */       if (metaType.isArray())
/*      */       {
/*  878 */         ArrayMetaType arrayMetaType = (ArrayMetaType)metaType;
/*  879 */         MetaType elementMetaType = arrayMetaType.getElementType();
/*  880 */         String elementTypeName = elementMetaType.getTypeName();
/*  881 */         if (arrayMetaType.isPrimitiveArray())
/*  882 */           elementTypeName = ArrayMetaType.getPrimitiveName(elementTypeName);
/*  883 */         TypeInfo elementTypeInfo = tif.getTypeInfo(elementTypeName, cl);
/*  884 */         int dimension = arrayMetaType.getDimension() - 1;
/*  885 */         TypeInfo typeInfo = elementTypeInfo.getArrayType();
/*  886 */         while (dimension > 0)
/*      */         {
/*  888 */           typeInfo = typeInfo.getArrayType();
/*  889 */           dimension--;
/*      */         }
/*  891 */         return typeInfo;
/*      */       }
/*  893 */       return tif.getTypeInfo(metaType.getTypeName(), cl);
/*      */     }
/*      */     catch (ClassNotFoundException e) {
/*      */     }
/*  897 */     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

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.