Class DirectoryCodeBaseEntry
- java.lang.Object
-
- edu.umd.cs.findbugs.classfile.impl.AbstractScannableCodeBaseEntry
-
- edu.umd.cs.findbugs.classfile.impl.DirectoryCodeBaseEntry
-
- All Implemented Interfaces:
ICodeBaseEntry
public class DirectoryCodeBaseEntry extends AbstractScannableCodeBaseEntry
Codebase entry class for directory codebases.- Author:
- David Hovemeyer
-
-
Constructor Summary
Constructors Constructor Description DirectoryCodeBaseEntry(DirectoryCodeBase codeBase, java.lang.String realResourceName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)ClassDescriptorgetClassDescriptor()Return the ClassDescriptor of the class resource accessed by this codebase entry.AbstractScannableCodeBasegetCodeBase()Get the codebase this codebase entry belongs to.intgetNumBytes()Get the number of bytes in the resource.java.lang.StringgetRealResourceName()inthashCode()java.io.InputStreamopenResource()Open an input stream reading from the resource.java.lang.StringtoString()-
Methods inherited from class edu.umd.cs.findbugs.classfile.impl.AbstractScannableCodeBaseEntry
getResourceName, overrideResourceName
-
-
-
-
Constructor Detail
-
DirectoryCodeBaseEntry
public DirectoryCodeBaseEntry(DirectoryCodeBase codeBase, java.lang.String realResourceName)
-
-
Method Detail
-
getNumBytes
public int getNumBytes()
Description copied from interface:ICodeBaseEntryGet the number of bytes in the resource. Returns <0 if the number of bytes is not known.- Returns:
- number of bytes in the resource, or <0 if not known.
-
openResource
public java.io.InputStream openResource() throws java.io.IOExceptionDescription copied from interface:ICodeBaseEntryOpen an input stream reading from the resource.- Returns:
- InputStream reading from the resource.
- Throws:
java.io.IOException- if an error occurs reading from the resource
-
getCodeBase
public AbstractScannableCodeBase getCodeBase()
Description copied from interface:ICodeBaseEntryGet the codebase this codebase entry belongs to.- Specified by:
getCodeBasein interfaceICodeBaseEntry- Specified by:
getCodeBasein classAbstractScannableCodeBaseEntry- Returns:
- the codebase this codebase entry belongs to
-
getRealResourceName
public java.lang.String getRealResourceName()
- Specified by:
getRealResourceNamein classAbstractScannableCodeBaseEntry
-
getClassDescriptor
public ClassDescriptor getClassDescriptor() throws InvalidClassFileFormatException
Description copied from interface:ICodeBaseEntryReturn the ClassDescriptor of the class resource accessed by this codebase entry. Do not call this method unless ClassDescriptor.isClassResource() returns true. This method may require the class data to be loaded in order to determine the class.- Returns:
- ClassDescriptor of this entry
- Throws:
InvalidClassFileFormatException
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-