Package jodd.proxetta.pointcuts

Examples of jodd.proxetta.pointcuts.AllMethodsPointcut


  }

  @Test
  public void testProxyClassNames() {
    ProxyProxetta proxyProxetta = ProxyProxetta.withAspects(new ProxyAspect(FooProxyAdvice.class, new AllMethodsPointcut()));
    proxyProxetta.setVariableClassName(true);

    ProxyProxettaBuilder builder = proxyProxetta.builder();
    builder.setTarget(Foo.class);
    Foo foo = (Foo) builder.newInstance();
View Full Code Here


  }

  @Test
  public void testInnerOverride() {
    ProxyProxetta proxyProxetta = ProxyProxetta.withAspects(new ProxyAspect(FooProxyAdvice.class, new AllMethodsPointcut()));
    ProxyProxettaBuilder builder = proxyProxetta.builder();
    builder.setTarget(Two.class);
    builder.setTargetProxyClassName("foo.");

    Two two = (Two) builder.newInstance();
View Full Code Here

    assertEquals("foo.Two$$Proxetta", two.getClass().getName());
  }

  @Test
  public void testJdk() throws Exception {
    ProxyProxetta proxyProxetta = ProxyProxetta.withAspects(new ProxyAspect(StatCounterAdvice.class, new AllMethodsPointcut()));
    proxyProxetta.setVariableClassName(false);

    ProxyProxettaBuilder builder = proxyProxetta.builder();
    builder.setTarget(Object.class);
    try {
View Full Code Here

  /**
   * Creates aspect defined with provided advice and pointcut for all class methods.
   */
  public ProxyAspect(Class<? extends ProxyAdvice> advice) {
    this(advice, new AllMethodsPointcut());
  }
View Full Code Here

public class ReturnTest {

  @Test
  public void testWrapperWithProxyReturns() throws Exception {
    ProxyProxetta proxetta = ProxyProxetta.withAspects(
        new ProxyAspect(ReflectionReplacementAdvice.class, new AllMethodsPointcut()));

    ProxyProxettaBuilder builder = proxetta.builder(Retro.class, ".Retro2");

//    proxetta.setDebugFolder("d:\\");
View Full Code Here

  }

  @Test
  public void testNullReturns() throws Exception {
    ProxyProxetta proxetta = ProxyProxetta.withAspects(
        new ProxyAspect(ReturnNullAdvice.class, new AllMethodsPointcut()));

    ProxyProxettaBuilder builder = proxetta.builder(Retro.class, ".Retro3");

//    proxetta.setDebugFolder("d:\\");
View Full Code Here

  protected final ProxyProxetta proxetta;

  public static final String METHREF_CLASSNAME_SUFFIX = "$Methref";

  public MethrefProxetta() {
    ProxyAspect aspects = new ProxyAspect(MethrefAdvice.class, new AllMethodsPointcut());

    proxetta = ProxyProxetta.withAspects(aspects);

    proxetta.setClassNameSuffix(METHREF_CLASSNAME_SUFFIX);
  }
View Full Code Here

TOP

Related Classes of jodd.proxetta.pointcuts.AllMethodsPointcut

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.