Class Index
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.index.Index
An
Index
maps document names to their referenced words in various categories.
Queries can search a single category or several at the same time.
Indexes are not synchronized structures and should only be queried/updated one at a time.-
Field Summary
-
Constructor Summary
ConstructorDescriptionIndex(IndexLocation location, String containerPath, boolean reuseExistingFile)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addIndexEntry(char[] category, char[] key, String containerRelativePath)
containerRelativePath(String documentPath)
long
boolean
boolean
static boolean
isMatch(char[] pattern, char[] word, int matchRule)
query(char[][] categories, char[] key, int matchRule)
Returns the entries containing the given key in a group of categories, or null if no matches are found.String[]
queryDocumentNames(String substring)
Returns the document names that contain the given substring, if null then returns all of them.void
void
reset()
Reset memory and disk indexes.boolean
save()
void
void
toString()
-
Field Details
-
containerPath
-
monitor
-
separator
public char separator -
diskIndex
-
memoryIndex
-
-
Constructor Details
-
Index
public Index(IndexLocation location, String containerPath, boolean reuseExistingFile) throws IOException- Throws:
IOException
-
-
Method Details
-
isMatch
public static boolean isMatch(char[] pattern, char[] word, int matchRule) -
addIndexEntry
-
containerRelativePath
-
getIndexFile
-
getIndexLocation
-
getIndexLastModified
public long getIndexLastModified() -
hasChanged
public boolean hasChanged() -
query
Returns the entries containing the given key in a group of categories, or null if no matches are found. The matchRule dictates whether its an exact, prefix or pattern match, as well as case sensitive or insensitive. If the key is null then all entries in specified categories are returned.- Throws:
IOException
-
queryDocumentNames
Returns the document names that contain the given substring, if null then returns all of them.- Throws:
IOException
-
remove
-
reset
Reset memory and disk indexes.- Throws:
IOException
-
save
- Throws:
IOException
-
startQuery
public void startQuery() -
stopQuery
public void stopQuery() -
toString
-
isIndexForJar
public boolean isIndexForJar() -
getMetaIndexQualifications
- Throws:
IOException
-