Package org.jboss.metatype.api.types

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


            MetaType managedPropMetaType = ProfileServiceUtil.convertPropertyDefinitionToMetaType(mapMemberPropDef);
            managedProp.setMetaType(managedPropMetaType);
            managedProp.setManagedObject(managedObject);
            managedObject.getProperties().put(managedProp.getName(), managedProp);
        }
        GenericValue genericValue = new GenericValueSupport(new GenericMetaType(propDefMap.getName(),
                propDefMap.getDescription()), managedObject);
        populateMetaValueFromProperty(propMap, genericValue, propDefMap);
        return genericValue;
    }
View Full Code Here


         return null;
     
      ClassInfo classInfo = (ClassInfo) typeInfo;
      Generic generic = classInfo.getUnderlyingAnnotation(Generic.class);
      if (generic != null)
         return new GenericMetaType(typeInfo.getName(), typeInfo.getName());
      return null;
   }
View Full Code Here

    public static Map<String, MetaType> createMetaTypes()
    {
        metaTypeInstances.clear();

        metaTypeInstances.put(GENERIC_TYPE, new GenericMetaType("String", "Just something"));
        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);
View Full Code Here

            MetaType managedPropMetaType = ConversionUtils.convertPropertyDefinitionToMetaType(mapMemberPropDef);
            managedProp.setMetaType(managedPropMetaType);
            managedProp.setManagedObject(managedObject);
            managedObject.getProperties().put(managedProp.getName(), managedProp);
        }
        GenericValue genericValue = new GenericValueSupport(new GenericMetaType(propDefMap.getName(),
            propDefMap.getDescription()), managedObject);
        populateMetaValueFromProperty(propMap, genericValue, propDefMap);
        return genericValue;
    }
View Full Code Here

         return null;
     
      ClassInfo classInfo = (ClassInfo) typeInfo;
      Generic generic = classInfo.getUnderlyingAnnotation(Generic.class);
      if (generic != null)
         return new GenericMetaType(typeInfo.getName(), typeInfo.getName());
      return null;
   }
View Full Code Here

         return null;
     
      ClassInfo classInfo = (ClassInfo) typeInfo;
      Generic generic = classInfo.getUnderlyingAnnotation(Generic.class);
      if (generic != null)
         return new GenericMetaType(typeInfo.getName(), typeInfo.getName());
      return null;
   }
View Full Code Here

    * @throws Exception for any problem
    */
   public void testGeneric() throws Exception
   {
      TestGeneric test = new TestGeneric("Hello");
      GenericMetaType generic = new GenericMetaType(TestGeneric.class.getName(), TestGeneric.class.getName());
      GenericValue expected = new GenericValueSupport(generic, test);
     
      MetaValue result = createMetaValue(test);
      GenericValue actual = assertInstanceOf(result, GenericValue.class);
      getLog().debug("Generic: " + actual);
View Full Code Here

   public void testGenericComposite() throws Exception
   {
      TestGeneric test = new TestGeneric("Hello");
      TestGenericComposite composite = new TestGenericComposite();
      composite.setGeneric(test);
      GenericMetaType generic = new GenericMetaType(TestGeneric.class.getName(), TestGeneric.class.getName());
      GenericValue genericValue = new GenericValueSupport(generic, test);
      MutableCompositeMetaType compositeType = new MutableCompositeMetaType(TestGenericComposite.class.getName(), TestGenericComposite.class.getName());
      compositeType.addItem("generic", "generic", generic);
      compositeType.freeze();
      CompositeValueSupport expected = new CompositeValueSupport(compositeType);
View Full Code Here

    */
   public void testGeneric() throws Exception
   {
      MetaType actual = resolve(TestGeneric.class);
      getLog().debug("Generic MetaType: " + " className=" + actual.getClassName() + " typeName=" + actual.getTypeName() + " description=" + actual.getDescription());
      GenericMetaType expected = new GenericMetaType(TestGeneric.class.getName(), TestGeneric.class.getName());
      assertEquals(expected, actual);
   }
View Full Code Here

   public void testGenericComposite() throws Exception
   {
      MetaType actual = resolve(TestGenericComposite.class);
      printComposite("GenericComposite MetaType: ", assertInstanceOf(actual, CompositeMetaType.class));
      MutableCompositeMetaType expected = new MutableCompositeMetaType(TestGenericComposite.class.getName(), TestGenericComposite.class.getName());
      GenericMetaType generic = new GenericMetaType(TestGeneric.class.getName(), TestGeneric.class.getName());
      expected.addItem("generic", "generic", generic);
      expected.freeze();
      assertEquals(expected, actual);
   }
View Full Code Here

TOP

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

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.