Examples of ArrayInfo


Examples of org.jboss.reflect.spi.ArrayInfo

   }
   public void test2DArrayType()
   {
      String[][] array = {{"hello"}, {"world"}};
      TypeInfoFactory factory = getTypeInfoFactory();
      ArrayInfo info = (ArrayInfo) factory.getTypeInfo(array.getClass());
     
      assertEquals(info.getName(), "[[Ljava.lang.String;", info.getName());
      ArrayInfo info0 = (ArrayInfo) info.getComponentType();
      assertEquals(info0.getName(), "[Ljava.lang.String;", info0.getName());
      TypeInfo info1 = info0.getComponentType();
      assertEquals(info1.getName(), "java.lang.String", info1.getName());
   }
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayInfo

     
      assertTrue(info.isArray());
      assertFalse(info.isEnum());
      assertFalse(info.isPrimitive());
     
      ArrayInfo arrayInfo = (ArrayInfo) info;
      assertEquals(componentType, arrayInfo.getComponentType());
      assertClassInfo(arrayInfo, arrayClass);
   }
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

      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

   {
      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

      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
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.