Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.TypeInfo


         // See if this is a Map<String,?> type
         ClassInfo classInfo = (ClassInfo) typeInfo;
         TypeInfo[] types = classInfo.getActualTypeArguments();
         if (types != null)
         {
            TypeInfo keyType = types[0];
            TypeInfo valueType = types[1];
            if(keyType.getName().equals(String.class.getName()))
            {
               // Use MapCompositeMetaType
               MetaType valueMetaType = resolve(valueType);
               return new MapCompositeMetaType(valueMetaType);
View Full Code Here


    */
   @SuppressWarnings("unchecked")
   public ArrayMetaType generateArray(ArrayInfo typeInfo)
   {
      int dimension = 1;
      TypeInfo componentType = typeInfo.getComponentType();
      while (componentType.isArray())
      {
         ++dimension;
         componentType = ((ArrayInfo) componentType).getComponentType();
      }
      MetaType componentMetaType = resolve(componentType);
      boolean isPrimitive = componentType.isPrimitive();
      return new ArrayMetaType(dimension, componentMetaType, isPrimitive);
   }
View Full Code Here

    * @return the metatype
    */
   @SuppressWarnings("unchecked")
   public CollectionMetaType generateCollection(ClassInfo typeInfo)
   {
      TypeInfo elementType = objectTypeInfo;
     
      TypeInfo[] types = typeInfo.getActualTypeArguments();
      if (types != null)
         elementType = types[0];
     
View Full Code Here

    * @param typeInfo the type info
    * @return the metatype
    */
   public TableMetaType generateMap(ClassInfo typeInfo)
   {
      TypeInfo keyType = objectTypeInfo;
      TypeInfo valueType = objectTypeInfo;
     
      TypeInfo[] types = typeInfo.getActualTypeArguments();
      if (types != null)
      {
         keyType = types[0];
View Full Code Here

                  String compositeValueName = compositeValue.name();
                  if (MetaTypeConstants.DEFAULT.equals(compositeValueName) == false)
                     name = compositeValueName;
               }

               TypeInfo itemTypeInfo = property.getType();
               MetaType metaType = resolve(itemTypeInfo);
               result.addItem(name, name, metaType);
               if (property.isAnnotationPresent(CompositeKey.class))
               {
                  if (keys == null)
View Full Code Here

   {
      try
      {
         if (ctClass.isArray())
         {
            TypeInfo componentType = getTypeInfo(ctClass.getComponentType());
           
            Class[] types = new Class[] { JavassistTypeInfoFactoryImpl.class, CtClass.class, Class.class, TypeInfo.class };
            Constructor con = JavassistArrayInfoImpl.class.getDeclaredConstructor(types);
           
            Object[] args = new Object[] {this, ctClass, null, componentType};
View Full Code Here

      if (name == null)
         throw new IllegalArgumentException("Null class name");
      if (cl == null)
         cl = Thread.currentThread().getContextClassLoader();

      TypeInfo primitive = PrimitiveInfo.valueOf(name);
      if (primitive != null)
         return primitive;

      NumberInfo number = NumberInfo.valueOf(name);
      if (number != null)
View Full Code Here

   public TypeInfo getTypeInfo(CtClass clazz)
   {
      if (clazz == null)
         throw new IllegalArgumentException("Null class");

      TypeInfo primitive = PrimitiveInfo.valueOf(clazz.getName());
      if (primitive != null)
         return primitive;

      NumberInfo number = NumberInfo.valueOf(clazz.getName());
      if (number != null)
View Full Code Here

   }
  
   protected ConstructorInfo getConstructorInfo()
   {
      ClassInfo classInfo = configuration.getClassInfo(SignatureTester.class);
      TypeInfo calendarTypeInfo = configuration.getTypeInfo(Calendar.class);
      return classInfo.getDeclaredConstructor(new TypeInfo[]{calendarTypeInfo});
   }
View Full Code Here

   }

   protected MethodInfo getMethodInfo()
   {
      ClassInfo classInfo = configuration.getClassInfo(SignatureTester.class);
      TypeInfo calendarTypeInfo = configuration.getTypeInfo(Calendar.class);
      TypeInfo timeZoneTypeInfo = configuration.getTypeInfo(TimeZone.class);
      return classInfo.getDeclaredMethod("applyTimeZone", new TypeInfo[]{calendarTypeInfo, timeZoneTypeInfo});
   }
View Full Code Here

TOP

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

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.