Package org.jboss.beans.metadata.spi.builder

Examples of org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder.addAnnotation()


         ValueMetaData inject = builder.createInject(dependency);
         builder.addPropertyMetaData("simpleBean", inject);
      }
      if (scope != null)
      {
         builder.addAnnotation(new ApplicationScopeImpl(scope));
      }
      if (alias != null)
      {
         builder.addAnnotation(new AliasesImpl(alias));
      }
View Full Code Here


      {
         builder.addAnnotation(new ApplicationScopeImpl(scope));
      }
      if (alias != null)
      {
         builder.addAnnotation(new AliasesImpl(alias));
      }

      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
      deployment.setName(deploymentName);
      List<BeanMetaDataFactory> beans = Collections.singletonList(builder.getBeanMetaDataFactory());
View Full Code Here

   }

   public void testAnnotationRedeploy() throws Throwable
   {
      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("test", TestBean.class.getName());
      builder.addAnnotation("@" + TestAnnotation1.class.getName());
      ClassLoader cl = new TestClassLoader(getClass().getClassLoader());
      builder.setClassLoader(cl);
      BeanMetaData beanMetaData = builder.getBeanMetaData();
      MetaData metaData = null;
View Full Code Here

   protected ControllerContext install(String scope, String app, String deployment, int id) throws Throwable
   {
      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("tester" + (++counter), ScopeTester.class.getName());
      builder.addConstructorParameter(String.class.getName(), scope);
      builder.addAnnotation("@" + Aliases.class.getName() + "({\"bean\"})");

      if (app != null)
         builder.addAnnotation("@" + ApplicationScope.class.getName() + "(\"" + app + "\")");
      if (deployment != null)
         builder.addAnnotation("@" + DeploymentScope.class.getName() + "(\"" + deployment + "\")");
View Full Code Here

      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("tester" + (++counter), ScopeTester.class.getName());
      builder.addConstructorParameter(String.class.getName(), scope);
      builder.addAnnotation("@" + Aliases.class.getName() + "({\"bean\"})");

      if (app != null)
         builder.addAnnotation("@" + ApplicationScope.class.getName() + "(\"" + app + "\")");
      if (deployment != null)
         builder.addAnnotation("@" + DeploymentScope.class.getName() + "(\"" + deployment + "\")");
      if (id > 0)
         builder.addAnnotation("@" + InstanceScope.class.getName() + "(\"id-" + Integer.toString(id) + "\")");
View Full Code Here

      builder.addAnnotation("@" + Aliases.class.getName() + "({\"bean\"})");

      if (app != null)
         builder.addAnnotation("@" + ApplicationScope.class.getName() + "(\"" + app + "\")");
      if (deployment != null)
         builder.addAnnotation("@" + DeploymentScope.class.getName() + "(\"" + deployment + "\")");
      if (id > 0)
         builder.addAnnotation("@" + InstanceScope.class.getName() + "(\"id-" + Integer.toString(id) + "\")");

      KernelController controller = getController();
      return controller.install(builder.getBeanMetaData());
View Full Code Here

      if (app != null)
         builder.addAnnotation("@" + ApplicationScope.class.getName() + "(\"" + app + "\")");
      if (deployment != null)
         builder.addAnnotation("@" + DeploymentScope.class.getName() + "(\"" + deployment + "\")");
      if (id > 0)
         builder.addAnnotation("@" + InstanceScope.class.getName() + "(\"id-" + Integer.toString(id) + "\")");

      KernelController controller = getController();
      return controller.install(builder.getBeanMetaData());
   }
}
View Full Code Here

         String newName = "ScopedAlias_" + sequence + "_" + name;
     
         BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(bean);
        
         //Set the alias to the original name
         builder.addAnnotation(new AliasesImpl(name));
        
         //Set the domain name
         builder.addAnnotation(scopeAnnotation);
     
         //set the new name used by the controller for managing beans
View Full Code Here

        
         //Set the alias to the original name
         builder.addAnnotation(new AliasesImpl(name));
        
         //Set the domain name
         builder.addAnnotation(scopeAnnotation);
     
         //set the new name used by the controller for managing beans
         builder.setName(newName);
      }
   }
View Full Code Here

   protected BeanMetaDataFactory getAliasTester()
   {
      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("SomeRandomName", SimpleAliasTester.class.getName());
      builder.setFactoryMethod("factory");
      builder.addPropertyMetaData("controller", builder.createInject(KernelConstants.KERNEL_CONTROLLER_NAME));
      builder.addAnnotation(new AliasesImpl("Alias"));
      return builder.getBeanMetaDataFactory();
   }

   @SuppressWarnings({"ClassExplicitlyAnnotation"})
   private class AliasesImpl implements Aliases
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.