Examples of AOPProxyFactoryParameters


Examples of org.jboss.aop.proxy.container.AOPProxyFactoryParameters

         manager.addAspectDefinition(def);
         manager.addInterceptorFactory(advice.getName(), advice);
         manager.addPointcut(pointcut);
         manager.addBinding(binding);
        
         AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
         params.setTarget(new POJO());
        
         GeneratedAOPProxyFactory factory = new GeneratedAOPProxyFactory();
         POJO plain = (POJO)factory.createAdvisedProxy(params);
        
         assertFalse(plain instanceof AspectManaged);
        
         MetaData someAnnMD = setupMetaData(POJO.class, new SomeAnnotationImpl());
         params.setMetaData(someAnnMD);
         params.setMetaDataHasInstanceLevelData(true);
         params.setContainerCache(null);
         POJO instanceAnnotationWithNoBindings = (POJO)factory.createAdvisedProxy(params);
         assertFalse(instanceAnnotationWithNoBindings instanceof AspectManaged);
        
         MetaData annMD = setupMetaData(POJO.class, new AnnotationImpl());
         params.setMetaData(annMD);
         params.setMetaDataHasInstanceLevelData(true);
         params.setContainerCache(null);
         POJO instanceAnnotationWithBindings = (POJO)factory.createAdvisedProxy(params);
         assertFalse(instanceAnnotationWithBindings instanceof AspectManaged);
         assertTrue(TestInterceptor.invoked);

         InterfaceIntroduction intro = new InterfaceIntroduction("intro", "@" + SomeAnnotation.class.getName(), new String[] {SomeInterface.class.getName()});
         manager.addInterfaceIntroduction(intro);
         params.setMetaData(someAnnMD);
         params.setContainerCache(null);
         POJO introduced = (POJO)factory.createAdvisedProxy(params);
         assertTrue(introduced instanceof AspectManaged);
         assertTrue(introduced instanceof SomeInterface);
      }
      finally
View Full Code Here

Examples of org.jboss.aop.proxy.container.AOPProxyFactoryParameters

      InterfaceIntroduction intro = new InterfaceIntroduction("intro", POJOWithIntroduction.class.getName(), new String[] {Serializable.class.getName()});
      try
      {
         manager.addInterfaceIntroduction(intro);
        
         AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
         params.setTarget(new POJOWithIntroduction());
        
         GeneratedAOPProxyFactory factory = new GeneratedAOPProxyFactory();
         POJOWithIntroduction pojo = (POJOWithIntroduction)factory.createAdvisedProxy(params);
         assertTrue(pojo instanceof AspectManaged);
        
View Full Code Here

Examples of org.jboss.aop.proxy.container.AOPProxyFactoryParameters

         catch (Exception e)
         {
            throw DeploymentException.rethrowAsDeploymentException("Error instantiating object", e);
         }
        
         AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
         params.setTarget(target);
         params.setMetaData(unit.getMetaData());
         params.setMetaDataHasInstanceLevelData(true);
         Object proxy = proxyFactory.createAdvisedProxy(params);
         unit.addAttachment("proxy", proxy);
      }
View Full Code Here

Examples of org.jboss.aop.proxy.container.AOPProxyFactoryParameters

     
      Class<?> clazz = constructorInfo.getDeclaringClass().getType();
      AspectManager manager = AspectManagerFactory.getAspectManager(metaData);
      boolean hasInstanceMetaData = rootHasSubInstanceMetaData(metaData);
      ContainerCache cache = ContainerCache.initialise(manager, clazz, metaData, hasInstanceMetaData);
      AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
      Object target = createTarget(cache, params);
      params.setProxiedClass(target.getClass());
      params.setMetaData(metaData);
      params.setTarget(target);
      params.setContainerCache(cache);
      params.setMetaDataHasInstanceLevelData(hasInstanceMetaData);
     
      return proxyFactory.createAdvisedProxy(params);
   }
View Full Code Here

Examples of org.jboss.aop.proxy.container.AOPProxyFactoryParameters

/*     */   }
/*     */
/*     */   protected Object createProxy(Object target)
/*     */     throws Exception
/*     */   {
/*  88 */     AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
/*  89 */     params.setProxiedClass(target.getClass());
/*  90 */     params.setTarget(target);
/*  91 */     return this.proxyFactory.createAdvisedProxy(params);
/*     */   }
View Full Code Here

Examples of org.jboss.aop.proxy.container.AOPProxyFactoryParameters

/*     */   }
/*     */
/*     */   protected Object createProxy(Object target, Class[] interfaces)
/*     */     throws Exception
/*     */   {
/* 120 */     AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
/* 121 */     params.setProxiedClass(target.getClass());
/* 122 */     params.setInterfaces(interfaces);
/* 123 */     params.setTarget(target);
/* 124 */     return this.proxyFactory.createAdvisedProxy(params);
/*     */   }
View Full Code Here

Examples of org.jboss.aop.proxy.container.AOPProxyFactoryParameters

/*     */   }
/*     */
/*     */   protected Object createProxy(Object target, AOPProxyFactoryMixin[] mixins)
/*     */     throws Exception
/*     */   {
/* 137 */     AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
/* 138 */     params.setProxiedClass(target.getClass());
/* 139 */     params.setMixins(mixins);
/* 140 */     params.setTarget(target);
/* 141 */     return this.proxyFactory.createAdvisedProxy(params);
/*     */   }
View Full Code Here

Examples of org.jboss.aop.proxy.container.AOPProxyFactoryParameters

/*     */   }
/*     */
/*     */   protected Object createProxy(Object target, Class[] interfaces, AOPProxyFactoryMixin[] mixins)
/*     */     throws Exception
/*     */   {
/* 155 */     AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
/* 156 */     params.setProxiedClass(target.getClass());
/* 157 */     params.setInterfaces(interfaces);
/* 158 */     params.setMixins(mixins);
/* 159 */     params.setTarget(target);
/* 160 */     return this.proxyFactory.createAdvisedProxy(params);
/*     */   }
View Full Code Here

Examples of org.jboss.aop.proxy.container.AOPProxyFactoryParameters

/*     */   }
/*     */
/*     */   protected Object createProxy(Object target, Class[] interfaces, SimpleMetaData metaData)
/*     */     throws Exception
/*     */   {
/* 228 */     AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
/* 229 */     params.setProxiedClass(target.getClass());
/* 230 */     params.setInterfaces(interfaces);
/* 231 */     params.setSimpleMetaData(metaData);
/* 232 */     params.setTarget(target);
/* 233 */     return this.proxyFactory.createAdvisedProxy(params);
/*     */   }
View Full Code Here

Examples of org.jboss.aop.proxy.container.AOPProxyFactoryParameters

/*     */   }
/*     */
/*     */   protected Object createHollowProxy(Class[] interfaces, SimpleMetaData metaData)
/*     */     throws Exception
/*     */   {
/* 264 */     AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
/* 265 */     params.setInterfaces(interfaces);
/* 266 */     params.setSimpleMetaData(metaData);
/* 267 */     return this.proxyFactory.createAdvisedProxy(params);
/*     */   }
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.