Package org.jboss.metatype.plugins.types

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


      MutableCompositeMetaType expected = new MutableCompositeMetaType(TestRecursiveComposite.class.getName(), TestRecursiveComposite.class.getName());
      expected.addItem("id", "id", SimpleMetaType.STRING);
      expected.addItem("other", "other", expected);
      Set<String> keys = Collections.singleton("id");
      expected.setKeys(keys);
      expected.freeze();
     
      testComposite(expected, actual);
   }
  
   public void testIgnoredItem() throws Exception
View Full Code Here


      MutableCompositeMetaType expected = new MutableCompositeMetaType(TestIgnoredCompositeItem.class.getName(), TestIgnoredCompositeItem.class.getName());
      expected.addItem("id", "id", SimpleMetaType.STRING);
      Set<String> keys = Collections.singleton("id");
      expected.setKeys(keys);
      expected.freeze();
     
      testComposite(expected, actual);
   }
  
   public void testRenamedItem() throws Exception
View Full Code Here

      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);
   }

   public HashMap<String, String> compositeSignature;
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

      {
         String key = args[n];
         String description = args[n+1];
         mcmt.addItem(key, description, SimpleMetaType.STRING);
      }
      mcmt.freeze();
      type = mcmt;
   }

   @Override
   public MetaType getMetaType()
View Full Code Here

      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);
      CompositeValue actual = assertInstanceOf(result, CompositeValue.class);
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);
   }
  
   /**
    * Test the meta type is generated correctly for a builder
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.