当前位置: 首页>>代码示例>>Java>>正文


Java LoadInstruction类代码示例

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


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

示例1: getLoadInstruction

import org.apache.bcel.generic.LoadInstruction; //导入依赖的package包/类
private InstructionHandle getLoadInstruction(InstructionList il, 
    SpawnableCall spawnableCall) throws SyncInsertionProposalFailure {

InstructionHandle ih = spawnableCall.getInvokeInstruction();
while ((ih = ih.getNext()) != null) {
    try {
	LoadInstruction loadInstruction = 
	    (LoadInstruction) (ih.getInstruction());
	if (spawnableCall.storesIn(loadInstruction.getIndex(), ih)) {
	    return ih;
		}
    }
    catch (ClassCastException e) {
    }
}
throw new SyncInsertionProposalFailure();
   }
 
开发者ID:pieterhijma,项目名称:cashmere,代码行数:18,代码来源:EarliestLoad.java

示例2: handleLoadInstruction

import org.apache.bcel.generic.LoadInstruction; //导入依赖的package包/类
@Override
public void handleLoadInstruction(LoadInstruction obj) {
    int numProduced = obj.produceStack(cpg);
    if (numProduced == Constants.UNPREDICTABLE) {
        throw new InvalidBytecodeException("Unpredictable stack production");
    }
    int index = obj.getIndex() + numProduced;
    while (numProduced-- > 0) {
        Taint value = getFrame().getValue(--index);
        assert value.hasValidVariableIndex() : "index not set in " + methodDescriptor;
        assert index == value.getVariableIndex() : "bad index in " + methodDescriptor;
        getFrame().pushValue(new Taint(value));
    }
}
 
开发者ID:blackarbiter,项目名称:Android_Code_Arbiter,代码行数:15,代码来源:TaintFrameModelingVisitor.java

示例3: visitLoadInstruction

import org.apache.bcel.generic.LoadInstruction; //导入依赖的package包/类
public void visitLoadInstruction(LoadInstruction l) {
	// log.log(" visit load", Project.MSG_DEBUG);
	Type t = l.getType(poolGen);
	log.log("         instr(loadinstr)=" + t, Project.MSG_DEBUG);
	String type = t.toString();

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

示例4: isLoad

import org.apache.bcel.generic.LoadInstruction; //导入依赖的package包/类
private boolean isLoad(Location location) {
	Instruction ins = location.getHandle().getInstruction();
	return (ins instanceof LoadInstruction) || (ins instanceof IINC);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:5,代码来源:FindDeadLocalStores.java

示例5: visitLoadInstruction

import org.apache.bcel.generic.LoadInstruction; //导入依赖的package包/类
public void visitLoadInstruction(LoadInstruction aInstruction)
{
    mLocalVariableBitSet.set(aInstruction.getIndex());
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:5,代码来源:UnreadVariableCheck.java

示例6: isLocalLoad

import org.apache.bcel.generic.LoadInstruction; //导入依赖的package包/类
static boolean isLocalLoad(Instruction ins) {
    return (ins instanceof LoadInstruction);
}
 
开发者ID:pieterhijma,项目名称:cashmere,代码行数:4,代码来源:Cashmerec.java

示例7: instructionLoadsTo

import org.apache.bcel.generic.LoadInstruction; //导入依赖的package包/类
/** Tests whether an instruction loads to a local variable with a certain
    * index.
    *
    * When the load is used for an array store or a putfield, the result will
    * be false. It
    * uses {@link #isUsedForArrayStore(InstructionHandle)} and {@link
    * #isUsedForPutField(InstructionHandle)}.
    *
    * @param ih The instruction that is tested to load to a local variable
    * index.
    * @param localVarIndex The local variable index to which the instruction
    * may load
    *
    * @return true if the instruction loads to the local variable index, false
    * otherwise. 
    *
    * @see #isUsedForArrayStore(InstructionHandle)
    * @see #isUsedForPutField(InstructionHandle)
    */
   public boolean instructionLoadsTo(InstructionHandle ih, int localVarIndex) {
try {
    LoadInstruction loadInstruction = (LoadInstruction) (ih.getInstruction());
    return loadInstruction.getIndex() == localVarIndex && 
        !isUsedForArrayLength(ih) &&
	!isUsedForArrayStore(ih) && !isUsedForPutField(ih);
}
catch(ClassCastException e) {
    return false;
}
   }
 
开发者ID:pieterhijma,项目名称:cashmere,代码行数:31,代码来源:MethodGen.java

示例8: isLoad

import org.apache.bcel.generic.LoadInstruction; //导入依赖的package包/类
/**
 * Is instruction at given location a load?
 * 
 * @param location
 *            the location
 * @return true if instruction at given location is a load, false if not
 */
private boolean isLoad(Location location) {
    Instruction ins = location.getHandle().getInstruction();
    return (ins instanceof LoadInstruction) || (ins instanceof IINC);
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:12,代码来源:FindDeadLocalStores.java

示例9: isLoad

import org.apache.bcel.generic.LoadInstruction; //导入依赖的package包/类
/**
 * Is instruction at given location a load?
 *
 * @param location
 *            the location
 * @return true if instruction at given location is a load, false if not
 */
private boolean isLoad(Location location) {
    Instruction ins = location.getHandle().getInstruction();
    return (ins instanceof LoadInstruction) || (ins instanceof IINC);
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:12,代码来源:FindDeadLocalStores.java


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