Examples of ArrayInfo


Examples of org.jboss.reflect.spi.ArrayInfo

      Object[] oa;
      if( type instanceof ArrayInfo )
      {
         // Get the Object form of the element
         ArrayInfo arrayInfo = ArrayInfo.class.cast(type);
         TypeInfo etype = arrayInfo.getComponentType();
         int size = Array.getLength(value);
         oa = new Object[size];
         for(int n = 0; n < size; n ++)
         {
            Object nvalue = Array.get(value, n);
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayInfo

     
      ClassInfo classInfo = configuration.getClassInfo(value.getClass());
      if (classInfo.isArray())
      {
         // See if this is a primitive array
         ArrayInfo arrayInfo = ArrayInfo.class.cast(classInfo);
         TypeInfo compInfo = arrayInfo.getComponentType();
         while(compInfo instanceof ArrayInfo)
         {
            arrayInfo = ArrayInfo.class.cast(compInfo);
            compInfo = arrayInfo.getComponentType();
         }
         // Translate
         if (compInfo.isPrimitive())
            oldArray = convertPrimativeArray(classInfo, value);
         else
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayInfo

      Object[] oa;
      if( type instanceof ArrayInfo )
      {
         // Get the Object form of the element
         ArrayInfo arrayInfo = ArrayInfo.class.cast(type);
         TypeInfo etype = arrayInfo.getComponentType();
         int size = Array.getLength(value);
         oa = new Object[size];
         for(int n = 0; n < size; n ++)
         {
            Object nvalue = Array.get(value, n);
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayInfo

     
      ClassInfo classInfo = configuration.getClassInfo(value.getClass());
      if (classInfo.isArray())
      {
         // See if this is a primitive array
         ArrayInfo arrayInfo = ArrayInfo.class.cast(classInfo);
         TypeInfo compInfo = arrayInfo.getComponentType();
         while(compInfo instanceof ArrayInfo)
         {
            arrayInfo = ArrayInfo.class.cast(compInfo);
            compInfo = arrayInfo.getComponentType();
         }
         // Translate
         if (compInfo.isPrimitive())
            oldArray = convertPrimativeArray(classInfo, value);
         else
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayInfo

   {
      if (this == o) return true;
      if (!(o instanceof ArrayInfo)) return false;
      if (!super.equals(o)) return false;

      final ArrayInfo arrayInfo = (ArrayInfo) o;

      if (!componentType.equals(arrayInfo.getComponentType())) return false;

      return true;
   }
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayInfo

   {
      if (this == o) return true;
      if (!(o instanceof ArrayInfo)) return false;
      if (!super.equals(o)) return false;

      final ArrayInfo arrayInfo = (ArrayInfo) o;

      if (!componentType.equals(arrayInfo.getComponentType())) return false;

      return true;
   }
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayInfo

      TypeInfoFactory factory = getTypeInfoFactory();
      byte[] x = {};
      TypeInfo xinfo = factory.getTypeInfo(x.getClass());
      getLog().debug(xinfo);
      assertTrue(xinfo instanceof ArrayInfo);
      ArrayInfo ainfo = (ArrayInfo) xinfo;
      TypeInfo compType = ainfo.getComponentType();
      assertEquals(PrimitiveInfo.BYTE, compType);
   }
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayInfo

      Class<?>[] types = defineClass.getParameterTypes();
      TypeInfoFactory factory = getTypeInfoFactory();
      TypeInfo arg0Info = factory.getTypeInfo(types[0]);
      assertTrue(arg0Info instanceof ArrayInfo);
      getLog().debug(arg0Info);
      ArrayInfo ainfo = (ArrayInfo) arg0Info;
      TypeInfo compType = ainfo.getComponentType();
      assertEquals(PrimitiveInfo.BYTE, compType);
   }
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayInfo

      Type[] types = defineClass.getGenericParameterTypes();
      TypeInfoFactory factory = getTypeInfoFactory();
      TypeInfo arg0Info = factory.getTypeInfo(types[0]);
      assertTrue(arg0Info instanceof ArrayInfo);
      getLog().debug(arg0Info);
      ArrayInfo ainfo = (ArrayInfo) arg0Info;
      TypeInfo compType = ainfo.getComponentType();
      assertEquals(PrimitiveInfo.BYTE, compType);
   }
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayInfo

   public void testArrayType()
   {
      String[] array = {"hello", "world"};
      TypeInfoFactory factory = getTypeInfoFactory();
      ArrayInfo info = (ArrayInfo) factory.getTypeInfo(array.getClass());

      assertEquals(info.getName(), "[Ljava.lang.String;", info.getName());
      TypeInfo info0 = info.getComponentType();
      assertEquals(info0.getName(), "java.lang.String", info0.getName());
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.