Class DirectoryCodeBase
java.lang.Object
edu.umd.cs.findbugs.classfile.impl.AbstractScannableCodeBase
edu.umd.cs.findbugs.classfile.impl.DirectoryCodeBase
- All Implemented Interfaces:
ICodeBase, IScannableCodeBase, AutoCloseable
IScannableCodeBase implementation to read resources from a filesystem
directory.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface ICodeBase
ICodeBase.Discovered -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDirectoryCodeBase(ICodeBaseLocator codeBaseLocator, File directory) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()This method should be called when done using the code base.(package private) FilegetFullPathOfResource(String resourceName) Get the full path of given resource.Get the filesystem pathname of this codebase.(package private) StringgetResourceName(String fileName) Get the resource name given a full filename.iterator()Get an iterator over the resources in the this code base.lookupResource(String resourceName) Look up a resource in this code base.(package private) InputStreamtoString()
-
Field Details
-
directory
-
rfs
-
searchPerformed
private boolean searchPerformed
-
-
Constructor Details
-
DirectoryCodeBase
Constructor.- Parameters:
codeBaseLocator- the codebase locator for this codebasedirectory- the filesystem directory
-
-
Method Details
-
iterator
Description copied from interface:IScannableCodeBaseGet an iterator over the resources in the this code base.- Returns:
- ICodeBaseIterator over the resources in the code base
- Throws:
InterruptedException
-
getPathName
-
close
public void close()Description copied from interface:ICodeBaseThis method should be called when done using the code base. -
lookupResource
Description copied from interface:ICodeBaseLook up a resource in this code base.- Parameters:
resourceName- name of the resource to look up- Returns:
- ICodeBaseEntry representing the resource or null if the resource cannot be found in this code base
-
openFile
- Throws:
IOException
-
getFullPathOfResource
-
getResourceName
-
toString
-