Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.NEW


      index = cpg.addMethodref(DOM_ADAPTER_CLASS,
             "<init>",
             "("+DOM_INTF_SIG+
             "["+STRING_SIG+
             "["+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

  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

        // UndeclaredThrowable
        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(
View Full Code Here

              "<init>",
              "("
              +NODE_ITERATOR_SIG
              +NODE_ITERATOR_SIG
              +")V");
  il.append(new NEW(cpg.addClass(STEP_ITERATOR_CLASS)));
  il.append(DUP);

  // Compile path iterator
  _path.translate(classGen, methodGen); // iterator on stack....
  _step.translate(classGen, methodGen);
View Full Code Here

     
      final int toString = cpg.addMethodref(STRING_BUFFER_CLASS,
              "toString",
              "()"+STRING_SIG);
     
      il.append(new NEW(cpg.addClass(STRING_BUFFER_CLASS)));
      il.append(DUP);
      il.append(new INVOKESPECIAL(initBuffer));
      for (int i = 0; i < nArgs; i++) {
    argument(i).translate(classGen, methodGen);
    il.append(append);
View Full Code Here

          final int initCNI = cpg.addMethodref(CACHED_NODE_LIST_ITERATOR_CLASS,
              "<init>",
              "("
              +NODE_ITERATOR_SIG
              +")V");
          il.append(new NEW(cpg.addClass(CACHED_NODE_LIST_ITERATOR_CLASS)));
          il.append(DUP_X1);
          il.append(SWAP);

          il.append(new INVOKESPECIAL(initCNI));
      }
View Full Code Here

            "("
            + NODE_ITERATOR_SIG
            + NODE_SORT_FACTORY_SIG
            + ")V")

  il.append(new NEW(cpg.addClass(SORT_ITERATOR)));
  il.append(DUP);

  // Get the current node iterator
  if (nodeSet == null) {  // apply-templates default
      final int children = cpg.addInterfaceMethodref(DOM_INTF,
View Full Code Here

  }

  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();
 
  il.append(new NEW(cpg.addClass(sortRecordFactoryClass)));
  il.append(DUP);
  il.append(methodGen.loadDOM());
  il.append(new PUSH(cpg, sortRecordClass));
  il.append(classGen.loadTranslet());
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.