Examples of itemSet()


Examples of org.jboss.metatype.api.types.CompositeMetaType.itemSet()

      else if(mv instanceof CompositeValue)
      {
         CompositeValue cv = CompositeValue.class.cast(mv);
         HashMap<String, Object> itemsMap = new HashMap<String, Object>();
         CompositeMetaType cmt = cv.getMetaType();
         String[] items = new String[cmt.itemSet().size()];
         Object[] itemValues = new Object[items.length];
         cmt.itemSet().toArray(items);
         for(int n = 0; n < items.length; n ++)
         {
            String item = items[n];
View Full Code Here

Examples of org.jboss.metatype.api.types.CompositeMetaType.itemSet()

         CompositeValue cv = CompositeValue.class.cast(mv);
         HashMap<String, Object> itemsMap = new HashMap<String, Object>();
         CompositeMetaType cmt = cv.getMetaType();
         String[] items = new String[cmt.itemSet().size()];
         Object[] itemValues = new Object[items.length];
         cmt.itemSet().toArray(items);
         for(int n = 0; n < items.length; n ++)
         {
            String item = items[n];
            MetaValue itemMV = cv.get(item);
            Object itemValue = null;
View Full Code Here

Examples of org.jboss.metatype.api.types.CompositeMetaType.itemSet()

            ObjectName name = new ObjectName(domainUnwrap, keysUnwrap);
            return name;
         }

         Object bean = createNewInstance(beanInfo);
         for (String name : compositeMetaType.itemSet())
         {
            MetaValue itemValue = compositeValue.get(name);
            PropertyInfo propertyInfo = beanInfo.getProperty(name);
            Object value = unwrap(itemValue, propertyInfo.getType());
            propertyInfo.set(bean, value);
View Full Code Here

Examples of org.jboss.metatype.api.types.CompositeMetaType.itemSet()

   protected Map unwrapCompositeMap(CompositeValue compositeValue)
   {
      HashMap map = new HashMap();
      CompositeMetaType metaType = compositeValue.getMetaType();
      for(String key : metaType.itemSet())
      {
         MetaValue mv = compositeValue.get(key);
         Object value = unwrap(mv);
         map.put(key, value);
      }
View Full Code Here

Examples of org.jboss.metatype.api.types.CompositeMetaType.itemSet()

    * @param clazz the class
    */
   protected void checkDefaultManagedProperties(ManagedObject managedObject, Class<?> clazz)
   {
      CompositeMetaType metaType = assertInstanceOf(resolve(clazz), CompositeMetaType.class);
      Set<String> expectedNames = metaType.itemSet();
      Set<String> propertyNames = managedObject.getPropertyNames();
      getLog().debug("checkDefaultProperties");
      getLog().debug("... expectedNames=" + expectedNames);
      getLog().debug("..... actualNames=" + propertyNames);
      assertEquals("Expected properties " + expectedNames + " got " + propertyNames, expectedNames.size(), propertyNames.size());
View Full Code Here

Examples of org.jboss.metatype.api.types.CompositeMetaType.itemSet()

            Class<?> clazz = classInfo.getType();
            Class<?>[] interfaces = new Class[]{clazz};
            return Proxy.newProxyInstance(clazz.getClassLoader(), interfaces, handler);           
         }
         Object bean = createNewInstance(beanInfo);
         for (String name : compositeMetaType.itemSet())
         {
            MetaValue itemValue = compositeValue.get(name);
            PropertyInfo propertyInfo = beanInfo.getProperty(name);
            Object value = unwrap(itemValue, propertyInfo.getType());
            propertyInfo.set(bean, value);
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.