本文整理汇总了Java中edu.umd.cs.findbugs.bcel.OpcodeStackDetector类的典型用法代码示例。如果您正苦于以下问题:Java OpcodeStackDetector类的具体用法?Java OpcodeStackDetector怎么用?Java OpcodeStackDetector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OpcodeStackDetector类属于edu.umd.cs.findbugs.bcel包,在下文中一共展示了OpcodeStackDetector类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: resetForMethodEntry
import edu.umd.cs.findbugs.bcel.OpcodeStackDetector; //导入依赖的package包/类
public int resetForMethodEntry(final DismantleBytecode visitor) {
this.v = visitor;
initialize();
int result = resetForMethodEntry0(v);
Code code = v.getMethod().getCode();
if (code == null)
return result;
if (useIterativeAnalysis) {
JumpInfo jump = null;
if (visitor instanceof OpcodeStackDetector.WithCustomJumpInfo) {
jump = ((OpcodeStackDetector.WithCustomJumpInfo) visitor).customJumpInfo();
} else if ((visitor instanceof OpcodeStackDetector) && !((OpcodeStackDetector)visitor).isUsingCustomUserValue()) {
jump = getJumpInfo();
}
if (jump != null) {
learnFrom(jump);
}
}
return result;
}
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:26,代码来源:OpcodeStack.java
示例2: fromCalledMethod
import edu.umd.cs.findbugs.bcel.OpcodeStackDetector; //导入依赖的package包/类
/**
* Factory method to create a MethodAnnotation from a method called by the
* instruction the given visitor is currently visiting.
*
* @param visitor
* the visitor
* @return the MethodAnnotation representing the called method
*/
public static MethodAnnotation fromCalledMethod(DismantleBytecode visitor) {
String className = visitor.getDottedClassConstantOperand();
String methodName = visitor.getNameConstantOperand();
String methodSig = visitor.getSigConstantOperand();
if (visitor instanceof OpcodeStackDetector && visitor.getOpcode() != Constants.INVOKESTATIC) {
int params = PreorderVisitor.getNumberArguments(methodSig);
OpcodeStackDetector oVisitor = (OpcodeStackDetector) visitor;
if (!oVisitor.getStack().isTop() && oVisitor.getStack().getStackDepth() > params) {
OpcodeStack.Item item = oVisitor.getStack().getStackItem(params);
String cName = ClassName.fromFieldSignature(item.getSignature());
if (cName != null)
className = cName;
}
}
return fromCalledMethod(className, methodName, methodSig, visitor.getOpcode() == Constants.INVOKESTATIC);
}
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:29,代码来源:MethodAnnotation.java
示例3: resetForMethodEntry
import edu.umd.cs.findbugs.bcel.OpcodeStackDetector; //导入依赖的package包/类
public int resetForMethodEntry(final DismantleBytecode visitor) {
this.v = visitor;
initialize();
int result = resetForMethodEntry0(v);
Code code = v.getMethod().getCode();
if (code == null)
return result;
JumpInfo jump = null;
if (useIterativeAnalysis) {
if (visitor instanceof OpcodeStackDetector.WithCustomJumpInfo) {
jump = ((OpcodeStackDetector.WithCustomJumpInfo) visitor).customJumpInfo();
} else if ((visitor instanceof OpcodeStackDetector) && !((OpcodeStackDetector)visitor).isUsingCustomUserValue()) {
jump = getJumpInfo();
} else {
jump = getJumpInfoFromStackMap();
}
} else {
jump = getJumpInfoFromStackMap();
}
learnFrom(jump);
return result;
}
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:25,代码来源:OpcodeStack.java
示例4: matches
import edu.umd.cs.findbugs.bcel.OpcodeStackDetector; //导入依赖的package包/类
public boolean matches(OpcodeStackDetector opcodeStackDetector) {
if(classesNames.size() != 0 && !classesNames.contains(opcodeStackDetector.getClassConstantOperand().replace('/','.'))) {
return false;
}
if(methodNames.size() != 0 && !methodNames.contains(opcodeStackDetector.getNameConstantOperand())) {
return false;
}
if(argSignatures.size() != 0 && !argSignatures.contains(opcodeStackDetector.getSigConstantOperand())) {
return false;
}
return true;
}
开发者ID:blackarbiter,项目名称:Android_Code_Arbiter,代码行数:13,代码来源:InvokeMatcherBuilder.java
注:本文中的edu.umd.cs.findbugs.bcel.OpcodeStackDetector类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论