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

Java ALOAD类代码示例

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

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



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

示例1: loadLocal

import com.sun.org.apache.bcel.internal.generic.ALOAD; //导入依赖的package包/类
/**
 * Helper method to generate an instance of a subclass of
 * {@link LoadInstruction} based on the specified {@link Type} that will
 * load the specified local variable
 * @param index the JVM stack frame index of the variable that is to be
 * loaded
 * @param type the {@link Type} of the variable
 * @return the generated {@link LoadInstruction}
 */
private static Instruction loadLocal(int index, Type type) {
    if (type == Type.BOOLEAN) {
       return new ILOAD(index);
    } else if (type == Type.INT) {
       return new ILOAD(index);
    } else if (type == Type.SHORT) {
       return new ILOAD(index);
    } else if (type == Type.LONG) {
       return new LLOAD(index);
    } else if (type == Type.BYTE) {
       return new ILOAD(index);
    } else if (type == Type.CHAR) {
       return new ILOAD(index);
    } else if (type == Type.FLOAT) {
       return new FLOAD(index);
    } else if (type == Type.DOUBLE) {
       return new DLOAD(index);
    } else {
       return new ALOAD(index);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:MethodGenerator.java


示例2: CompareGenerator

import com.sun.org.apache.bcel.internal.generic.ALOAD; //导入依赖的package包/类
public CompareGenerator(int access_flags, Type return_type,
                        Type[] arg_types, String[] arg_names,
                        String method_name, String class_name,
                        InstructionList il, ConstantPoolGen cp) {
    super(access_flags, return_type, arg_types, arg_names, method_name,
          class_name, il, cp);

    _iloadCurrent = new ILOAD(CURRENT_INDEX);
    _istoreCurrent = new ISTORE(CURRENT_INDEX);
    _aloadDom = new ALOAD(DOM_INDEX);
    _iloadLast = new ILOAD(LAST_INDEX);

    LocalVariableGen iterator =
        addLocalVariable("iterator",
                         Util.getJCRefType(Constants.NODE_ITERATOR_SIG),
                         null, null);
    ITERATOR_INDEX = iterator.getIndex();
    _aloadIterator = new ALOAD(ITERATOR_INDEX);
    _astoreIterator = new ASTORE(ITERATOR_INDEX);
    il.append(new ACONST_NULL());
    il.append(storeIterator());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:CompareGenerator.java


示例3: releaseResultTree

import com.sun.org.apache.bcel.internal.generic.ALOAD; //导入依赖的package包/类
/**
 * Release the compiled result tree.
 */
public void releaseResultTree(ClassGenerator classGen, MethodGenerator methodGen) {
    if (_domAdapter != null) {
        final ConstantPoolGen cpg = classGen.getConstantPool();
        final InstructionList il = methodGen.getInstructionList();
        if (classGen.getStylesheet().callsNodeset() && classGen.getDOMClass().equals(MULTI_DOM_CLASS)) {
            final int removeDA = cpg.addMethodref(MULTI_DOM_CLASS, "removeDOMAdapter", "(" + DOM_ADAPTER_SIG + ")V");
            il.append(methodGen.loadDOM());
            il.append(new CHECKCAST(cpg.addClass(MULTI_DOM_CLASS)));
            il.append(new ALOAD(_domAdapter.getIndex()));
            il.append(new CHECKCAST(cpg.addClass(DOM_ADAPTER_CLASS)));
            il.append(new INVOKEVIRTUAL(removeDA));
        }
        final int release = cpg.addInterfaceMethodref(DOM_IMPL_CLASS, "release", "()V");
        il.append(new ALOAD(_domAdapter.getIndex()));
        il.append(new INVOKEINTERFACE(release, 1));
        _domAdapter = null;
     }
 }
 
开发者ID:campolake,项目名称:openjdk9,代码行数:22,代码来源:WithParam.java


示例4: FilterGenerator

import com.sun.org.apache.bcel.internal.generic.ALOAD; //导入依赖的package包/类
public FilterGenerator(String className, String superClassName,
                       String fileName,
                       int accessFlags, String[] interfaces,
                       Stylesheet stylesheet) {
    super(className, superClassName, fileName,
          accessFlags, interfaces, stylesheet);

    _aloadTranslet = new ALOAD(TRANSLET_INDEX);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:FilterGenerator.java


示例5: ClassGenerator

import com.sun.org.apache.bcel.internal.generic.ALOAD; //导入依赖的package包/类
public ClassGenerator(String class_name, String super_class_name,
                      String file_name,
                      int access_flags, String[] interfaces,
                      Stylesheet stylesheet) {
    super(class_name, super_class_name, file_name,
          access_flags, interfaces);
    _stylesheet = stylesheet;
    _parser = stylesheet.getParser();
    _aloadTranslet = new ALOAD(TRANSLET_INDEX);

    if (stylesheet.isMultiDocument()) {
        _domClass = "com.sun.org.apache.xalan.internal.xsltc.dom.MultiDOM";
        _domClassSig = "Lcom/sun/org/apache/xalan/internal/xsltc/dom/MultiDOM;";
    }
    else {
        _domClass = "com.sun.org.apache.xalan.internal.xsltc.dom.DOMAdapter";
        _domClassSig = "Lcom/sun/org/apache/xalan/internal/xsltc/dom/DOMAdapter;";
    }
    _applyTemplatesSig = "("
        + Constants.DOM_INTF_SIG
        + Constants.NODE_ITERATOR_SIG
        + Constants.TRANSLET_OUTPUT_SIG
        + ")V";

_applyTemplatesSigForImport = "("
    + Constants.DOM_INTF_SIG
    + Constants.NODE_ITERATOR_SIG
    + Constants.TRANSLET_OUTPUT_SIG
    + Constants.NODE_FIELD_SIG
    + ")V";
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:32,代码来源:ClassGenerator.java


示例6: NodeSortRecordGenerator

import com.sun.org.apache.bcel.internal.generic.ALOAD; //导入依赖的package包/类
public NodeSortRecordGenerator(String className, String superClassName,
                               String fileName,
                               int accessFlags, String[] interfaces,
                               Stylesheet stylesheet) {
    super(className, superClassName, fileName,
          accessFlags, interfaces, stylesheet);
    _aloadTranslet = new ALOAD(TRANSLET_INDEX);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:NodeSortRecordGenerator.java


示例7: RtMethodGenerator

import com.sun.org.apache.bcel.internal.generic.ALOAD; //导入依赖的package包/类
public RtMethodGenerator(int access_flags, Type return_type,
                         Type[] arg_types, String[] arg_names,
                         String method_name, String class_name,
                         InstructionList il, ConstantPoolGen cp) {
    super(access_flags, return_type, arg_types, arg_names, method_name,
          class_name, il, cp);

    _astoreHandler = new ASTORE(HANDLER_INDEX);
    _aloadHandler  = new ALOAD(HANDLER_INDEX);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:RtMethodGenerator.java


示例8: TestGenerator

import com.sun.org.apache.bcel.internal.generic.ALOAD; //导入依赖的package包/类
public TestGenerator(int access_flags, Type return_type,
                     Type[] arg_types, String[] arg_names,
                     String method_name, String class_name,
                     InstructionList il, ConstantPoolGen cp) {
    super(access_flags, return_type, arg_types, arg_names, method_name,
          class_name, il, cp);

    _iloadCurrent  = new ILOAD(CURRENT_NODE_INDEX);
    _istoreCurrent = new ISTORE(CURRENT_NODE_INDEX);
    _iloadContext  = new ILOAD(CONTEXT_NODE_INDEX);
    _istoreContext  = new ILOAD(CONTEXT_NODE_INDEX);
    _astoreIterator = new ASTORE(ITERATOR_INDEX);
    _aloadIterator  = new ALOAD(ITERATOR_INDEX);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:TestGenerator.java


示例9: releaseResultTree

import com.sun.org.apache.bcel.internal.generic.ALOAD; //导入依赖的package包/类
/**
 * Release the compiled result tree.
 */
public void releaseResultTree(ClassGenerator classGen,
                              MethodGenerator methodGen)
{
    if (_domAdapter != null) {
        final ConstantPoolGen cpg = classGen.getConstantPool();
        final InstructionList il = methodGen.getInstructionList();
        if (classGen.getStylesheet().callsNodeset() &&
            classGen.getDOMClass().equals(MULTI_DOM_CLASS))
        {
            final int removeDA =
                cpg.addMethodref(MULTI_DOM_CLASS, "removeDOMAdapter",
                                 "(" + DOM_ADAPTER_SIG + ")V");
            il.append(methodGen.loadDOM());
            il.append(new CHECKCAST(cpg.addClass(MULTI_DOM_CLASS)));
            il.append(new ALOAD(_domAdapter.getIndex()));
            il.append(new CHECKCAST(cpg.addClass(DOM_ADAPTER_CLASS)));
            il.append(new INVOKEVIRTUAL(removeDA));
        }
        final int release =
            cpg.addInterfaceMethodref(DOM_IMPL_CLASS, "release", "()V");
        il.append(new ALOAD(_domAdapter.getIndex()));
        il.append(new INVOKEINTERFACE(release, 1));
        _domAdapter.setEnd(il.getEnd());
        methodGen.removeLocalVariable(_domAdapter);
        _domAdapter = null;
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:31,代码来源:WithParam.java


示例10: compileConstructor

import com.sun.org.apache.bcel.internal.generic.ALOAD; //导入依赖的package包/类
/**
 * Compiles a constructor for the class <tt>_className</tt> that
 * inherits from {Any,Single,Multiple}NodeCounter. This constructor
 * simply calls the same constructor in the super class.
 */
private void compileConstructor(ClassGenerator classGen) {
    MethodGenerator cons;
    final InstructionList il = new InstructionList();
    final ConstantPoolGen cpg = classGen.getConstantPool();

    cons = new MethodGenerator(ACC_PUBLIC,
                               com.sun.org.apache.bcel.internal.generic.Type.VOID,
                               new com.sun.org.apache.bcel.internal.generic.Type[] {
                                   Util.getJCRefType(TRANSLET_INTF_SIG),
                                   Util.getJCRefType(DOM_INTF_SIG),
                                   Util.getJCRefType(NODE_ITERATOR_SIG),
                                   com.sun.org.apache.bcel.internal.generic.Type.BOOLEAN
                               },
                               new String[] {
                                   "dom",
                                   "translet",
                                   "iterator",
                                   "hasFrom"
                               },
                               "<init>", _className, il, cpg);

    il.append(ALOAD_0);         // this
    il.append(ALOAD_1);         // translet
    il.append(ALOAD_2);         // DOM
    il.append(new ALOAD(3));    // iterator
    il.append(new ILOAD(4));    // hasFrom

    int index = cpg.addMethodref(ClassNames[_level],
                                 "<init>",
                                 "(" + TRANSLET_INTF_SIG
                                 + DOM_INTF_SIG
                                 + NODE_ITERATOR_SIG
                                 + "Z)V");
    il.append(new INVOKESPECIAL(index));
    il.append(RETURN);

    classGen.addMethod(cons);
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:44,代码来源:Number.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java ModelerMessages类代码示例发布时间:2022-05-23
下一篇:
Java Compiler类代码示例发布时间: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