Package org.apache.bcel.generic

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


  // context node is on the stack
  int gname = cpg.addInterfaceMethodref(DOM_INTF,
                "getNodeName",
                "(I)Ljava/lang/String;");
  int cmp = cpg.addMethodref(STRING_CLASS,
           "equals", "(Ljava/lang/Object;)Z");

  // Push current node on the stack
  il.append(methodGen.loadCurrentNode());
  il.append(SWAP);
View Full Code Here


  // Generete the value of the parameter (use value in 'select' by def.)
  translateValue(classGen, methodGen);
  // Mark this parameter value is not being the default value
  il.append(new PUSH(cpg, false));
  // Pass the parameter to the template
  il.append(new INVOKEVIRTUAL(cpg.addMethodref(TRANSLET_CLASS,
                 ADD_PARAMETER,
                 ADD_PARAMETER_SIG)));
  il.append(POP); // cleanup stack
    }
}
View Full Code Here

  else if (_paramType == Type.Node) {
      _param.translate(classGen, methodGen);
  }
  else if (_paramType == Type.Reference) {
      _param.translate(classGen, methodGen);
      il.append(new INVOKESTATIC(cpg.addMethodref
               (BASIS_LIBRARY_CLASS,
          "referenceToNodeSet",
          "(Ljava/lang/Object;)" +
          "Lorg/apache/xalan/xsltc/" +
          "NodeIterator;")));
View Full Code Here

  else if (tselect instanceof ReferenceType) {
      _select.translate(classGen, methodGen);
      il.append(methodGen.loadHandler());
      il.append(methodGen.loadCurrentNode());
      il.append(methodGen.loadDOM());
      final int copy = cpg.addMethodref(BASIS_LIBRARY_CLASS, "copy",
                "("
                + OBJECT_SIG 
                + TRANSLET_OUTPUT_SIG
                + NODE_SIG
                + DOM_INTF_SIG
View Full Code Here

  }
  else {
      il.append(classGen.loadTranslet());
      _select.translate(classGen, methodGen);
      il.append(methodGen.loadHandler());
      il.append(new INVOKEVIRTUAL(cpg.addMethodref(TRANSLET_CLASS,
               CHARACTERSW,
               CHARACTERSW_SIG)));
  }

    }
View Full Code Here

  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();

  // Returns the KeyIndex object of a given name
  final int getKeyIndex = cpg.addMethodref(TRANSLET_CLASS,
             "getKeyIndex",
             "(Ljava/lang/String;)"+
             KEY_INDEX_SIG);
 
  // Initialises a KeyIndex to return nodes with specific values
View Full Code Here

             "getKeyIndex",
             "(Ljava/lang/String;)"+
             KEY_INDEX_SIG);
 
  // Initialises a KeyIndex to return nodes with specific values
  final int lookupId = cpg.addMethodref(KEY_INDEX_CLASS,
                "containsID",
                "(ILjava/lang/Object;)I");
  final int lookupKey = cpg.addMethodref(KEY_INDEX_CLASS,
                 "containsKey",
                 "(ILjava/lang/Object;)I");
View Full Code Here

 
  // Initialises a KeyIndex to return nodes with specific values
  final int lookupId = cpg.addMethodref(KEY_INDEX_CLASS,
                "containsID",
                "(ILjava/lang/Object;)I");
  final int lookupKey = cpg.addMethodref(KEY_INDEX_CLASS,
                 "containsKey",
                 "(ILjava/lang/Object;)I");

  // Call getKeyIndex in AbstractTranslet with the name of the key
  // to get the index for this key (which is also a node iterator).
View Full Code Here

      il.append(DUP);
  }
 
  il.append(classGen.loadTranslet());
  il.append(transf.loadDOM());
  il.append(new INVOKEVIRTUAL(cpg.addMethodref(TRANSLET_CLASS,
                 "makeDOMAdapter",
                 "("+DOM_INTF_SIG+")"+
                 DOM_ADAPTER_SIG)));
  // DOMAdapter is on the stack
View Full Code Here

                 "("+DOM_INTF_SIG+")"+
                 DOM_ADAPTER_SIG)));
  // DOMAdapter is on the stack

  if (isMultiDocument()) {
      final int init = cpg.addMethodref(MULTI_DOM_CLASS,
                "<init>",
                "("+DOM_INTF_SIG+")V");
      il.append(new INVOKESPECIAL(init));
      // MultiDOM is on the stack
  }
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.