Package org.jboss.metatype.plugins.types

Examples of org.jboss.metatype.plugins.types.MutableCompositeMetaType.addItem()


   {
      MetaType result = resolve(TestRenamedCompositeItem.class);
      CompositeMetaType actual = assertInstanceOf(result, CompositeMetaType.class);
     
      MutableCompositeMetaType expected = new MutableCompositeMetaType(TestRenamedCompositeItem.class.getName(), TestRenamedCompositeItem.class.getName());
      expected.addItem("id", "id", SimpleMetaType.STRING);
      expected.addItem("renamed", "renamed", SimpleMetaType.STRING);
      Set<String> keys = Collections.singleton("id");
      expected.setKeys(keys);
      expected.freeze();
     
View Full Code Here


      MetaType result = resolve(TestRenamedCompositeItem.class);
      CompositeMetaType actual = assertInstanceOf(result, CompositeMetaType.class);
     
      MutableCompositeMetaType expected = new MutableCompositeMetaType(TestRenamedCompositeItem.class.getName(), TestRenamedCompositeItem.class.getName());
      expected.addItem("id", "id", SimpleMetaType.STRING);
      expected.addItem("renamed", "renamed", SimpleMetaType.STRING);
      Set<String> keys = Collections.singleton("id");
      expected.setKeys(keys);
      expected.freeze();
     
      testComposite(expected, actual);
View Full Code Here

   {
      MetaType result = resolve(TestSimpleAnnotation.class);
      CompositeMetaType actual = assertInstanceOf(result, CompositeMetaType.class);
     
      MutableCompositeMetaType expected = new MutableCompositeMetaType(TestSimpleAnnotation.class.getName(), TestSimpleAnnotation.class.getName());
      expected.addItem("something", "something", SimpleMetaType.STRING);
      expected.freeze();
     
      testComposite(expected, actual);
   }
}
View Full Code Here

   public ObjectNameMetaMapper(String... args)
   {
      MutableCompositeMetaType mcmt = new MutableCompositeMetaType(ObjectName.class.getName(), "JMX ObjectName");
      if(((args.length %2) == 0) == false)
         throw new IllegalStateException("args counts must be 2*n for n key,key-description pairs");
      mcmt.addItem("domain", "the object name domain", SimpleMetaType.STRING);
      for(int n = 0; n < args.length; n += 2)
      {
         String key = args[n];
         String description = args[n+1];
         mcmt.addItem(key, description, SimpleMetaType.STRING);
View Full Code Here

      mcmt.addItem("domain", "the object name domain", SimpleMetaType.STRING);
      for(int n = 0; n < args.length; n += 2)
      {
         String key = args[n];
         String description = args[n+1];
         mcmt.addItem(key, description, SimpleMetaType.STRING);
      }
      mcmt.freeze();
      type = mcmt;
   }
View Full Code Here

      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);
      expected.set("generic", genericValue);
     
      MetaValue result = createMetaValue(composite);
View Full Code Here

   {
      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
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.