org.aspectj.org.eclipse.jdt.internal.core.index
Class IndexLocation
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.index.IndexLocation
- Direct Known Subclasses:
- FileIndexLocation, JarIndexLocation
public abstract class IndexLocation
- extends java.lang.Object
The location of the index files are represented as IndexLocation
This is an abstract class to allow different implementation for a jar entry and a file
on the disk. Some of these functions could mean different for a jar entry or a file
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
participantIndex
protected boolean participantIndex
- Set to true if this index location is of an index file specified
by a participant through
SearchParticipant.scheduleDocumentIndexing(org.aspectj.org.eclipse.jdt.core.search.SearchDocument, IPath)
IndexLocation
protected IndexLocation(java.io.File file)
IndexLocation
public IndexLocation(java.net.URL url)
createIndexLocation
public static IndexLocation createIndexLocation(java.net.URL url)
close
public void close()
- Closes any open streams.
createNewFile
public abstract boolean createNewFile()
throws java.io.IOException
- Creates a new file for the given index location
- Returns:
- true if the file is created
- Throws:
java.io.IOException
delete
public abstract boolean delete()
exists
public abstract boolean exists()
fileName
public abstract java.lang.String fileName()
getCanonicalFilePath
public abstract java.lang.String getCanonicalFilePath()
- Returns:
- the canonical file path if the location is a file or null otherwise
getIndexFile
public abstract java.io.File getIndexFile()
getUrl
public java.net.URL getUrl()
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
isParticipantIndex
public boolean isParticipantIndex()
lastModified
public abstract long lastModified()
- Returns:
- the last modified time if the location is a file or -1 otherwise
length
public abstract long length()
- Returns:
- the length of the file if the location is a file or -1 otherwise
startsWith
public abstract boolean startsWith(IPath path)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object