Package org.jboss.metadata.plugins.loader.thread

Examples of org.jboss.metadata.plugins.loader.thread.ThreadLocalMetaDataLoader


      MemoryMetaDataLoader mmdl = new MemoryMetaDataLoader();
      TestAnnotation annotation = getAnnotation();
      mmdl.addMetaData(annotation, TestAnnotation.class);
      retrievals[1] = mmdl;
      retrievals[2] = new SimpleMetaDataLoader(new Annotation[]{annotation});
      ThreadLocalMetaDataLoader tlmdl = ThreadLocalMetaDataLoader.INSTANCE;
      tlmdl.addAnnotation(annotation);
      retrievals[3] = tlmdl;
      for(MetaDataRetrieval rdr : retrievals)
         assertFalse(rdr.toString(), rdr.isEmpty());

      mmdl.removeMetaData(TestAnnotation.class);
      assertTrue(mmdl.toString(), mmdl.isEmpty());
      tlmdl.removeAnnotation(TestAnnotation.class);
      assertTrue(tlmdl.toString(), tlmdl.isEmpty());     

      MetaDataRetrieval emptyRetrieval = new MemoryMetaDataLoader();
      MetaDataContext emptyContext = new AbstractMetaDataContext(emptyRetrieval);

      contexts = getMetaDataContexts(retrievals, emptyContext, emptyRetrieval);
View Full Code Here

TOP

Related Classes of org.jboss.metadata.plugins.loader.thread.ThreadLocalMetaDataLoader

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.