Package org.jboss.metadata.plugins.loader.memory

Examples of org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader.addAnnotation()


   {
      MutableMetaDataRepository repository = getMetaDataRepository().getMetaDataRepository();
      ScopeKey instanceScope = new ScopeKey(CommonLevels.INSTANCE, "TestBean");
      MemoryMetaDataLoader loader = new MemoryMetaDataLoader(instanceScope);
      TestAnnotation2 annotation = (TestAnnotation2) AnnotationCreator.createAnnotation("@org.jboss.test.kernel.deployment.support.TestAnnotation2", TestAnnotation2.class);
      loader.addAnnotation(annotation);
      repository.addMetaDataRetrieval(loader);
      ScopeKey setStringScope = new ScopeKey(CommonLevels.JOINPOINT, "setString");
      MemoryMetaDataLoader stringProperty = new MemoryMetaDataLoader(setStringScope);
      stringProperty.addAnnotation(annotation);
      Signature signature = new MethodSignature("setString", String.class);
View Full Code Here


      TestAnnotation2 annotation = (TestAnnotation2) AnnotationCreator.createAnnotation("@org.jboss.test.kernel.deployment.support.TestAnnotation2", TestAnnotation2.class);
      loader.addAnnotation(annotation);
      repository.addMetaDataRetrieval(loader);
      ScopeKey setStringScope = new ScopeKey(CommonLevels.JOINPOINT, "setString");
      MemoryMetaDataLoader stringProperty = new MemoryMetaDataLoader(setStringScope);
      stringProperty.addAnnotation(annotation);
      Signature signature = new MethodSignature("setString", String.class);
      loader.addComponentMetaDataRetrieval(signature, stringProperty);
     
      KernelDeployment deployment = deploy("MutableMetaDataTestCase_NotAutomatic.xml");
      try
View Full Code Here

      throws Exception
   {
      MemoryMetaDataLoader memory = new MemoryMetaDataLoader();
      String annotationExpr = "@org.jboss.managed.api.annotation.ManagementObject(name=\"testMetaDataRepositoryOverride\",componentType=@org.jboss.managed.api.annotation.ManagementComponent(type=\"MCBean\", subtype=\"MetaDataTest\"))";
      ManagementObject override = (ManagementObject) AnnotationCreator.createAnnotation(annotationExpr, ManagementObject.class);
      memory.addAnnotation(override);
      MetaData metaData = new MetaDataRetrievalToMetaDataBridge(memory);

      BigDecimal bigDecimal = new BigDecimal(10);
      SimpleUnannotated simple = new SimpleUnannotated();
      simple.setBigDecimalValue(bigDecimal);
View Full Code Here

      if (delegate == null)
      {
         delegate = new MemoryMetaDataLoader(getThreadScopeKey(), false, true);
         threadLocal.set(delegate);
      }
      return delegate.addAnnotation(annotation);
   }
  
   public <T extends Annotation> T removeAnnotation(Class<T> annotationType)
   {
      MemoryMetaDataLoader delegate = threadLocal.get();
View Full Code Here

/* 143 */     if (delegate == null)
/*     */     {
/* 145 */       delegate = new MemoryMetaDataLoader(getThreadScopeKey(), false, true);
/* 146 */       this.threadLocal.set(delegate);
/*     */     }
/* 148 */     return delegate.addAnnotation(annotation);
/*     */   }
/*     */
/*     */   public <T extends Annotation> T removeAnnotation(Class<T> annotationType)
/*     */   {
/* 153 */     MemoryMetaDataLoader delegate = (MemoryMetaDataLoader)this.threadLocal.get();
View Full Code Here

   {
      ScopeKey scope = new ScopeKey(CommonLevels.JOINPOINT_OVERRIDE, name);
      MemoryMetaDataLoader loader = new MemoryMetaDataLoader(scope);
      for (Annotation ann : annotations)
      {
         loader.addAnnotation(ann);
      }
      for (Annotation ann : extraAnnotations)
      {
         loader.addAnnotation(ann);
      }
View Full Code Here

      {
         loader.addAnnotation(ann);
      }
      for (Annotation ann : extraAnnotations)
      {
         loader.addAnnotation(ann);
      }
      mutable.addComponentMetaDataRetrieval(sig, loader);
   }
}
View Full Code Here

      if (delegate == null)
      {
         delegate = new MemoryMetaDataLoader(getThreadScopeKey(), false, true);
         threadLocal.set(delegate);
      }
      return delegate.addAnnotation(annotation);
   }
  
   public <T extends Annotation> T removeAnnotation(Class<T> annotationType)
   {
      MemoryMetaDataLoader delegate = threadLocal.get();
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.