当前位置: 首页>>代码示例>>Java>>正文


Java IClassFactory类代码示例

本文整理汇总了Java中edu.umd.cs.findbugs.classfile.IClassFactory的典型用法代码示例。如果您正苦于以下问题:Java IClassFactory类的具体用法?Java IClassFactory怎么用?Java IClassFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IClassFactory类属于edu.umd.cs.findbugs.classfile包,在下文中一共展示了IClassFactory类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ClassPathBuilder

import edu.umd.cs.findbugs.classfile.IClassFactory; //导入依赖的package包/类
/**
 * Constructor.
 * 
 * @param classFactory
 *            the class factory
 * @param errorLogger
 *            the error logger
 */
ClassPathBuilder(IClassFactory classFactory, IErrorLogger errorLogger) {
    this.classFactory = classFactory;
    this.errorLogger = errorLogger;
    this.projectWorkList = new LinkedList<WorkListItem>();
    this.discoveredCodeBaseList = new LinkedList<DiscoveredCodeBase>();
    this.discoveredCodeBaseMap = new HashMap<String, DiscoveredCodeBase>();
    this.appClassList = new LinkedList<ClassDescriptor>();
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:17,代码来源:ClassPathBuilder.java

示例2: ClassPathBuilder

import edu.umd.cs.findbugs.classfile.IClassFactory; //导入依赖的package包/类
/**
 * Constructor.
 *
 * @param classFactory
 *            the class factory
 * @param errorLogger
 *            the error logger
 */
ClassPathBuilder(IClassFactory classFactory, IErrorLogger errorLogger) {
    this.classFactory = classFactory;
    this.errorLogger = errorLogger;
    this.projectWorkList = new LinkedList<WorkListItem>();
    this.discoveredCodeBaseList = new LinkedList<DiscoveredCodeBase>();
    this.discoveredCodeBaseMap = new HashMap<String, DiscoveredCodeBase>();
    this.appClassList = new LinkedList<ClassDescriptor>();
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:17,代码来源:ClassPathBuilder.java

示例3: instance

import edu.umd.cs.findbugs.classfile.IClassFactory; //导入依赖的package包/类
public static IClassFactory instance() {
    return theInstance;
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:4,代码来源:ClassFactory.java

示例4: execute

import edu.umd.cs.findbugs.classfile.IClassFactory; //导入依赖的package包/类
/**
 * Execute the search for source directories.
 * 
 * @throws edu.umd.cs.findbugs.classfile.CheckedAnalysisException
 * @throws java.io.IOException
 * @throws java.lang.InterruptedException
 */
public void execute() throws CheckedAnalysisException, IOException, InterruptedException {
    File dir = new File(rootSourceDirectory);
    if (!dir.isDirectory()) {
        throw new IOException("Path " + rootSourceDirectory + " is not a directory");
    }

    // Find all directories underneath the root source directory
    progress.startRecursiveDirectorySearch();
    RecursiveFileSearch rfs = new RecursiveFileSearch(rootSourceDirectory, new FileFilter() {
        public boolean accept(File pathname) {
            return pathname.isDirectory();
        }
    });
    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();
        }
    }
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:49,代码来源:DiscoverSourceDirectories.java

示例5: execute

import edu.umd.cs.findbugs.classfile.IClassFactory; //导入依赖的package包/类
/**
 * Execute the search for source directories.
 *
 * @throws edu.umd.cs.findbugs.classfile.CheckedAnalysisException
 * @throws java.io.IOException
 * @throws java.lang.InterruptedException
 */
public void execute() throws CheckedAnalysisException, IOException, InterruptedException {
    File dir = new File(rootSourceDirectory);
    if (!dir.isDirectory()) {
        throw new IOException("Path " + rootSourceDirectory + " is not a directory");
    }

    // Find all directories underneath the root source directory
    progress.startRecursiveDirectorySearch();
    RecursiveFileSearch rfs = new RecursiveFileSearch(rootSourceDirectory, new FileFilter() {
        public boolean accept(File pathname) {
            return pathname.isDirectory();
        }
    });
    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();
        }
    }
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:49,代码来源:DiscoverSourceDirectories.java


注:本文中的edu.umd.cs.findbugs.classfile.IClassFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。