Package jodd.proxetta.impl

Examples of jodd.proxetta.impl.InvokeProxetta


public class InvReplTest {

  @Test
  public void testReplacement() throws IllegalAccessException, InstantiationException, NoSuchMethodException {

    InvokeProxetta proxetta = initProxetta();

    String className = One.class.getCanonicalName();
    byte klazz[] = proxetta.builder(One.class).create();
    //FileUtil.writeBytes("d:\\OneClone.class", klazz);

    FastByteArrayOutputStream fbaos = new FastByteArrayOutputStream();
//    PrintStream out = System.out;
    System.setOut(new PrintStream(fbaos));
View Full Code Here


  }

  @Test
  public void testSuper() {
    InvokeProxetta proxetta = initProxetta();
    try {
      proxetta.builder(OneWithSuper.class).define();
      fail();
    } catch (ProxettaException ignore) {

    }
  }
View Full Code Here

    }
  }

  @Test
  public void testInterface() {
    InvokeProxetta proxetta = initProxetta();
    try {
      proxetta.builder(Inter.class).newInstance();
      fail();
    } catch (ProxettaException ignore) {
    }
  }
View Full Code Here

    assertEquals(">4:String:4long:4XXX:ccc:Wimp", txt);
  }


  protected InvokeProxetta initProxetta() {
    InvokeProxetta fp = InvokeProxetta.withAspects(
        new InvokeAspect() {
          @Override
          public InvokeReplacer pointcut(InvokeInfo invokeInfo) {
            if (invokeInfo.getMethodName().equals("invvirtual")) {
              return InvokeReplacer.with(Replacer.class, "rInvVirtual")
View Full Code Here

TOP

Related Classes of jodd.proxetta.impl.InvokeProxetta

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.