本文整理汇总了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();
}
示例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));
}
}
示例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);
}
示例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);
}
示例5: visitLoadInstruction
import org.apache.bcel.generic.LoadInstruction; //导入依赖的package包/类
public void visitLoadInstruction(LoadInstruction aInstruction)
{
mLocalVariableBitSet.set(aInstruction.getIndex());
}
示例6: isLocalLoad
import org.apache.bcel.generic.LoadInstruction; //导入依赖的package包/类
static boolean isLocalLoad(Instruction ins) {
return (ins instanceof LoadInstruction);
}
示例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;
}
}
示例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);
}
示例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);
}