• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java INVOKESTATIC类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.org.apache.bcel.internal.generic.INVOKESTATIC的典型用法代码示例。如果您正苦于以下问题:Java INVOKESTATIC类的具体用法?Java INVOKESTATIC怎么用?Java INVOKESTATIC使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



INVOKESTATIC类属于com.sun.org.apache.bcel.internal.generic包,在下文中一共展示了INVOKESTATIC类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: translate

import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC; //导入依赖的package包/类
/**
 * This method is called when the constructor is compiled in
 * Stylesheet.compileConstructor() and not as the syntax tree is traversed.
 */
public void translate(ClassGenerator classGen,
                      MethodGenerator methodGen) {
    final ConstantPoolGen cpg = classGen.getConstantPool();
    final InstructionList il = methodGen.getInstructionList();

    // Returns the name of a node in the DOM
    final int getNodeName = cpg.addInterfaceMethodref(DOM_INTF,
                                                      "getNodeName",
                                                      "(I)"+STRING_SIG);

    final int getLocalName = cpg.addMethodref(BASIS_LIBRARY_CLASS,
                                              "getLocalName",
                                              "(Ljava/lang/String;)"+
                                              "Ljava/lang/String;");
    super.translate(classGen, methodGen);
    il.append(new INVOKEINTERFACE(getNodeName, 2));
    il.append(new INVOKESTATIC(getLocalName));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:LocalNameCall.java


示例2: translate

import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC; //导入依赖的package包/类
/**
 * Translate the fallback element (if any).
 */
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
    if (_fallbacks != null) {
        int count = _fallbacks.size();
        for (int i = 0; i < count; i++) {
            Fallback fallback = (Fallback)_fallbacks.elementAt(i);
            fallback.translate(classGen, methodGen);
        }
    }
    // We only go into the else block in forward-compatibility mode, when
    // the unsupported element has no fallback.
    else {
        // If the unsupported element does not have any fallback child, then
        // at runtime, a runtime error should be raised when the unsupported
        // element is instantiated. Otherwise, no error is thrown.
        ConstantPoolGen cpg = classGen.getConstantPool();
        InstructionList il = methodGen.getInstructionList();

        final int unsupportedElem = cpg.addMethodref(BASIS_LIBRARY_CLASS, "unsupported_ElementF",
                                                     "(" + STRING_SIG + "Z)V");
        il.append(new PUSH(cpg, getQName().toString()));
        il.append(new PUSH(cpg, _isExtension));
        il.append(new INVOKESTATIC(unsupportedElem));
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:UnsupportedElement.java


示例3: translate

import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC; //导入依赖的package包/类
/**
 * This method is called when the constructor is compiled in
 * Stylesheet.compileConstructor() and not as the syntax tree is traversed.
 */
public void translate(ClassGenerator classGen,
                      MethodGenerator methodGen) {
    final ConstantPoolGen cpg = classGen.getConstantPool();
    final InstructionList il = methodGen.getInstructionList();

    final int tst = cpg.addMethodref(BASIS_LIBRARY_CLASS,
                                     "testLanguage",
                                     "("+STRING_SIG+DOM_INTF_SIG+"I)Z");
    _lang.translate(classGen,methodGen);
    il.append(methodGen.loadDOM());
    if (classGen instanceof FilterGenerator)
        il.append(new ILOAD(1));
    else
        il.append(methodGen.loadContextNode());
    il.append(new INVOKESTATIC(tst));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:LangCall.java


示例4: translateTo

import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC; //导入依赖的package包/类
/**
 * Translates reference into object of internal type <code>type</code>.
 *
 * @see     com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
 */
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
                        StringType type) {
    final int current = methodGen.getLocalIndex("current");
    ConstantPoolGen cpg = classGen.getConstantPool();
    InstructionList il = methodGen.getInstructionList();

    // If no current, conversion is a top-level
    if (current < 0) {
        il.append(new PUSH(cpg, DTM.ROOT_NODE));  // push root node
    }
    else {
        il.append(new ILOAD(current));
    }
    il.append(methodGen.loadDOM());
    final int stringF = cpg.addMethodref(BASIS_LIBRARY_CLASS,
                                         "stringF",
                                         "("
                                         + OBJECT_SIG
                                         + NODE_SIG
                                         + DOM_INTF_SIG
                                         + ")" + STRING_SIG);
    il.append(new INVOKESTATIC(stringF));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:29,代码来源:ReferenceType.java


示例5: translate

import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC; //导入依赖的package包/类
/**
 * Translate the code required for getting the node for which the
 * QName, local-name or namespace URI should be extracted.
 */
public void translate(ClassGenerator classGen,
                      MethodGenerator methodGen) {
    final ConstantPoolGen cpg = classGen.getConstantPool();
    final InstructionList il = methodGen.getInstructionList();

    il.append(methodGen.loadDOM());

    // Function was called with no parameters
    if (argumentCount() == 0) {
        il.append(methodGen.loadContextNode());
    }
    // Function was called with node parameter
    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",
                                    "("
                                    + OBJECT_SIG
                                    + ")"
                                    + NODE_ITERATOR_SIG)));
        il.append(methodGen.nextNode());
    }
    // Function was called with node-set parameter
    else {
        _param.translate(classGen, methodGen);
        _param.startIterator(classGen, methodGen);
        il.append(methodGen.nextNode());
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:38,代码来源:NameBase.java


示例6: translate

import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC; //导入依赖的package包/类
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
    final ConstantPoolGen cpg = classGen.getConstantPool();
    final InstructionList il = methodGen.getInstructionList();

    _value.translate(classGen, methodGen);
    _format.translate(classGen, methodGen);

    final int fn3arg = cpg.addMethodref(BASIS_LIBRARY_CLASS,
                                        "formatNumber",
                                        "(DLjava/lang/String;"+
                                        "Ljava/text/DecimalFormat;)"+
                                        "Ljava/lang/String;");
    final int get = cpg.addMethodref(TRANSLET_CLASS,
                                     "getDecimalFormat",
                                     "(Ljava/lang/String;)"+
                                     "Ljava/text/DecimalFormat;");

    il.append(classGen.loadTranslet());
    if (_name == null) {
        il.append(new PUSH(cpg, EMPTYSTRING));
    }
    else if (_resolvedQName != null) {
        il.append(new PUSH(cpg, _resolvedQName.toString()));
    }
    else {
        _name.translate(classGen, methodGen);
    }
    il.append(new INVOKEVIRTUAL(get));
    il.append(new INVOKESTATIC(fn3arg));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:FormatNumberCall.java


示例7: translate

import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC; //导入依赖的package包/类
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
    if (hasNodeSetArgs() || hasReferenceArgs()) {
        final ConstantPoolGen cpg = classGen.getConstantPool();
        final InstructionList il = methodGen.getInstructionList();

        // Call compare() from the BasisLibrary
        _left.translate(classGen, methodGen);
        _left.startIterator(classGen, methodGen);
        _right.translate(classGen, methodGen);
        _right.startIterator(classGen, methodGen);

        il.append(new PUSH(cpg, _op));
        il.append(methodGen.loadDOM());

        int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "compare",
                                     "("
                                     + _left.getType().toSignature()
                                     + _right.getType().toSignature()
                                     + "I"
                                     + DOM_INTF_SIG
                                     + ")Z");
        il.append(new INVOKESTATIC(index));
    }
    else {
        translateDesynthesized(classGen, methodGen);
        synthesize(classGen, methodGen);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:29,代码来源:RelationalExpr.java


示例8: translate

import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC; //导入依赖的package包/类
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
    final ConstantPoolGen cpg = classGen.getConstantPool();
    final InstructionList il = methodGen.getInstructionList();

    // Get two copies of the argument on the stack
    argument().translate(classGen, methodGen);
            il.append(new INVOKESTATIC(cpg.addMethodref(BASIS_LIBRARY_CLASS,
                                                        "roundF", "(D)D")));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:RoundCall.java


示例9: translateUnallowedExtension

import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC; //导入依赖的package包/类
/**
 * Translate code to call the BasisLibrary.unallowed_extensionF(String)
 * method.
 */
private void translateUnallowedExtension(ConstantPoolGen cpg,
                                         InstructionList il) {
    int index = cpg.addMethodref(BASIS_LIBRARY_CLASS,
                                 "unallowed_extension_functionF",
                                 "(Ljava/lang/String;)V");
    il.append(new PUSH(cpg, _fname.toString()));
    il.append(new INVOKESTATIC(index));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:FunctionCall.java



注:本文中的com.sun.org.apache.bcel.internal.generic.INVOKESTATIC类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SoapFault类代码示例发布时间:2022-05-23
下一篇:
Java BasePagingLoadResult类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap