Examples of IClassPath


Examples of edu.umd.cs.findbugs.classfile.IClassPath

        rfs.search();
        progress.doneRecursiveDirectorySearch();
        List<String> candidateSourceDirList = rfs.getDirectoriesScanned();

        // Build the classpath
        IClassPath classPath = null;
        try {
            IClassFactory factory = ClassFactory.instance();
            IClassPathBuilder builder = factory.createClassPathBuilder(errorLogger);

            classPath = buildClassPath(builder, factory);

            // From the application classes, find the full list of
            // fully-qualified source file names.
            List<String> fullyQualifiedSourceFileNameList = findFullyQualifiedSourceFileNames(builder, classPath);

            // Attempt to find source directories for all source files,
            // and add them to the discoveredSourceDirectoryList
            if (DEBUG) {
                System.out.println("looking for " + fullyQualifiedSourceFileNameList.size() + " files");
            }
            findSourceDirectoriesForAllSourceFiles(fullyQualifiedSourceFileNameList, candidateSourceDirList);
        } finally {
            if (classPath != null) {
                classPath.close();
            }
        }
    }
View Full Code Here

Examples of edu.umd.cs.findbugs.classfile.IClassPath

        for (String path : project.getAuxClasspathEntryList()) {
            builder.addCodeBase(factory.createFilesystemCodeBaseLocator(path), false);
        }

        IClassPath classPath = factory.createClassPath();

        builder.build(classPath, progress);

        progress.doneScanningArchives();
View Full Code Here

Examples of edu.umd.cs.findbugs.classfile.IClassPath

            // which we can't have if we would just re-use the data
        }
    }

    private void postProcessCaches() {
        IClassPath classPath = analysisCache.getClassPath();

        Map<ClassDescriptor, Object> classAnalysis = analysisCache.getClassAnalysis(ClassData.class);
        if(classAnalysis == null) {
            return;
        }
        Set<Entry<ClassDescriptor,Object>> entrySet = classAnalysis.entrySet();
        AnalysisData data = new AnalysisData();
        for (Entry<ClassDescriptor, Object> entry : entrySet) {
            data.classCount ++;
            if(!(entry.getValue() instanceof ClassData)) {
                continue;
            }
            ClassData cd = (ClassData) entry.getValue();
            data.byteSize += cd.getData().length;
        }
        Set<Entry<String, ICodeBaseEntry>> entrySet2 = classPath.getApplicationCodebaseEntries().entrySet();
        DescriptorFactory descriptorFactory = DescriptorFactory.instance();
        for (Entry<String, ICodeBaseEntry> entry : entrySet2) {
            String className = entry.getKey();
            if(cacheClassData) {
                if(className.endsWith(".class")) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.