Package net.sourceforge.javautil.bytecode.api

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


    super(rootComponentType);
    this.values = values;
  }

  public void load(BytecodeContextMethod context) {
    context.getWriter().newArray(context, descriptor, new LiteralValue(values.length));
   
    for (int idx=0; idx<values.length; idx++) {
      context.getWriter().dup(context);
      new LiteralValue(idx).load(context);
      context.coerce(descriptor, values[idx]);
     
      context.getWriter().arrayStore(context);
    }
  }
View Full Code Here


   
    for (int i=0; i<arguments.length; i++) {
      if (arguments[i] instanceof IBytecodeReferenceable) {
        translated[i] = (IBytecodeReferenceable) arguments[i];
      } else {
        translated[i] = new LiteralValue(arguments[i]);
      }
    }
   
    return translated;
  }
View Full Code Here

   
    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"),
        new LiteralValue(context.getMethod().getName()),
        context.getThisField("cache"),
        new LiteralValue(context.getMethod().getDescriptor().toDescriptorString())
      ),
      context.initializeArray(context.resolve(Object.class), context.getMethodArguments())
    ));
  }
View Full Code Here

    IBytecodeResolvable helper = context.resolve(InterceptorHelper.class);
   
    context.returnValue( context.getThisField("interceptor").createInvocation(context, "invoke", context.resolve("this"),
      context.createInvocation(helper, "findMethod",
        context.createInvocation(context.resolve("this"), "getClass"),
        new LiteralValue(context.getMethod().getName() + "$$"),
        context.getThisField("cache"),
        new LiteralValue(context.getMethod().getDescriptor().toDescriptorString())
      ),
      context.initializeArray(context.resolve(Object.class), context.getMethodArguments())
    ));
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.javautil.bytecode.api.LiteralValue

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.