org.aspectj.org.eclipse.jdt.internal.core.index
Class IndexLocation

java.lang.Object
  extended by 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


Field Summary
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)
 
Constructor Summary
protected IndexLocation(java.io.File file)
           
  IndexLocation(java.net.URL url)
           
 
Method Summary
 void close()
          Closes any open streams.
static IndexLocation createIndexLocation(java.net.URL url)
           
abstract  boolean createNewFile()
          Creates a new file for the given index location
abstract  boolean delete()
           
abstract  boolean exists()
           
abstract  java.lang.String fileName()
           
abstract  java.lang.String getCanonicalFilePath()
           
abstract  java.io.File getIndexFile()
           
 java.net.URL getUrl()
           
 int hashCode()
           
 boolean isParticipantIndex()
           
abstract  long lastModified()
           
abstract  long length()
           
abstract  boolean startsWith(IPath path)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

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)

Constructor Detail

IndexLocation

protected IndexLocation(java.io.File file)

IndexLocation

public IndexLocation(java.net.URL url)
Method Detail

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