public boolean isSignificant() {
return false;
}
static SourceLineAnnotation getSourceAnnotationForMethod(String className, String methodName, String methodSig) {
JavaClassAndMethod targetMethod = null;
Code code = null;
try {
JavaClass targetClass = AnalysisContext.currentAnalysisContext().lookupClass(className);
targetMethod = Hierarchy.findMethod(targetClass, methodName, methodSig);
if (targetMethod != null) {
Method method = targetMethod.getMethod();
if (method != null) {
code = method.getCode();
}
}
} catch (ClassNotFoundException e) {
AnalysisContext.reportMissingClass(e);
}
SourceInfoMap sourceInfoMap = AnalysisContext.currentAnalysisContext().getSourceInfoMap();
SourceInfoMap.SourceLineRange range = sourceInfoMap.getMethodLine(className, methodName, methodSig);
if (range != null) {
return new SourceLineAnnotation(className, AnalysisContext.currentAnalysisContext().lookupSourceFile(className),
range.getStart(), range.getEnd(), 0, code == null ? -1 : code.getLength());
}
if (sourceInfoMap.fallBackToClassfile() && targetMethod != null) {
return forEntireMethod(targetMethod.getJavaClass(), targetMethod.getMethod());
}
// If we couldn't find the source lines,
// create an unknown source line annotation referencing
// the class and source file.