Package org.jboss.metatype.api.types

Examples of org.jboss.metatype.api.types.ImmutableCompositeMetaType


   protected CompositeMetaType initRowType() throws Exception
   {
      String[] itemNames = new String[] { "name1", "name2" };
      String[] itemDescriptions = new String[] { "desc1", "desc2" };
      MetaType[] itemTypes = new MetaType[] { SimpleMetaType.STRING, SimpleMetaType.INTEGER };
      CompositeMetaType rowType = new ImmutableCompositeMetaType("rowTypeName", "rowDescription", itemNames, itemDescriptions, itemTypes);
      return rowType;
   }
View Full Code Here


   protected CompositeMetaType initRowType2() throws Exception
   {
      String[] itemNames = new String[] { "name1", "name2" };
      String[] itemDescriptions = new String[] { "desc1", "desc2" };
      MetaType[] itemTypes = new MetaType[] { SimpleMetaType.STRING, SimpleMetaType.INTEGER };
      CompositeMetaType rowType = new ImmutableCompositeMetaType("rowTypeName2", "rowDescription", itemNames, itemDescriptions, itemTypes);
      return rowType;
   }
View Full Code Here

    * @return the map entry type
    */
   public static CompositeMetaType createMapEntryType(MetaType[] itemTypes)
   {
      String entryName = Map.Entry.class.getName();
      return new ImmutableCompositeMetaType(entryName, entryName, MAP_ITEM_NAMES, MAP_ITEM_NAMES, itemTypes);
   }
View Full Code Here

      MetaType keyType = resolve(Object.class);
      MetaType valueType = resolve(Object.class);
      MetaType[] itemTypes = { keyType, valueType };
      String entryName = Map.Entry.class.getName();
      CompositeMetaType entryType = new ImmutableCompositeMetaType(entryName, entryName, DefaultMetaTypeFactory.MAP_ITEM_NAMES, DefaultMetaTypeFactory.MAP_ITEM_NAMES, itemTypes);
      TableMetaType expected = new ImmutableTableMetaType(Map.class.getName(), Map.class.getName(), entryType, DefaultMetaTypeFactory.MAP_INDEX_NAMES);
     
      assertEquals(expected, result)
   }
View Full Code Here

      TableMetaType actual = assertInstanceOf(result, TableMetaType.class);
      MetaType keyType = resolve(keyClass);
      MetaType valueType = resolve(valueClass);
      MetaType[] itemTypes = { keyType, valueType };
      String entryName = Map.Entry.class.getName();
      CompositeMetaType entryType = new ImmutableCompositeMetaType(entryName, entryName, DefaultMetaTypeFactory.MAP_ITEM_NAMES, DefaultMetaTypeFactory.MAP_ITEM_NAMES, itemTypes);
      TableMetaType expected = new ImmutableTableMetaType(Map.class.getName(), Map.class.getName(), entryType, DefaultMetaTypeFactory.MAP_INDEX_NAMES);
      testTable(expected, actual);
   }
View Full Code Here

    * @return the map entry type
    */
   public static CompositeMetaType createMapEntryType(MetaType[] itemTypes)
   {
      String entryName = Map.Entry.class.getName();
      return new ImmutableCompositeMetaType(entryName, entryName, MAP_ITEM_NAMES, MAP_ITEM_NAMES, itemTypes);
   }
View Full Code Here

/*     */   }
/*     */
/*     */   public static CompositeMetaType createMapEntryType(MetaType[] itemTypes)
/*     */   {
/* 324 */     String entryName = Map.Entry.class.getName();
/* 325 */     return new ImmutableCompositeMetaType(entryName, entryName, MAP_ITEM_NAMES, MAP_ITEM_NAMES, itemTypes);
/*     */   }
View Full Code Here

/* 138 */     f6.setDescription("The jdbc driver connection properties");
/* 139 */     f6.setMandatory(false);
/* 140 */     String[] itemNames = { "conn-prop1", "conn-prop2" };
/* 141 */     String[] itemDescriptions = { "conn-prop1 description", "conn-prop2 description" };
/* 142 */     MetaType[] itemTypes = { SimpleMetaType.STRING, SimpleMetaType.STRING };
/* 143 */     CompositeMetaType propsType = new ImmutableCompositeMetaType("java.lang.Properties", "DS connection properties", itemNames, itemDescriptions, itemTypes);
/*     */
/* 145 */     f6.setMetaType(propsType);
/* 146 */     ManagedPropertyImpl connProps = new ManagedPropertyImpl(mo, f6);
/* 147 */     super.addProperty(connProps);
/*     */
View Full Code Here

/*  84 */         if (fieldName.equals("ConnectionProps"))
/*     */         {
/*  86 */           String[] itemNames = { "conn-prop1", "conn-prop2" };
/*  87 */           String[] itemDescriptions = { "conn-prop1 description", "conn-prop2 description" };
/*  88 */           MetaType[] itemTypes = { SimpleMetaType.STRING, SimpleMetaType.STRING };
/*  89 */           CompositeMetaType propsType = new ImmutableCompositeMetaType("java.lang.Properties", "DS connection properties", itemNames, itemDescriptions, itemTypes);
/*     */
/*  91 */           attrFields.setMetaType(propsType);
/*     */         }
/*  93 */         properties.add(new ManagedPropertyImpl(this, attrFields));
/*     */       }
View Full Code Here

/* 128 */     f6.setDescription("The jdbc driver connection properties");
/* 129 */     f6.setMandatory(false);
/* 130 */     String[] itemNames = { "conn-prop1", "conn-prop2" };
/* 131 */     String[] itemDescriptions = { "conn-prop1 description", "conn-prop2 description" };
/* 132 */     MetaType[] itemTypes = { SimpleMetaType.STRING, SimpleMetaType.STRING };
/* 133 */     CompositeMetaType propsType = new ImmutableCompositeMetaType("java.lang.Properties", "DS connection properties", itemNames, itemDescriptions, itemTypes);
/*     */
/* 135 */     f6.setMetaType(propsType);
/* 136 */     ManagedPropertyImpl connProps = new ManagedPropertyImpl(mo, f6);
/* 137 */     super.addProperty(connProps);
/*     */
View Full Code Here

TOP

Related Classes of org.jboss.metatype.api.types.ImmutableCompositeMetaType

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.