當前位置: 首頁>>代碼示例>>Java>>正文


Java IClassPathBuilderProgress類代碼示例

本文整理匯總了Java中edu.umd.cs.findbugs.classfile.IClassPathBuilderProgress的典型用法代碼示例。如果您正苦於以下問題:Java IClassPathBuilderProgress類的具體用法?Java IClassPathBuilderProgress怎麽用?Java IClassPathBuilderProgress使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IClassPathBuilderProgress類屬於edu.umd.cs.findbugs.classfile包,在下文中一共展示了IClassPathBuilderProgress類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: locateCodebasesRequiredForAnalysis

import edu.umd.cs.findbugs.classfile.IClassPathBuilderProgress; //導入依賴的package包/類
/**
 * Make an effort to find the codebases containing any files required for
 * analysis.
 */
private void locateCodebasesRequiredForAnalysis(IClassPath classPath, IClassPathBuilderProgress progress)
        throws InterruptedException, IOException, ResourceNotFoundException {
    boolean foundJavaLangObject = false;
    boolean foundFindBugsAnnotations = false;
    boolean foundJSR305Annotations = false;

    for (DiscoveredCodeBase discoveredCodeBase : discoveredCodeBaseList) {
        if (!foundJavaLangObject) {
            foundJavaLangObject = probeCodeBaseForResource(discoveredCodeBase, "java/lang/Object.class");
        }
        if (!foundFindBugsAnnotations) {
            foundFindBugsAnnotations = probeCodeBaseForResource(discoveredCodeBase,
                    "edu/umd/cs/findbugs/annotations/Nonnull.class");
        }
        if (!foundJSR305Annotations) {
            foundJSR305Annotations = probeCodeBaseForResource(discoveredCodeBase, "javax/annotation/meta/TypeQualifier.class");
            if (DEBUG) {
                System.out.println("foundJSR305Annotations: " + foundJSR305Annotations);
            }
        }
    }

    if (!foundJavaLangObject) {
        processWorkList(classPath, buildSystemCodebaseList(), progress);
    }

    // If we're running findbugs-full.jar, IT contains the contents
    // of jsr305.jar and annotations.jar. So, add it to the classpath.
    if (runningFindBugsFullJar()) {
        processWorkList(classPath, buildFindBugsFullJarCodebaseList(), progress);
        return;
    }

    // Not running findbugs-full.jar: try to find jsr305.jar and
    // annotations.jar.

    if (!foundFindBugsAnnotations) {
        processWorkList(classPath, buildFindBugsAnnotationCodebaseList(), progress);
    }
    if (!foundJSR305Annotations) {
        processWorkList(classPath, buildJSR305AnnotationsCodebaseList(), progress);
    }
}
 
開發者ID:ytus,項目名稱:findbugs-all-the-bugs,代碼行數:48,代碼來源:ClassPathBuilder.java


注:本文中的edu.umd.cs.findbugs.classfile.IClassPathBuilderProgress類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。