Class AbstractScannableCodeBase
java.lang.Object
edu.umd.cs.findbugs.classfile.impl.AbstractScannableCodeBase
- All Implemented Interfaces:
ICodeBase,IScannableCodeBase,AutoCloseable
- Direct Known Subclasses:
DirectoryCodeBase,EmptyCodeBase,JrtfsCodeBase,NestedZipFileCodeBase,ZipFileCodeBase,ZipInputStreamCodeBase
Abstract base class for implementations of IScannableCodeBase. Provides an
implementation of the getCodeBaseLocator(), containsSourceFiles(),
setApplicationCodeBase(), and isApplicationCodeBase() methods.
- Author:
- David Hovemeyer
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.umd.cs.findbugs.classfile.ICodeBase
ICodeBase.Discovered -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLastModifiedTime(long lastModifiedTime) voidaddResourceNameTranslation(String origResourceName, String newResourceName) booleanReturn whether or not this code base contains any source files.Get the codebase locator describing the location of this codebase.Return how this codebase was discovered.longGet timestamp indicating the most recent time when any of the files in the codebase were modified.booleanReturn whether or not this codebase is an application codebase.voidsetApplicationCodeBase(boolean isAppCodeBase) Designate this code base as an application codebase.voidsetHowDiscovered(ICodeBase.Discovered howDiscovered) Set how this codebase was discovered.voidsetLastModifiedTime(long lastModifiedTime) Set timestamp indicating the most recent time when any of the files in the codebase were modified.translateResourceName(String resourceName) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.umd.cs.findbugs.classfile.ICodeBase
close, getPathName, lookupResourceMethods inherited from interface edu.umd.cs.findbugs.classfile.IScannableCodeBase
iterator
-
Constructor Details
-
AbstractScannableCodeBase
-
-
Method Details
-
getCodeBaseLocator
Description copied from interface:ICodeBaseGet the codebase locator describing the location of this codebase.- Specified by:
getCodeBaseLocatorin interfaceICodeBase- Returns:
- the ICodeBaseLocator
-
containsSourceFiles
public boolean containsSourceFiles()Description copied from interface:ICodeBaseReturn whether or not this code base contains any source files.- Specified by:
containsSourceFilesin interfaceICodeBase- Returns:
- true if the code base contains source file(s), false if it does not contain source files
-
setApplicationCodeBase
public void setApplicationCodeBase(boolean isAppCodeBase) Description copied from interface:ICodeBaseDesignate this code base as an application codebase.- Specified by:
setApplicationCodeBasein interfaceICodeBase- Parameters:
isAppCodeBase- true if this is an application codebase, false if not
-
isApplicationCodeBase
public boolean isApplicationCodeBase()Description copied from interface:ICodeBaseReturn whether or not this codebase is an application codebase.- Specified by:
isApplicationCodeBasein interfaceICodeBase- Returns:
- true if this is an application codebase, false if not
-
setHowDiscovered
Description copied from interface:ICodeBaseSet how this codebase was discovered.- Specified by:
setHowDiscoveredin interfaceICodeBase- Parameters:
howDiscovered- one of the constants SPECIFIED, NESTED, IN_JAR_MANIFEST, or IN_SYSTEM_CLASSPATH
-
getHowDiscovered
Description copied from interface:ICodeBaseReturn how this codebase was discovered.- Specified by:
getHowDiscoveredin interfaceICodeBase- Returns:
- one of the constants SPECIFIED, NESTED, IN_JAR_MANIFEST, or IN_SYSTEM_CLASSPATH
-
setLastModifiedTime
public void setLastModifiedTime(long lastModifiedTime) Description copied from interface:ICodeBaseSet timestamp indicating the most recent time when any of the files in the codebase were modified.- Specified by:
setLastModifiedTimein interfaceICodeBase- Parameters:
lastModifiedTime- timestamp when any codebase files were most-recently modified
-
addLastModifiedTime
public void addLastModifiedTime(long lastModifiedTime) -
getLastModifiedTime
public long getLastModifiedTime()Description copied from interface:ICodeBaseGet timestamp indicating the most recent time when any of the files in the codebase were modified. This information is only likely to be accurate if an ICodeBaseIterator has been used to scan the resources in the codebase (scannable codebases only, obviously).- Specified by:
getLastModifiedTimein interfaceICodeBase- Returns:
- timestamp when any codebase files were most-recently modified, -1 if unknown
-
addResourceNameTranslation
-
translateResourceName
-