Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.NEW


     */
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
          ReferenceType type) {
  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();
  il.append(new NEW(cpg.addClass(INTEGER_CLASS)));
  il.append(DUP_X1);
  il.append(SWAP);
  il.append(new INVOKESPECIAL(cpg.addMethodref(INTEGER_CLASS,
                 "<init>", "(I)V")));
    }
View Full Code Here


                                          il.getEnd(), null);
      _path.translate(classGen, methodGen);
            il.append(new ASTORE(pathTemp.getIndex()));

      // Create new Dup Filter Iterator
      il.append(new NEW(cpg.addClass(DUP_FILTERED_ITERATOR)));
      il.append(DUP);
            il.append(new ALOAD(pathTemp.getIndex()));

      // Initialize Dup Filter Iterator with iterator from the stack
      il.append(new INVOKESPECIAL(initDFI));
View Full Code Here

             "("+DOM_INTF_SIG+
             "["+STRING_SIG+
             "["+STRING_SIG+
             "[I"+
             "["+STRING_SIG+")V");
      il.append(new NEW(cpg.addClass(DOM_ADAPTER_CLASS)));
      il.append(new DUP_X1());
      il.append(SWAP);

      /*
       * Give the DOM adapter an empty type mapping if the nodeset
View Full Code Here

  // Manufacture a DecimalFormatSymbols on the stack
  // for call to addDecimalFormat()
        // Use the US Locale as the default, as most of its settings
        // are equivalent to the default settings required of
  il.append(new NEW(cpg.addClass(DFS_CLASS)));
  il.append(DUP);
        il.append(new GETSTATIC(cpg.addFieldref(LOCALE_CLASS, "US",
                                                LOCALE_SIG)));
  il.append(new INVOKESPECIAL(init));
View Full Code Here

  // Manufacture a DecimalFormatSymbols on the stack for
  // call to addDecimalFormat().  Use the US Locale as the
        // default, as most of its settings are equivalent to
        // the default settings required of xsl:decimal-format -
        // except for the NaN and infinity attributes.
  il.append(new NEW(cpg.addClass(DFS_CLASS)));
  il.append(DUP);
        il.append(new GETSTATIC(cpg.addFieldref(LOCALE_CLASS, "US",
                                                LOCALE_SIG)));
  il.append(new INVOKESPECIAL(init));
View Full Code Here

                methodGen.addLocalVariable("step_pattern_tmp2",
                                           Util.getJCRefType(NODE_ITERATOR_SIG),
                                           il.getEnd(), null);
        il.append(new ASTORE(stepIteratorTemp.getIndex()));

  il.append(new NEW(cpg.addClass(MATCHING_ITERATOR)));
  il.append(DUP);
  il.append(new ILOAD(match.getIndex()));
        il.append(new ALOAD(stepIteratorTemp.getIndex()));
  il.append(new INVOKESPECIAL(index));
View Full Code Here

        // in temporary variables, create the object and reload the
        // arguments from the temporaries to avoid the problem.

  LocalVariableGen keyIterator = translateCall(classGen, methodGen);

  il.append(new NEW(cpg.addClass(DUP_FILTERED_ITERATOR)))
  il.append(DUP);
        il.append(new ALOAD(keyIterator.getIndex()));
  il.append(new INVOKESPECIAL(dupInit));
    }
View Full Code Here

                                               expType.toJCType(),
                                               il.getEnd(), null);
                il.append(expType.STORE(paramTemp[i].getIndex()));
      }

      il.append(new NEW(cpg.addClass(_className)));
      il.append(InstructionConstants.DUP);

            for (int i = 0; i < n; i++) {
                final Expression arg = argument(i);
                il.append(arg.getType().LOAD(paramTemp[i].getIndex()));
View Full Code Here

  // Compile auxiliary class for filter
  compileFilter(classGen, methodGen);
 
  // Create new instance of filter
  il.append(new NEW(cpg.addClass(_className)));
  il.append(DUP);
  il.append(new INVOKESPECIAL(cpg.addMethodref(_className,
                 "<init>", "()V")));

  // Initialize closure variables
View Full Code Here

     */
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
          ReferenceType type) {
  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();
  il.append(new NEW(cpg.addClass(DOUBLE_CLASS)));
  il.append(DUP_X2);
  il.append(DUP_X2);
  il.append(POP);
  il.append(new INVOKESPECIAL(cpg.addMethodref(DOUBLE_CLASS,
                 "<init>", "(D)V")));
View Full Code Here

TOP

Related Classes of org.apache.bcel.generic.NEW

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.