org.aspectj.org.eclipse.jdt.internal.core.search
Class JavaSearchDocument

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.core.search.SearchDocument
      extended by org.aspectj.org.eclipse.jdt.internal.core.search.JavaSearchDocument
Direct Known Subclasses:
MatchLocator.WorkingCopyDocument

public class JavaSearchDocument
extends SearchDocument


Field Summary
protected  byte[] byteContents
           
protected  char[] charContents
           
 
Constructor Summary
JavaSearchDocument(java.lang.String documentPath, SearchParticipant participant)
           
JavaSearchDocument(java.util.zip.ZipEntry zipEntry, IPath zipFilePath, byte[] contents, SearchParticipant participant)
           
 
Method Summary
 byte[] getByteContents()
          Returns the contents of this document.
 char[] getCharContents()
          Returns the contents of this document.
 java.lang.String getEncoding()
          Returns the encoding for this document.
 java.lang.String toString()
           
 
Methods inherited from class org.aspectj.org.eclipse.jdt.core.search.SearchDocument
addIndexEntry, getParser, getParticipant, getPath, removeAllIndexEntries, setIndex, setParser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

byteContents

protected byte[] byteContents

charContents

protected char[] charContents
Constructor Detail

JavaSearchDocument

public JavaSearchDocument(java.lang.String documentPath,
                          SearchParticipant participant)

JavaSearchDocument

public JavaSearchDocument(java.util.zip.ZipEntry zipEntry,
                          IPath zipFilePath,
                          byte[] contents,
                          SearchParticipant participant)
Method Detail

getByteContents

public byte[] getByteContents()
Description copied from class: SearchDocument
Returns the contents of this document. Contents may be different from actual resource at corresponding document path, in case of preprocessing.

This method must be implemented in subclasses.

Note: some implementation may choose to cache the contents directly on the document for performance reason. However, this could induce scalability issues due to the fact that collections of documents are manipulated throughout the search operation, and cached contents would then consume lots of memory until they are all released at once in the end.

Specified by:
getByteContents in class SearchDocument
Returns:
the contents of this document, or null if none

getCharContents

public char[] getCharContents()
Description copied from class: SearchDocument
Returns the contents of this document. Contents may be different from actual resource at corresponding document path due to preprocessing.

This method must be implemented in subclasses.

Note: some implementation may choose to cache the contents directly on the document for performance reason. However, this could induce scalability issues due to the fact that collections of documents are manipulated throughout the search operation, and cached contents would then consume lots of memory until they are all released at once in the end.

Specified by:
getCharContents in class SearchDocument
Returns:
the contents of this document, or null if none

getEncoding

public java.lang.String getEncoding()
Description copied from class: SearchDocument
Returns the encoding for this document.

This method must be implemented in subclasses.

Specified by:
getEncoding in class SearchDocument
Returns:
the encoding for this document, or null if none

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object