Examples of IBytecodeResolvable


Examples of net.sourceforge.javautil.bytecode.api.IBytecodeResolvable

  public InterceptorProxyMethod () {
    this.addExceptionHandler(new ProxyMethodExceptionHandler());
  }

  @Override protected void writeLogic(BytecodeContextMethod context) {
    IBytecodeResolvable helper = context.resolve(InterceptorHelper.class);
   
    context.returnValue( context.getThisField("interceptor").createInvocation(context, "invoke",
      context.getThisField(InterceptorProxyTypeCJCW.TARGET_FIELD_NAME).createInvocation(context, "get", context.resolve("this")),
      context.createInvocation(helper, "findMethod",
        context.createInvocation(context.resolve("this"), "getClass").createInvocation(context, "getSuperclass"),
View Full Code Here

Examples of net.sourceforge.javautil.bytecode.api.IBytecodeResolvable

        apm.write(context);
      }
     
    };
   
    IBytecodeResolvable st = getSuperType();
    while (st != null && !"java.lang.Object".equals( st.getType().getClassName() )) {
      for (IBytecodeMethod method : st.getDeclaredMethods()) {
        if (method.getAccess().isStatic() || method.getAccess().getScope() != Scope.Public) continue;
        this.addMethod(method.getName() + "$$", Scope.Private, false, true, method.getDescriptor()).setMethodBody(
          new BytecodeBlock() {
            @Override protected void writeInstructions(BytecodeContextMethod context) {
              context.returnValue(
                context.createSuperInvocation(context.getMethod().getName().split("\\$")[0], context.getMethodArguments())
              );
            }
          }
        );
       
        BytecodeMethodConcrete bmc = this.addMethod(method.getName(), Scope.Public, false, true, method.getDescriptor());
        bmc.copyAnnotations(method);
        bmc.setMethodBody(apmb);
      }
     
      st = st.getSuperType();
    }
   
    try {
      Method toString = type.getMethod("toString");
      if (toString.getDeclaringClass() == Object.class) {
View Full Code Here

Examples of net.sourceforge.javautil.bytecode.api.IBytecodeResolvable

        apm.write(context);
      }
     
    };
   
    IBytecodeResolvable st = getSuperType();
    while (st != null && !"java.lang.Object".equals( st.getType().getClassName() )) {
      for (IBytecodeMethod method : st.getDeclaredMethods()) {
        if (method.getAccess().isStatic() || method.getAccess().getScope() != Scope.Public) continue;
       
        BytecodeMethodConcrete bmc = this.addMethod(method.getName(), Scope.Public, false, true, method.getDescriptor());
        bmc.copyAnnotations(method);
        bmc.setMethodBody(apmb);
      }
     
      st = st.getSuperType();
    }
   
    try {
      Method toString = type.getMethod("toString");
      if (toString.getDeclaringClass() == Object.class) {
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.