Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.ConstantPoolGen.addClass()


  else if (_isExtConstructor) {
      final String clazz =
    _chosenConstructor.getDeclaringClass().getName();
      Class[] paramTypes = _chosenConstructor.getParameterTypes();
     
      il.append(new NEW(cpg.addClass(_className)));
      il.append(InstructionConstants.DUP);

      for (int i = 0; i < n; i++) {
    final Expression exp = argument(i);
    exp.translate(classGen, methodGen);
View Full Code Here


        if (handle_throwable_exception) {
            InstructionHandle handlerStart = il.append(new ASTORE(1));

            il
                    .append(new NEW(
                            cp
                                    .addClass("java.lang.reflect.UndeclaredThrowableException")));
            il.append(InstructionConstants.DUP);
            il.append(new ALOAD(1));
            il.append(new INVOKESPECIAL(cp.addMethodref(
                    "java.lang.reflect.UndeclaredThrowableException", "<init>",
View Full Code Here

      final int current = methodGen.getLocalIndex("current");
     
      // Push required parameters
      il.append(classGen.loadTranslet());
      if (classGen.isExternal()) {
    il.append(new CHECKCAST(cpg.addClass(className)));
      }
      il.append(DUP);
      il.append(new GETFIELD(cpg.addFieldref(className, "_dom",
               DOM_INTF_SIG)));
View Full Code Here

      il.append(new GETFIELD(cpg.addFieldref(className, "_dom",
               DOM_INTF_SIG)));

      // Create a new instance of a StringValueHandler
      int index = cpg.addMethodref(STRING_VALUE_HANDLER, "<init>", "()V");
      il.append(new NEW(cpg.addClass(STRING_VALUE_HANDLER)));
      il.append(DUP);
      il.append(DUP);
      il.append(new INVOKESPECIAL(index));
     
      // Store new Handler into a local variable
View Full Code Here

      final int current = methodGen.getLocalIndex("current");

      // Push required parameters
      il.append(classGen.loadTranslet());
      if (classGen.isExternal()) {
    il.append(new CHECKCAST(cpg.addClass(className)));
      }
      il.append(methodGen.loadDOM());

      // Create new instance of DOM class
      int index = cpg.addMethodref(DOM_IMPL, "<init>", "(I)V");
View Full Code Here

      }
      il.append(methodGen.loadDOM());

      // Create new instance of DOM class
      int index = cpg.addMethodref(DOM_IMPL, "<init>", "(I)V");
      il.append(new NEW(cpg.addClass(DOM_IMPL)));
      il.append(DUP);
      il.append(DUP);
      il.append(new PUSH(cpg, RTF_INITIAL_SIZE));
      il.append(new INVOKESPECIAL(index));
     
View Full Code Here

     
      // Store new DOM into a local variable
      newDom = methodGen.addLocalVariable("rt_to_reference_dom",
            Util.getJCRefType(DOM_INTF_SIG),
            null, null);
      il.append(new CHECKCAST(cpg.addClass(DOM_INTF_SIG)));
      il.append(new ASTORE(newDom.getIndex()));

      // Overwrite old handler with DOM handler
      index = cpg.addMethodref(DOM_IMPL,
             "getOutputDomBuilder",
View Full Code Here

  il.append(classGen.loadTranslet());
  il.append(new PUSH(cpg, _name.toString()));

  // Manufacture a DecimalFormatSymbols on the stack
  // for call to addDecimalFormat()
  il.append(new NEW(cpg.addClass(DFS_CLASS)));
  il.append(DUP);
  il.append(new INVOKESPECIAL(init));

  String tmp = getAttribute("NaN");
  if ((tmp == null) || (tmp.equals(EMPTYSTRING))) {
View Full Code Here

  il.append(classGen.loadTranslet());
  il.append(new PUSH(cpg, EMPTYSTRING));

  // Manufacture a DecimalFormatSymbols on the stack
  // for call to addDecimalFormat()
  il.append(new NEW(cpg.addClass(DFS_CLASS)));
  il.append(DUP);
  il.append(new INVOKESPECIAL(init));

  int nan = cpg.addMethodref(DFS_CLASS,
           "setNaN", "(Ljava/lang/String;)V");
View Full Code Here

  local = testGen.addLocalVariable("document",
           Util.getJCRefType(DOM_INTF_SIG),
           null, null);
  final String className = classGen.getClassName();
  il.append(filterGen.loadTranslet());
  il.append(new CHECKCAST(cpg.addClass(className)));
  il.append(new GETFIELD(cpg.addFieldref(className,
                 DOM_FIELD, DOM_INTF_SIG)));
  il.append(new ASTORE(local.getIndex()));

  // Store the dom index in the test generator
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.