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

Java ANEWARRAY类代码示例

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

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



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

示例1: visitANEWARRAY

import org.apache.bcel.generic.ANEWARRAY; //导入依赖的package包/类
@Override
public void visitANEWARRAY(ANEWARRAY obj) {
    try {
        getFrame().popValue();
        if (FindSecBugsGlobalConfig.getInstance().isDebugTaintState()) {
            pushSafeDebug("new " + obj.getLoadClassType(cpg).getClassName() + "[]");
        } else {
            pushSafe();
        }
    } catch (DataflowAnalysisException ex) {
        throw new InvalidBytecodeException("Array length not in the stack", ex);
    }
}
 
开发者ID:blackarbiter,项目名称:Android_Code_Arbiter,代码行数:14,代码来源:TaintFrameModelingVisitor.java


示例2: visitANEWARRAY

import org.apache.bcel.generic.ANEWARRAY; //导入依赖的package包/类
public void visitANEWARRAY(ANEWARRAY n) {
	Type t = n.getType(poolGen);
	log.log("         instr(anewarray)=" + t, Project.MSG_DEBUG);
	String type = t.toString();

	design.checkClass(type);
}
 
开发者ID:cniweb,项目名称:ant-contrib,代码行数:8,代码来源:InstructionVisitor.java


示例3: loadArrayArgs

import org.apache.bcel.generic.ANEWARRAY; //导入依赖的package包/类
public void loadArrayArgs(int pc, int firstslot, int nargs) {
	append(new PUSH(cp, nargs));
	append(new ANEWARRAY(cp.addClass(STR_LUAVALUE)));
	for ( int i=0; i<nargs; i++ ) {
		append(InstructionConstants.DUP);
		append(new PUSH(cp, i));
		loadLocal(pc, firstslot++);
		append(new AASTORE());
	}	
}
 
开发者ID:gnosygnu,项目名称:luaj_xowa,代码行数:11,代码来源:JavaBuilder.java


示例4: visitANEWARRAY

import org.apache.bcel.generic.ANEWARRAY; //导入依赖的package包/类
/** Checks if the constraints of operands of the said instruction(s) are satisfied. */
public void visitANEWARRAY(ANEWARRAY o){
	indexValid(o, o.getIndex());
	Constant c = cpg.getConstant(o.getIndex());
	if (!	(c instanceof ConstantClass)){
		constraintViolated(o, "Expecting a CONSTANT_Class operand, but found a '"+c+"'.");
	}
	Type t = o.getType(cpg);
	if (t instanceof ArrayType){
		int dimensions = ((ArrayType) t).getDimensions();
		if (dimensions >= 255){
			constraintViolated(o, "Not allowed to create an array with more than 255 dimensions.");
		}
	}
}
 
开发者ID:Hu6,项目名称:VestaClient,代码行数:16,代码来源:Pass3aVerifier.java


示例5: noAliasesStoreWithIndexBefore

import org.apache.bcel.generic.ANEWARRAY; //导入依赖的package包/类
/**
 * Checks that any store in this basic block to the specified variable is the
 * result of a new() or a null.
 * @param ih handle up to where to investigate.
 * @param localVarIndex the local variable index
 * @return true if all stores are OK or there are no stores.
 */
boolean noAliasesStoreWithIndexBefore(InstructionHandle ih, LocalVariableGen lg) {
    InstructionHandle prev = null;
    for (InstructionContext ic : instructions) {
        InstructionHandle current = ic.getInstruction();
        if (current.equals(ih)) {
            break;
        }

        if (methodGen.instructionStoresTo(current, lg.getIndex())) {
            LocalVariableGen l1 = methodGen.findLocalVar(current, lg.getIndex(), false);
            if (l1 != lg) {
                prev = current;
                continue;
            }
            if (prev != null) {
                Instruction i = prev.getInstruction();
                if (i instanceof INVOKESPECIAL) {
                    INVOKESPECIAL invoker = (INVOKESPECIAL) i;
                    if (invoker.getMethodName(methodGen.getConstantPool()).equals("<init>")
                        && isNonEscapingConstructor(invoker)) {
                        continue;
                    }
                }
                if (i instanceof CHECKCAST) {
            	InstructionHandle pp = prev.getPrev();
            	if (pp != null) {
            	    i = pp.getInstruction();
            	}
                }
                if (i instanceof NEWARRAY
                        || i instanceof ANEWARRAY || i instanceof MULTIANEWARRAY
                        || i instanceof ConstantPushInstruction || i instanceof ACONST_NULL) {
                     prev = current;
                     continue;
                }
            }
            return false;

        }
        prev = current;
    }
    return true;
}
 
开发者ID:pieterhijma,项目名称:cashmere,代码行数:51,代码来源:LoadAwareBasicBlock.java


示例6: emitANEWARRAY

import org.apache.bcel.generic.ANEWARRAY; //导入依赖的package包/类
private void emitANEWARRAY(Element xml_inst, ANEWARRAY inst) {
    xml_inst.setAttribute("base-type", inst.getType(cpg).toString().replace("[]", ""));
}
 
开发者ID:shannah,项目名称:cn1,代码行数:4,代码来源:ClassToXmlvmProcess.java


示例7: createInstructionAnewarray

import org.apache.bcel.generic.ANEWARRAY; //导入依赖的package包/类
@SuppressWarnings("unused")
// Called using reflection
private Instruction createInstructionAnewarray(Element inst) {
    String classType = inst.getAttributeValue("elementType");
    return new ANEWARRAY(constantPoolGen.addClass(classType));
}
 
开发者ID:shannah,项目名称:cn1,代码行数:7,代码来源:JavaByteCodeOutputProcess.java


示例8: visitANEWARRAY

import org.apache.bcel.generic.ANEWARRAY; //导入依赖的package包/类
@Override
public void visitANEWARRAY(ANEWARRAY obj) {
    modelNormalInstruction(obj, getNumWordsConsumed(obj), 0);
    produce(IsNullValue.nonNullValue());
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:6,代码来源:IsNullValueFrameModelingVisitor.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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