Package org.jboss.metatype.api.types

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


      assertTrue(nameAsDefault.getTransientAttachment(MetaMapper.class) == null);
      MetaType nameAsDefaultType = nameAsDefault.getMetaType();
      log.info("nameAsDefaultType: "+nameAsDefaultType);
      assertTrue(nameAsDefaultType instanceof CompositeMetaType);
      CompositeMetaType nameAsDefaultCMT = (CompositeMetaType) nameAsDefaultType;
      assertTrue(nameAsDefaultCMT.keySet().contains("domain"));
      assertTrue(nameAsDefaultCMT.keySet().contains("keyPropertyList"));
      assertEquals(SimpleMetaType.STRING, nameAsDefaultCMT.getType("domain"));
      assertEquals(PropertiesMetaType.INSTANCE, nameAsDefaultCMT.getType("keyPropertyList"));
      PropertiesMetaValue props = new PropertiesMetaValue();
      props.put("key1", "value1");
View Full Code Here


      MetaType nameAsDefaultType = nameAsDefault.getMetaType();
      log.info("nameAsDefaultType: "+nameAsDefaultType);
      assertTrue(nameAsDefaultType instanceof CompositeMetaType);
      CompositeMetaType nameAsDefaultCMT = (CompositeMetaType) nameAsDefaultType;
      assertTrue(nameAsDefaultCMT.keySet().contains("domain"));
      assertTrue(nameAsDefaultCMT.keySet().contains("keyPropertyList"));
      assertEquals(SimpleMetaType.STRING, nameAsDefaultCMT.getType("domain"));
      assertEquals(PropertiesMetaType.INSTANCE, nameAsDefaultCMT.getType("keyPropertyList"));
      PropertiesMetaValue props = new PropertiesMetaValue();
      props.put("key1", "value1");
      props.put("key2", "value2");
View Full Code Here

      CompositeMetaType metaType = getMetaType();
      StringBuilder buffer = new StringBuilder(getClass().getSimpleName());
      buffer.append(": metaType=[");
      buffer.append(metaType);
      buffer.append("] items=[");
      Iterator<String> keys = metaType.keySet().iterator();
      while(keys.hasNext())
      {
         Object key = keys.next();
         buffer.append(key).append("=");
         Object value = contents.get(key);
View Full Code Here

      CompositeMetaType other = (CompositeMetaType) obj;
      if (this.getTypeName().equals(other.getTypeName()) == false)
         return false;
      Iterator<String> thisNames = this.keySet().iterator();
      Iterator<String> otherNames = other.keySet().iterator();
      while(thisNames.hasNext() && otherNames.hasNext())
      {
         String thisName = thisNames.next();
         String otherName = otherNames.next();
         if (thisName.equals(otherName) == false)
View Full Code Here

      CompositeMetaType metaType = getMetaType();
      StringBuilder buffer = new StringBuilder(getClass().getSimpleName());
      buffer.append(": netaType=[");
      buffer.append(metaType);
      buffer.append("] mappings=[");
      Iterator keys = metaType.keySet().iterator();
      while(keys.hasNext())
      {
         Object key = keys.next();
         buffer.append(key + "=" + contents.get(key));
         if (keys.hasNext())
View Full Code Here

/* 243 */     CompositeMetaType metaType = getMetaType();
/* 244 */     StringBuilder buffer = new StringBuilder(getClass().getSimpleName());
/* 245 */     buffer.append(": metaType=[");
/* 246 */     buffer.append(metaType);
/* 247 */     buffer.append("] items=[");
/* 248 */     Iterator keys = metaType.keySet().iterator();
/* 249 */     while (keys.hasNext())
/*     */     {
/* 251 */       Object key = keys.next();
/* 252 */       buffer.append(key).append("=");
/* 253 */       Object value = this.contents.get(key);
View Full Code Here

/*     */     }
/* 236 */     CompositeMetaType other = (CompositeMetaType)obj;
/* 237 */     if (!getTypeName().equals(other.getTypeName()))
/* 238 */       return false;
/* 239 */     Iterator thisNames = keySet().iterator();
/* 240 */     Iterator otherNames = other.keySet().iterator();
/* 241 */     while ((thisNames.hasNext()) && (otherNames.hasNext()))
/*     */     {
/* 243 */       String thisName = (String)thisNames.next();
/* 244 */       String otherName = (String)otherNames.next();
/* 245 */       if (!thisName.equals(otherName)) {
View Full Code Here

/*  678 */         Class clazz = classInfo.getType();
/*  679 */         Class[] interfaces = { clazz };
/*  680 */         return Proxy.newProxyInstance(clazz.getClassLoader(), interfaces, handler);
/*      */       }
/*  682 */       Object bean = createNewInstance(beanInfo);
/*  683 */       for (String name : compositeMetaType.keySet())
/*      */       {
/*  685 */         MetaValue itemValue = compositeValue.get(name);
/*  686 */         PropertyInfo propertyInfo = beanInfo.getProperty(name);
/*  687 */         Object value = unwrap(itemValue, propertyInfo.getType());
/*  688 */         propertyInfo.set(bean, value);
View Full Code Here

      CompositeMetaType other = (CompositeMetaType) obj;
      if (this.getTypeName().equals(other.getTypeName()) == false)
         return false;
      Iterator<String> thisNames = this.keySet().iterator();
      Iterator<String> otherNames = other.keySet().iterator();
      while(thisNames.hasNext() && otherNames.hasNext())
      {
         String thisName = thisNames.next();
         String otherName = otherNames.next();
         if (thisName.equals(otherName) == false)
View Full Code Here

      CompositeMetaType metaType = getMetaType();
      StringBuilder buffer = new StringBuilder(getClass().getSimpleName());
      buffer.append(": metaType=[");
      buffer.append(metaType);
      buffer.append("] items=[");
      Iterator keys = metaType.keySet().iterator();
      while(keys.hasNext())
      {
         Object key = keys.next();
         buffer.append(key).append("=");
         Object value = contents.get(key);
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.