Examples of ArrayInfo


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

    * @param propertyType the property type
    * @return the array
    */
   public Object[] getArray(TypeInfo propertyType)
   {
      ArrayInfo arrayInfo = (ArrayInfo) propertyType;
      try
      {
         Object[] result = (Object[]) arrayInfo.newArrayInstance(elements.size());
         for (int i = 0; i < result.length; ++i)
            result[i] = elements.get(i);
         return result;
      }
      catch (Throwable t)
      {
         throw new RuntimeException("Error creating array of type " + arrayInfo.getName() + " from " + elements, t);
      }
   }
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayInfo

/*     */   {
/* 131 */     if (this == o) return true;
/* 132 */     if (!(o instanceof ArrayInfo)) return false;
/* 133 */     if (!super.equals(o)) return false;
/*     */
/* 135 */     ArrayInfo arrayInfo = (ArrayInfo)o;
/*     */
/* 137 */     return this.componentType.equals(arrayInfo.getComponentType());
/*     */   }
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayInfo

/* 144 */     this.parentParticle = parentParticle;
/*     */   }
/*     */
/*     */   public Object[] getArray(TypeInfo propertyType)
/*     */   {
/* 155 */     ArrayInfo arrayInfo = (ArrayInfo)propertyType;
/*     */     try
/*     */     {
/* 158 */       Object[] result = (Object[])(Object[])arrayInfo.newArrayInstance(this.elements.size());
/* 159 */       for (int i = 0; i < result.length; i++)
/* 160 */         result[i] = this.elements.get(i);
/* 161 */       return result;
/*     */     }
/*     */     catch (Throwable t) {
/*     */     }
/* 165 */     throw new RuntimeException("Error creating array of type " + arrayInfo.getName() + " from " + this.elements, t);
/*     */   }
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayInfo

/*     */   {
/* 111 */     if (this == o) return true;
/* 112 */     if (!(o instanceof ArrayInfo)) return false;
/* 113 */     if (!super.equals(o)) return false;
/*     */
/* 115 */     ArrayInfo arrayInfo = (ArrayInfo)o;
/*     */
/* 117 */     return this.componentType.equals(arrayInfo.getComponentType());
/*     */   }
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayInfo

/*  245 */     if (value == null)
/*  246 */       return null;
/*      */     Object[] oa;
/*  249 */     if ((type instanceof ArrayInfo))
/*      */     {
/*  252 */       ArrayInfo arrayInfo = (ArrayInfo)ArrayInfo.class.cast(type);
/*  253 */       TypeInfo etype = arrayInfo.getComponentType();
/*  254 */       int size = Array.getLength(value);
/*  255 */       Object[] oa = new Object[size];
/*  256 */       for (int n = 0; n < size; n++)
/*      */       {
/*  258 */         Object nvalue = Array.get(value, n);
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayInfo

/*      */
/*  321 */     ClassInfo classInfo = configuration.getClassInfo(value.getClass());
/*      */     Object[] oldArray;
/*  322 */     if (classInfo.isArray())
/*      */     {
/*  325 */       ArrayInfo arrayInfo = (ArrayInfo)ArrayInfo.class.cast(classInfo);
/*  326 */       TypeInfo compInfo = arrayInfo.getComponentType();
/*  327 */       while ((compInfo instanceof ArrayInfo))
/*      */       {
/*  329 */         arrayInfo = (ArrayInfo)ArrayInfo.class.cast(compInfo);
/*  330 */         compInfo = arrayInfo.getComponentType();
/*      */       }
/*      */       Object[] oldArray;
/*  333 */       if (compInfo.isPrimitive())
/*  334 */         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
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.