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

Java CHECKCAST类代码示例

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

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



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

示例1: translate

import com.sun.org.apache.bcel.internal.generic.CHECKCAST; //导入依赖的package包/类
/**
 * Translate a predicate expression. If non of the optimizations apply
 * then this translation pushes two references on the stack: a reference
 * to a newly created filter object and a reference to the predicate's
 * closure. See class <code>Step</code> for further details.
 */
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {

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

    if (_nthPositionFilter || _nthDescendant) {
        _exp.translate(classGen, methodGen);
    }
    else if (isNodeValueTest() && (getParent() instanceof Step)) {
        _value.translate(classGen, methodGen);
        il.append(new CHECKCAST(cpg.addClass(STRING_CLASS)));
        il.append(new PUSH(cpg, ((EqualityExpr)_exp).getOp()));
    }
    else {
        translateFilter(classGen, methodGen);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:Predicate.java


示例2: unmapRegister

import com.sun.org.apache.bcel.internal.generic.CHECKCAST; //导入依赖的package包/类
/**
 * Remove the mapping of this variable to a register.
 * Called when we leave the AST scope of the variable's declaration
 */
public void unmapRegister(ClassGenerator classGen, MethodGenerator methodGen) {
    if (_local != null) {
        if (_type instanceof ResultTreeType) {
            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(loadInstruction());
                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(loadInstruction());
            il.append(new INVOKEINTERFACE(release, 1));
        }

        _local.setEnd(methodGen.getInstructionList().getEnd());
        methodGen.removeLocalVariable(_local);
        _refs = null;
        _local = null;
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:29,代码来源:VariableBase.java


示例3: releaseResultTree

import com.sun.org.apache.bcel.internal.generic.CHECKCAST; //导入依赖的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: translate

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

    _right.translate(classGen, methodGen);
    il.append(new CHECKCAST(cpg.addClass(_className)));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:CastCall.java


示例5: translateUnBox

import com.sun.org.apache.bcel.internal.generic.CHECKCAST; //导入依赖的package包/类
/**
 * Translates an object of this type to its unboxed representation.
 */
public void translateUnBox(ClassGenerator classGen,
                           MethodGenerator methodGen) {
    final ConstantPoolGen cpg = classGen.getConstantPool();
    final InstructionList il = methodGen.getInstructionList();
    il.append(new CHECKCAST(cpg.addClass(INTEGER_CLASS)));
    final int index = cpg.addMethodref(INTEGER_CLASS,
                                       INT_VALUE,
                                       INT_VALUE_SIG);
    il.append(new INVOKEVIRTUAL(index));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:IntType.java


示例6: translateUnBox

import com.sun.org.apache.bcel.internal.generic.CHECKCAST; //导入依赖的package包/类
/**
 * Translates an object of this type to its unboxed representation.
 */
public void translateUnBox(ClassGenerator classGen,
                           MethodGenerator methodGen) {
    final ConstantPoolGen cpg = classGen.getConstantPool();
    final InstructionList il = methodGen.getInstructionList();
    il.append(new CHECKCAST(cpg.addClass(DOUBLE_CLASS)));
    il.append(new INVOKEVIRTUAL(cpg.addMethodref(DOUBLE_CLASS,
                                                 DOUBLE_VALUE,
                                                 DOUBLE_VALUE_SIG)));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:RealType.java


示例7: translateUnBox

import com.sun.org.apache.bcel.internal.generic.CHECKCAST; //导入依赖的package包/类
/**
 * Translates an object of this type to its unboxed representation.
 */
public void translateUnBox(ClassGenerator classGen,
                           MethodGenerator methodGen) {
    final ConstantPoolGen cpg = classGen.getConstantPool();
    final InstructionList il = methodGen.getInstructionList();
    il.append(new CHECKCAST(cpg.addClass(BOOLEAN_CLASS)));
    il.append(new INVOKEVIRTUAL(cpg.addMethodref(BOOLEAN_CLASS,
                                                 BOOLEAN_VALUE,
                                                 BOOLEAN_VALUE_SIG)));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:BooleanType.java


示例8: translateUnBox

import com.sun.org.apache.bcel.internal.generic.CHECKCAST; //导入依赖的package包/类
/**
 * Translates an object of this type to its unboxed representation.
 */
public void translateUnBox(ClassGenerator classGen,
                           MethodGenerator methodGen) {
    final ConstantPoolGen cpg = classGen.getConstantPool();
    final InstructionList il = methodGen.getInstructionList();
    il.append(new CHECKCAST(cpg.addClass(RUNTIME_NODE_CLASS)));
    il.append(new GETFIELD(cpg.addFieldref(RUNTIME_NODE_CLASS,
                                           NODE_FIELD,
                                           NODE_FIELD_SIG)));
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:NodeType.java


示例9: releaseResultTree

import com.sun.org.apache.bcel.internal.generic.CHECKCAST; //导入依赖的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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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