Class SearchPattern

java.lang.Object
org.aspectj.org.eclipse.jdt.core.search.SearchPattern
Direct Known Subclasses:
JavaSearchPattern, OrPattern

public abstract class SearchPattern extends Object
A search pattern defines how search results are found. Use SearchPattern.createPattern to create a search pattern.

Search patterns are used during the search phase to decode index entries that were added during the indexing phase (see SearchDocument.addIndexEntry(char[], char[])). When an index is queried, the index categories and keys to consider are retrieved from the search pattern using getIndexCategories() and getIndexKey(), as well as the match rule (see getMatchRule()). A blank pattern is then created (see getBlankPattern()). This blank pattern is used as a record as follows. For each index entry in the given index categories and that starts with the given key, the blank pattern is fed using decodeIndexKey(char[]). The original pattern is then asked if it matches the decoded key using matchesDecodedKey(SearchPattern). If it matches, a search document is created for this index entry using SearchParticipant.getDocument(String).

This class is intended to be sub-classed by clients. A default behavior is provided for each of the methods above, that clients can override if they wish.

Since:
3.0
See Also: