FindBugs™ 1.3.9

edu.umd.cs.findbugs.classfile.impl
Class AbstractScannableCodeBase

java.lang.Object
  extended by edu.umd.cs.findbugs.classfile.impl.AbstractScannableCodeBase
All Implemented Interfaces:
ICodeBase, IScannableCodeBase
Direct Known Subclasses:
DirectoryCodeBase, NestedZipFileCodeBase, ZipFileCodeBase, ZipInputStreamCodeBase

public abstract class AbstractScannableCodeBase
extends java.lang.Object
implements IScannableCodeBase

Abstract base class for implementations of IScannableCodeBase. Provides an implementation of the getCodeBaseLocator(), containsSourceFiles(), setApplicationCodeBase(), and isApplicationCodeBase() methods.

Author:
David Hovemeyer

Field Summary
 
Fields inherited from interface edu.umd.cs.findbugs.classfile.ICodeBase
IN_JAR_MANIFEST, IN_SYSTEM_CLASSPATH, NESTED, SPECIFIED
 
Constructor Summary
AbstractScannableCodeBase(ICodeBaseLocator codeBaseLocator)
           
 
Method Summary
 void addResourceNameTranslation(java.lang.String origResourceName, java.lang.String newResourceName)
           
 boolean containsSourceFiles()
          Return whether or not this code base contains any source files.
 ICodeBaseLocator getCodeBaseLocator()
          Get the codebase locator describing the location of this codebase.
 int getHowDiscovered()
          Return how this codebase was discovered.
 long getLastModifiedTime()
          Get timestamp indicating the most recent time when any of the files in the codebase were modified.
 boolean isApplicationCodeBase()
          Return whether or not this codebase is an application codebase.
 void setApplicationCodeBase(boolean isAppCodeBase)
          Designate this code base as an application codebase.
 void setHowDiscovered(int howDiscovered)
          Set how this codebase was discovered.
 void setLastModifiedTime(long lastModifiedTime)
          Set timestamp indicating the most recent time when any of the files in the codebase were modified.
 java.lang.String translateResourceName(java.lang.String resourceName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.umd.cs.findbugs.classfile.IScannableCodeBase
iterator
 
Methods inherited from interface edu.umd.cs.findbugs.classfile.ICodeBase
close, getPathName, lookupResource
 

Constructor Detail

AbstractScannableCodeBase

public AbstractScannableCodeBase(ICodeBaseLocator codeBaseLocator)
Method Detail

getCodeBaseLocator

public ICodeBaseLocator getCodeBaseLocator()
Description copied from interface: ICodeBase
Get the codebase locator describing the location of this codebase.

Specified by:
getCodeBaseLocator in interface ICodeBase
Returns:
the ICodeBaseLocator

containsSourceFiles

public boolean containsSourceFiles()
Description copied from interface: ICodeBase
Return whether or not this code base contains any source files.

Specified by:
containsSourceFiles in interface ICodeBase
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: ICodeBase
Designate this code base as an application codebase.

Specified by:
setApplicationCodeBase in interface ICodeBase
Parameters:
isAppCodeBase - true if this is an application codebase, false if not

isApplicationCodeBase

public boolean isApplicationCodeBase()
Description copied from interface: ICodeBase
Return whether or not this codebase is an application codebase.

Specified by:
isApplicationCodeBase in interface ICodeBase
Returns:
true if this is an application codebase, false if not

setHowDiscovered

public void setHowDiscovered(int howDiscovered)
Description copied from interface: ICodeBase
Set how this codebase was discovered.

Specified by:
setHowDiscovered in interface ICodeBase
Parameters:
howDiscovered - one of the constants SPECIFIED, NESTED, IN_JAR_MANIFEST, or IN_SYSTEM_CLASSPATH

getHowDiscovered

public int getHowDiscovered()
Description copied from interface: ICodeBase
Return how this codebase was discovered.

Specified by:
getHowDiscovered in interface ICodeBase
Returns:
one of the constants SPECIFIED, NESTED, IN_JAR_MANIFEST, or IN_SYSTEM_CLASSPATH

setLastModifiedTime

public void setLastModifiedTime(long lastModifiedTime)
Description copied from interface: ICodeBase
Set timestamp indicating the most recent time when any of the files in the codebase were modified.

Specified by:
setLastModifiedTime in interface ICodeBase
Parameters:
lastModifiedTime - timestamp when any codebase files were most-recently modified

getLastModifiedTime

public long getLastModifiedTime()
Description copied from interface: ICodeBase
Get 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:
getLastModifiedTime in interface ICodeBase
Returns:
timestamp when any codebase files were most-recently modified, -1 if unknown

addResourceNameTranslation

public void addResourceNameTranslation(java.lang.String origResourceName,
                                       java.lang.String newResourceName)

translateResourceName

public java.lang.String translateResourceName(java.lang.String resourceName)

FindBugs™ 1.3.9

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.