Package org.jboss.metatype.api.values

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


      MetaValue[] itemValues = { SimpleValueSupport.wrap("Hello") };
      CompositeValue helloValue = new CompositeValueSupport(compositeType, itemNames, itemValues);
      itemValues = new MetaValue[] { SimpleValueSupport.wrap("Goodbye") };
      CompositeValue goodbyeValue = new CompositeValueSupport(compositeType, itemNames, itemValues);
      MetaValue[] metaArray = { helloValue, goodbyeValue };
      CollectionValueSupport expected = new CollectionValueSupport(arrayType, metaArray);
     
      MetaValue result = createMetaValue(collection, type);
      CollectionValue actual = assertInstanceOf(result, CollectionValue.class);
      getLog().debug("Collection Value: " + actual);
      assertEquals(expected, actual);
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

         metaValue.put("type", SimpleValueSupport.wrap(mcfpmd.getType()));
         values.add(metaValue);
      }
      MetaValue[] elements = new MetaValue[values.size()];
      values.toArray(elements);
      CollectionValueSupport cvalue = new CollectionValueSupport(type, elements);
      return cvalue;
   }
View Full Code Here

            tmp.add(cvs);
         }
      }
      MetaValue[] elements = new MetaValue[tmp.size()];
      tmp.toArray(elements);
      CollectionValueSupport msgs = new CollectionValueSupport(TYPE, elements);
      return msgs;
   }
View Full Code Here

                  }
               }
            }
            GenericValue[] beanMOs = new GenericValue[tmpBeans.size()];
            tmpBeans.toArray(beanMOs);
            CollectionValueSupport values = new CollectionValueSupport(beansType, beanMOs);
            beansMP.setValue(values);
            // Update the bean factory properties
            bmdfMMO.setProperties(newProps);
         }
      }
      GenericValue[] mos = new GenericValue[tmpBFs.size()];
      tmpBFs.toArray(mos);
      CollectionValueSupport values = new CollectionValueSupport(beansFactoryType, mos);
      // This bypasses the write through back to the metadata
      beanFactoriesMP.getFields().setField(Fields.VALUE, values);
   }
View Full Code Here

         {
            elementList.add(
                  createMetaValue(element, type.getElementType()));
        
      }
      return new CollectionValueSupport(type, elementList.toArray(new MetaValue[elementList.size()]));
   }
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

               ManagedObject mo = mof.initManagedObject((Serializable) element, null, null);
               tmp.add(new GenericValueSupport(AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE, mo));
            }
            GenericValueSupport[] mos = new GenericValueSupport[tmp.size()];
            CollectionMetaType moType = new CollectionMetaType(propertyType.getClassName(), AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE);
            return new CollectionValueSupport(moType, tmp.toArray(mos));
         }
      }

      return metaValueFactory.create(value, propertyInfo.getType());
   }
View Full Code Here

               ManagedObject mo = initManagedObject((Serializable) element, null, null);
               tmp.add(new GenericValueSupport(MANAGED_OBJECT_META_TYPE, mo));
            }
            GenericValueSupport[] mos = new GenericValueSupport[tmp.size()];
            CollectionMetaType moType = new CollectionMetaType(propertyType.getClassName(), MANAGED_OBJECT_META_TYPE);
            return new CollectionValueSupport(moType, tmp.toArray(mos));
         }
      }

      return metaValueFactory.create(value, propertyInfo.getType());
   }
View Full Code Here

/* 749 */           ManagedObject mo = initManagedObject((Serializable)element, null, null);
/* 750 */           tmp.add(new GenericValueSupport(MANAGED_OBJECT_META_TYPE, mo));
/*     */         }
/* 752 */         GenericValueSupport[] mos = new GenericValueSupport[tmp.size()];
/* 753 */         CollectionMetaType moType = new CollectionMetaType(propertyType.getClassName(), MANAGED_OBJECT_META_TYPE);
/* 754 */         return new CollectionValueSupport(moType, (MetaValue[])tmp.toArray(mos));
/*     */       }
/*     */     }
/*     */
/* 758 */     return this.metaValueFactory.create(value, propertyInfo.getType());
/*     */   }
View Full Code Here

TOP

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

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.