Package org.jboss.metatype.api.values

Examples of org.jboss.metatype.api.values.CollectionValue


/* 107 */     if ((!(obj instanceof Collection)) && (!(obj instanceof CollectionValue))) {
/* 108 */       return false;
/*     */     }
/* 110 */     if ((obj instanceof CollectionValue))
/*     */     {
/* 112 */       CollectionValue cv = (CollectionValue)obj;
/* 113 */       return equals(cv.getMetaType());
/*     */     }
/*     */
/* 116 */     Collection collection = (Collection)obj;
/* 117 */     for (Iterator i$ = collection.iterator(); i$.hasNext(); ) { Object element = i$.next();
/*     */
View Full Code Here


/*     */       {
/* 346 */         CollectionMetaType amt = (CollectionMetaType)propType;
/* 347 */         MetaType etype = amt.getElementType();
/* 348 */         if (etype == AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE)
/*     */         {
/* 350 */           CollectionValue avalue = (CollectionValue)prop.getValue();
/* 351 */           if (avalue != null)
/*     */           {
/* 353 */             MetaValue[] elements = avalue.getElements();
/* 354 */             for (int n = 0; n < avalue.getSize(); n++)
/*     */             {
/* 356 */               GenericValue gv = (GenericValue)elements[n];
/* 357 */               ManagedObject propMO = (ManagedObject)gv.getValue();
/* 358 */               if (propMO != null)
/* 359 */                 processManagedObject(propMO, md);
View Full Code Here

/*      */
/*  226 */       TypeInfo typeInfo = configuration.getTypeInfo(ce.getClass());
/*  227 */       MetaType metaType = this.metaTypeFactory.resolve(typeInfo);
/*  228 */       elements[(i++)] = internalCreate(ce, typeInfo, metaType);
/*      */     }
/*  230 */     CollectionValue result = new CollectionValueSupport(type, elements);
/*  231 */     mapping.put(value, result);
/*  232 */     return result;
/*      */   }
View Full Code Here

/*  562 */       CompositeValue compositeValue = (CompositeValue)metaValue;
/*  563 */       return unwrapComposite(compositeValue, type);
/*      */     }
/*  565 */     if (metaType.isCollection())
/*      */     {
/*  567 */       CollectionValue collectionValue = (CollectionValue)metaValue;
/*  568 */       return unwrapCollection(collectionValue, type);
/*      */     }
/*  570 */     if (metaType.isTable())
/*      */     {
/*  572 */       TableValue tableValue = (TableValue)metaValue;
View Full Code Here

      if (obj instanceof Collection == false && (obj instanceof CollectionValue) == false)
         return false;

      if (obj instanceof CollectionValue)
      {
         CollectionValue cv = (CollectionValue)obj;
         return equals(cv.getMetaType());
      }

      Collection collection = (Collection)obj;
      for(Object element : collection)
      {
View Full Code Here

         // recalculate element info, since usually more deterministic
         TypeInfo typeInfo = configuration.getTypeInfo(ce.getClass());
         MetaType metaType = metaTypeFactory.resolve(typeInfo);
         elements[i++] = internalCreate(ce, typeInfo, metaType);            
      }
      CollectionValue result = new CollectionValueSupport(type, elements);
      mapping.put(value, result);
      return result;
   }
View Full Code Here

         CompositeValue compositeValue = (CompositeValue)metaValue;
         return unwrapComposite(compositeValue, type);
      }
      else if (metaType.isCollection())
      {
         CollectionValue collectionValue = (CollectionValue)metaValue;
         return unwrapCollection(collectionValue, type);
      }
      else if (metaType.isTable())
      {
         TableValue tableValue = (TableValue)metaValue;
View Full Code Here

TOP

Related Classes of org.jboss.metatype.api.values.CollectionValue

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.