Package org.jboss.metatype.api.types

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


   }

   public XAConnectionFactoryProperty(Fields fields)
   {
      super(fields);
      type = new MapCompositeMetaType(SimpleMetaType.STRING);
      setField(Fields.META_TYPE, null);
   }
View Full Code Here


   }

   public XAConnectionFactoryProperty(ManagedObject managedObject, Fields fields)
   {
      super(managedObject, fields);
      type = new MapCompositeMetaType(SimpleMetaType.STRING);
      setField(Fields.META_TYPE, null);
   }
View Full Code Here

   }

   public ConnectionFactoryProperty(Fields fields)
   {
      super(fields);
      type = new MapCompositeMetaType(SimpleMetaType.STRING);
      setField(Fields.META_TYPE, null);
   }
View Full Code Here

   }

   public ConnectionFactoryProperty(ManagedObject managedObject, Fields fields)
   {
      super(managedObject, fields);
      type = new MapCompositeMetaType(SimpleMetaType.STRING);
      setField(Fields.META_TYPE, null);
   }
View Full Code Here

            TypeInfo valueType = types[1];
            if(keyType.getName().equals(String.class.getName()))
            {
               // Use MapCompositeMetaType
               MetaType valueMetaType = resolve(valueType);
               return new MapCompositeMetaType(valueMetaType);
            }
         }
         // Map java.util.Properties to MapCompositeMetaType(SimpleMetaType.STRING)
         else if(typeInfo.getName().equals(Properties.class.getName()))
         {
            return new MapCompositeMetaType(SimpleMetaType.STRING);
         }
         // No, return the general map type
         return generateMap(classInfo);
      }
     
View Full Code Here

      if(type instanceof MapCompositeMetaType)
      {
         if((value instanceof Map) == false)
            throw new RuntimeException("Expected Map value for: " + type+", was: "+(value != null ? value.getClass() : "null"));
         Map<String,?> map = (Map) value;
         MapCompositeMetaType mapType = (MapCompositeMetaType) type;
         MetaType mapValueType = mapType.getValueType();
         MapCompositeValueSupport result = new MapCompositeValueSupport(mapValueType);
         for(Entry<String,?> entry : map.entrySet())
         {
            Object entryValue = entry.getValue();
            MetaValue entryMetaValue = internalCreate(entryValue, null, mapValueType);
View Full Code Here

      if(type instanceof MapCompositeMetaType)
      {
         if((value instanceof Map) == false)
            throw new RuntimeException("Expected Map value for: " + type+", was: "+(value != null ? value.getClass() : "null"));
         Map<String,?> map = (Map) value;
         MapCompositeMetaType mapType = (MapCompositeMetaType) type;
         MetaType mapValueType = mapType.getValueType();
         MapCompositeValueSupport result = new MapCompositeValueSupport(mapValueType);
         for(Entry<String,?> entry : map.entrySet())
         {
            Object entryValue = entry.getValue();
            MetaValue entryMetaValue = internalCreate(entryValue, null, mapValueType);
View Full Code Here

        SimpleValue simpleValue = SimpleValueSupport.wrap("SimpleValue");
        SimpleMetaType simpleMetaType = simpleValue.getMetaType();
        metaTypeInstances.put(SIMPLE_TYPE, simpleMetaType);
        CompositeMetaType compositeMetaType = new MutableCompositeMetaType("String", "Just something");
        metaTypeInstances.put(COMPOSITE_TYPE, compositeMetaType);
        CompositeMetaType mapCompositeMetaType = new MapCompositeMetaType(SimpleMetaType.STRING);
        metaTypeInstances.put(MAP_COMPOSITE_TYPE, mapCompositeMetaType);
        CollectionMetaType collectionMetaType = new CollectionMetaType("ClassName", simpleMetaType);
        metaTypeInstances.put(COLLECTION_TYPE, collectionMetaType);
        ArrayMetaType arrayMetaType = new ArrayMetaType(2, simpleMetaType);
        metaTypeInstances.put(ARRAY_TYPE, arrayMetaType);
View Full Code Here

            if (memberPropDefs.isEmpty())
                throw new IllegalStateException("PropertyDefinitionMap doesn't contain any member PropertyDefinitions.");
            // NOTE: We assume member prop defs are all of the same type, since for MapCompositeMetaTypes, they have to be.
            PropertyDefinition mapMemberPropDef = memberPropDefs.iterator().next();
            MetaType mapMemberMetaType = convertPropertyDefinitionToMetaType(mapMemberPropDef);
            memberMetaType = new MapCompositeMetaType(mapMemberMetaType);
        } else {
            throw new IllegalStateException("List member PropertyDefinition has unknown type: "
                + propDef.getClass().getName());
        }
        return memberMetaType;
View Full Code Here

        mapCompositeValueSupport.put(key, value);
    }

    protected CompositeValue createCompositeValue(PropertyDefinitionMap propDefMap, MetaType metaType)
    {
        MapCompositeMetaType mapCompositeMetaType = (MapCompositeMetaType)metaType;
        MetaType mapMemberMetaType = mapCompositeMetaType.getValueType();
        return new MapCompositeValueSupport(mapMemberMetaType);
    }
View Full Code Here

TOP

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

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.