Package org.jboss.metadata.spi.retrieval

Examples of org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge


   protected MetaData setupTestMetaData()
   {
      MemoryMetaDataLoader loader = new MemoryMetaDataLoader();
      loader.addMetaData(new TestMetaDataImpl(), TestMetaData.class);
      return new MetaDataRetrievalToMetaDataBridge(loader);
   }
View Full Code Here


   protected MetaData setupTestMetaData12()
   {
      MemoryMetaDataLoader loader = new MemoryMetaDataLoader();
      loader.addMetaData(new TestMetaData1Impl(), TestMetaData1.class);
      loader.addMetaData(new TestMetaData2Impl(), TestMetaData2.class);
      return new MetaDataRetrievalToMetaDataBridge(loader);
   }
View Full Code Here

   protected MetaData setupTestMetaDataByName()
   {
      MemoryMetaDataLoader loader = new MemoryMetaDataLoader();
      loader.addMetaData("Test", new TestMetaDataImpl(), TestMetaData.class);
      return new MetaDataRetrievalToMetaDataBridge(loader);
   }
View Full Code Here

   protected MetaData setupTestMetaData12ByName()
   {
      MemoryMetaDataLoader loader = new MemoryMetaDataLoader();
      loader.addMetaData("Test1", new TestMetaData1Impl(), TestMetaData1.class);
      loader.addMetaData("Test2", new TestMetaData2Impl(), TestMetaData2.class);
      return new MetaDataRetrievalToMetaDataBridge(loader);
   }
View Full Code Here

      loader.addComponentMetaDataRetrieval(new FieldSignature("testAnnotation"), component);
      component = new MemoryMetaDataLoader();
      component.addAnnotation(new TestAnnotation1Impl());
      component.addAnnotation(new TestAnnotation2Impl());
      loader.addComponentMetaDataRetrieval(new FieldSignature("testAnnotation12"), component);
      return new MetaDataRetrievalToMetaDataBridge(loader);
   }
View Full Code Here

      loader.addComponentMetaDataRetrieval(new ConstructorSignature(String.class), component);
      component = new MemoryMetaDataLoader();
      component.addAnnotation(new TestAnnotation1Impl());
      component.addAnnotation(new TestAnnotation2Impl());
      loader.addComponentMetaDataRetrieval(new ConstructorSignature(String.class, Class.class), component);
      return new MetaDataRetrievalToMetaDataBridge(loader);
   }
View Full Code Here

      loader.addComponentMetaDataRetrieval(new MethodSignature("testAnnotation", String.class), component);
      component = new MemoryMetaDataLoader();
      component.addAnnotation(new TestAnnotation1Impl());
      component.addAnnotation(new TestAnnotation2Impl());
      loader.addComponentMetaDataRetrieval(new MethodSignature("testAnnotation12", String.class, Class.class), component);
      return new MetaDataRetrievalToMetaDataBridge(loader);
   }
View Full Code Here

      loader.addComponentMetaDataRetrieval(new MethodParametersSignature("testAnnotation", 0, String.class), component);
      component = new MemoryMetaDataLoader();
      component.addAnnotation(new TestAnnotation1Impl());
      component.addAnnotation(new TestAnnotation2Impl());
      loader.addComponentMetaDataRetrieval(new MethodParametersSignature("testAnnotation12", 1, String.class, Class.class), component);
      return new MetaDataRetrievalToMetaDataBridge(loader);
   }
View Full Code Here

      loader.addComponentMetaDataRetrieval(new ConstructorParametersSignature(0, Integer.class), component);
      component = new MemoryMetaDataLoader();
      component.addAnnotation(new TestAnnotation1Impl());
      component.addAnnotation(new TestAnnotation2Impl());
      loader.addComponentMetaDataRetrieval(new ConstructorParametersSignature(1, String.class, Class.class), component);
      return new MetaDataRetrievalToMetaDataBridge(loader);
   }
View Full Code Here

   }

   public void testMetaDataRetrievalToMetaDataBridge() throws Exception
   {
      TestMetaDataRetrieval test = new TestMetaDataRetrieval();
      MetaDataRetrievalToMetaDataBridge metaData = new MetaDataRetrievalToMetaDataBridge(test);
     
      metaData.getAnnotation(TestAnnotation.class);
      assertEquals("retrieveAnnotation", test.lastMethod);

      metaData.getAnnotations();
      assertEquals("retrieveAnnotations", test.lastMethod);

      metaData.getLocalAnnotations();
      assertEquals("retrieveLocalAnnotations", test.lastMethod);

      metaData.getMetaData();
      assertEquals("retrieveMetaData", test.lastMethod);

      metaData.getLocalMetaData();
      assertEquals("retrieveLocalMetaData", test.lastMethod);

      metaData.getMetaData(Object.class);
      assertEquals("retrieveMetaData(Class)", test.lastMethod);

      metaData.getMetaData("Hello");
      assertEquals("retrieveMetaData(String)", test.lastMethod);

      metaData.getMetaData("Hello", Object.class);
      assertEquals("retrieveMetaData(String)", test.lastMethod);

      metaData.getValidTime();
      assertEquals("getValidTime", test.lastMethod);

      metaData.isAnnotationPresent(TestAnnotation.class);
      assertEquals("retrieveAnnotation", test.lastMethod);

      metaData.isMetaDataPresent(Object.class);
      assertEquals("retrieveMetaData(Class)", test.lastMethod);

      metaData.isMetaDataPresent("Hello");
      assertEquals("retrieveMetaData(String)", test.lastMethod);

      metaData.isMetaDataPresent("Hello", Object.class);
      assertEquals("retrieveMetaData(String)", test.lastMethod);
   }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge

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.