本文整理汇总了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>();
}
示例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>();
}
示例3: instance
import edu.umd.cs.findbugs.classfile.IClassFactory; //导入依赖的package包/类
public static IClassFactory instance() {
return theInstance;
}
示例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();
}
}
}
示例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();
}
}
}