public class NdResourceFile extends NdNode
| Modifier and Type | Field and Description |
|---|---|
static FieldShort |
FILE_FLAGS |
static FieldSearchKey<JavaIndex> |
FILENAME |
static int |
FLG_CORRUPT_ZIP_FILE
Flag indicating that this is a corrupted zip file.
|
static FieldLong |
HASHCODE_LAST_SCANNED |
static FieldString |
JAVA_ROOT |
static FieldLong |
JDK_LEVEL |
static FieldString |
MANIFEST_CONTENT |
static FieldLong |
SIZE_LAST_SCANNED |
static FieldLong |
TIME_LAST_SCANNED |
static FieldLong |
TIME_LAST_USED |
static StructDef<NdResourceFile> |
type |
static FieldOneToMany<NdType> |
TYPES |
static FieldOneToMany<NdWorkspaceLocation> |
WORKSPACE_MAPPINGS |
static FieldList<NdZipEntry> |
ZIP_ENTRIES |
| Constructor and Description |
|---|
NdResourceFile(Nd nd) |
NdResourceFile(Nd dom,
long address) |
| Modifier and Type | Method and Description |
|---|---|
NdZipEntry |
addZipEntry(java.lang.String fileName) |
void |
allocateZipEntries(int expectedNumberOfZipEntries) |
java.util.List<IPath> |
getAllWorkspaceLocations() |
IPath |
getAnyOpenWorkspaceLocation(IWorkspaceRoot root) |
FileFingerprint |
getFingerprint() |
IPath |
getFirstWorkspaceLocation() |
int |
getFlags() |
long |
getJdkLevel() |
IString |
getLocation() |
IString |
getManifestContent()
Returns the content of the JAR's MANIFEST.MF file, or null if either this isn't a .JAR file or it didn't contain
a MANIFEST.MF file.
|
IString |
getPackageFragmentRoot()
Returns the absolute path to the java root for this .jar or .class file.
|
IPath |
getPath()
Returns a workspace path to this resource if possible and the absolute filesystem location if not.
|
long |
getSizeLastScanned() |
long |
getTimeLastScanned() |
long |
getTimeLastUsed() |
NdType |
getType(int index) |
int |
getTypeCount() |
java.util.List<NdType> |
getTypes() |
java.util.List<NdWorkspaceLocation> |
getWorkspaceMappings() |
java.util.List<NdZipEntry> |
getZipEntries()
Returns the set of all leaf zip entries that are not .class files.
|
boolean |
hasAllFlags(int flags) |
boolean |
isCorruptedZipFile() |
boolean |
isDoneIndexing()
Returns true iff the indexer has finished writing the contents of this file to the index.
|
boolean |
isInIndex()
Determines whether this file is still in the index.
|
void |
markAsInvalid() |
void |
setFingerprint(FileFingerprint newFingerprint) |
void |
setFlags(int flags) |
void |
setJdkLevel(long jdkLevel) |
void |
setLocation(java.lang.String filename) |
void |
setManifestContent(char[] newContent)
Stores the content of the JAR's MANIFEST.MF file.
|
void |
setPackageFragmentRoot(char[] javaRoot) |
void |
setTimeLastUsed(long timeLastUsed) |
java.lang.String |
toString() |
delete, destruct, equals, getAddress, getBindingID, getBit, getByte, getNodeId, getNodeType, hashCode, load, loadpublic static final FieldSearchKey<JavaIndex> FILENAME
public static final FieldOneToMany<NdType> TYPES
public static final FieldLong TIME_LAST_USED
public static final FieldLong TIME_LAST_SCANNED
public static final FieldLong SIZE_LAST_SCANNED
public static final FieldLong HASHCODE_LAST_SCANNED
public static final FieldOneToMany<NdWorkspaceLocation> WORKSPACE_MAPPINGS
public static final FieldString JAVA_ROOT
public static final FieldLong JDK_LEVEL
public static final FieldList<NdZipEntry> ZIP_ENTRIES
public static final FieldString MANIFEST_CONTENT
public static final FieldShort FILE_FLAGS
public static final int FLG_CORRUPT_ZIP_FILE
public static final StructDef<NdResourceFile> type
public NdResourceFile(Nd dom, long address)
public NdResourceFile(Nd nd)
public boolean isCorruptedZipFile()
public int getFlags()
public boolean hasAllFlags(int flags)
public void setFlags(int flags)
public java.util.List<NdZipEntry> getZipEntries()
public IString getManifestContent()
public void setManifestContent(char[] newContent)
public long getJdkLevel()
public void setJdkLevel(long jdkLevel)
public boolean isInIndex()
NdResourceFile instance is retained while the
database lock is released and reobtained, this method should be invoked to ensure that the NdResourceFile
has not been deleted in the meantime.public java.util.List<IPath> getAllWorkspaceLocations()
public IPath getFirstWorkspaceLocation()
public IPath getAnyOpenWorkspaceLocation(IWorkspaceRoot root)
public IPath getPath()
public java.util.List<NdWorkspaceLocation> getWorkspaceMappings()
public IString getLocation()
public void setLocation(java.lang.String filename)
public FileFingerprint getFingerprint()
public boolean isDoneIndexing()
public long getTimeLastScanned()
public long getSizeLastScanned()
public long getTimeLastUsed()
public void setTimeLastUsed(long timeLastUsed)
public void setFingerprint(FileFingerprint newFingerprint)
public void setPackageFragmentRoot(char[] javaRoot)
public IString getPackageFragmentRoot()
public void markAsInvalid()
public int getTypeCount()
public java.util.List<NdType> getTypes()
public NdType getType(int index)
public java.lang.String toString()
toString in class java.lang.Objectpublic void allocateZipEntries(int expectedNumberOfZipEntries)
public NdZipEntry addZipEntry(java.lang.String fileName)