本文整理汇总了Java中org.objectweb.asm.tree.analysis.Interpreter类的典型用法代码示例。如果您正苦于以下问题:Java Interpreter类的具体用法?Java Interpreter怎么用?Java Interpreter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Interpreter类属于org.objectweb.asm.tree.analysis包,在下文中一共展示了Interpreter类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: merge
import org.objectweb.asm.tree.analysis.Interpreter; //导入依赖的package包/类
@Override
public boolean merge(final Frame<? extends BasicValue> frame,
final Interpreter<BasicValue> interpreter) throws AnalyzerException
{
if (force)
{
// uses the current frame
return true;
}
if (frame instanceof ExtendedFrame && ((ExtendedFrame) frame).force)
{
init(frame);
return true;
}
return super.merge(frame, interpreter);
}
示例2: merge
import org.objectweb.asm.tree.analysis.Interpreter; //导入依赖的package包/类
/**
* Merges this frame with the given frame.
*
* @param frame
* a frame.
* @param interpreter
* the interpreter used to merge values.
* @return <tt>true</tt> if this frame has been changed as a result of the
* merge operation, or <tt>false</tt> otherwise.
* @throws AnalyzerException
* if the frames have incompatible sizes.
*/
public boolean merge(final Frame<? extends V> frame,
final Interpreter interpreter) throws AnalyzerException {
if (top != frame.top) {
throw new AnalyzerException(null, "Incompatible stack heights");
}
boolean changes = false;
for (int i = 0; i < locals + top; ++i) {
V v = (V) interpreter.merge(values[i], frame.values[i]);
if (!v.equals(values[i])) {
values[i] = v;
changes = true;
}
}
return changes;
}
示例3: execute
import org.objectweb.asm.tree.analysis.Interpreter; //导入依赖的package包/类
public void execute(AbstractInsnNode insn, Interpreter interpreter) throws AnalyzerException {
boolean never = false;
if (never) {
super.execute(insn, interpreter);
return;
}
int insnOpcode = insn.getOpcode();
if (insnOpcode == Opcodes.MONITORENTER || insnOpcode == Opcodes.MONITOREXIT) {
Value pop = pop();
interpreter.unaryOperation(insn, pop);
int local = -1;
for (int i = 0; i < getLocals(); i++) {
if (getLocal(i) == pop) local = i;
}
if (local > -1) {
if (insnOpcode == Opcodes.MONITORENTER) {
monitorEnter(local);
} else {
monitorExit(local);
}
}
} else {
super.execute(insn, interpreter);
}
}
示例4: execute
import org.objectweb.asm.tree.analysis.Interpreter; //导入依赖的package包/类
public void execute(AbstractInsnNode insn, Interpreter interpreter)
throws AnalyzerException {
boolean never = false;
if (never) {
super.execute(insn, interpreter);
return;
}
int insnOpcode = insn.getOpcode();
if (insnOpcode == Opcodes.MONITORENTER || insnOpcode == Opcodes.MONITOREXIT) {
Value pop = pop();
interpreter.unaryOperation(insn, pop);
int local = -1;
for (int i = 0; i < getLocals(); i++) {
if (getLocal(i) == pop) local = i;
}
if (local > -1) {
if (insnOpcode == Opcodes.MONITORENTER) {
monitorEnter(local);
} else {
monitorExit(local);
}
}
} else {
super.execute(insn, interpreter);
}
}
示例5: MethodAnalyzer
import org.objectweb.asm.tree.analysis.Interpreter; //导入依赖的package包/类
/**
* Constructor.
*
* @param interpreter the interpreter to use
*/
public MethodAnalyzer(final Interpreter<V> interpreter) {
super(interpreter);
}