Package org.jboss.metadata.spi.loader

Examples of org.jboss.metadata.spi.loader.MutableMetaDataLoader.retrieveAnnotation()


   {
      MutableMetaDataLoader loader = setUpRestricted();
     
      TestAnnotation testAnnotation = new TestAnnotationImpl();
      loader.addAnnotation(testAnnotation);
      assertNotNull(loader.retrieveAnnotation(TestAnnotation.class));

      RestrictedAnnotation restrictedAnnotation = new RestrictedAnnotationImpl();
      try
      {
         loader.addAnnotation(restrictedAnnotation);
View Full Code Here


      Annotation[] expected = { annotation1 };
      assertUnorderedArrayEquals(expected, item.getValue());
     
      TestAnnotation2Impl annotation2 = new TestAnnotation2Impl();
      childLoader.addAnnotation(annotation2);
      AnnotationItem<? extends Annotation> annotationItem2Child = childLoader.retrieveAnnotation(TestAnnotation2.class);

      expectedItems = new AnnotationItem[] { annotationItem1Parent, annotationItem2Child };
      assertUnorderedArrayEquals(expectedItems, item.getAnnotations());
      expected = new Annotation[] { annotation1, annotation2 };
      assertUnorderedArrayEquals(expected, item.getValue());
View Full Code Here

      expected = new Annotation[] { annotation1, annotation2 };
      assertUnorderedArrayEquals(expected, item.getValue());
     
      TestAnnotation1Impl annotation1Child = new TestAnnotation1Impl();
      childLoader.addAnnotation(annotation1Child);
      AnnotationItem<? extends Annotation> annotationItem1Child = childLoader.retrieveAnnotation(TestAnnotation1.class);

      expectedItems = new AnnotationItem[] { annotationItem1Child, annotationItem2Child };
      assertUnorderedArrayEquals(expectedItems, item.getAnnotations());
      expected = new Annotation[] { annotation1Child, annotation2 };
      assertUnorderedArrayEquals(expected, item.getValue());
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.