public class JavaIndexer extends KeywordIndexer
JavaLexer.| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
ANNOTATION
Index criteria to query all files containing Java classes that may
 contain an annotation with the given simple name. 
 | 
static java.lang.String | 
EXTENDS_OR_IMPLEMENTS
Index criteria to query all files containing Java classes or interfaces
 that may directly extend or implement a class or interface with the
 given simple name. 
 | 
static int | 
FLAG_COMMENT
Flag indicating that a keyword appears in a comment. 
 | 
static int | 
FLAG_LITERAL
Flag indicating that a keyword appears in a literal. 
 | 
static int | 
FLAG_SQLJ
Deprecated. 
 
SQLJ statements are not supported anymore 
 | 
static java.lang.String | 
LAMBDA
Index criteria to query all files containing a lambda with the specified count 
 of parameters. 
 | 
IDENTIFIER_ARRAY_SIZE, IDENTIFIER_PART, IDENTIFIER_START| Constructor and Description | 
|---|
JavaIndexer()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
endIndexing(IndexingContext context)
Indexing has finished on the given context. 
 | 
protected boolean | 
filter(int dataType,
      int filterType,
      char[] filter,
      char[] numberOfParams)  | 
protected boolean | 
filter(ReadTextBuffer buffer,
      int start,
      int end,
      int dataType,
      int filterType,
      char[] filter,
      javax.swing.text.Segment segment)  | 
void | 
index(IndexingContext context,
     DataCollector data)
Index the current file in the context. 
 | 
protected void | 
report(DataCollector data,
      int start,
      int end,
      int dataType,
      int filterType,
      char[] filter,
      int hash,
      int flags,
      char[] numberOfParams)  | 
protected void | 
report(DataCollector data,
      ReadTextBuffer buffer,
      int start,
      int end,
      int dataType,
      int filterType,
      char[] filter,
      int hash,
      int flags,
      javax.swing.text.Segment segment)  | 
void | 
scanText(ReadTextBuffer buffer,
        int filterType,
        char[] filter,
        int flags,
        int startOffset,
        int endOffset,
        DataCollector data,
        javax.swing.text.Segment segment)
Scans the plain text (comments, strings, SQLJ blocks) to locate keywords. 
 | 
void | 
startIndexing(IndexingContext context)
Indexing is about to start on the given context. 
 | 
filterKeyword, indexImpl, isJavaIdentifierPart, isJavaIdentifierStart, reportKeywordpublic static final java.lang.String EXTENDS_OR_IMPLEMENTS
public static final java.lang.String LAMBDA
public static final java.lang.String ANNOTATION
public static final int FLAG_COMMENT
public static final int FLAG_LITERAL
@Deprecated public static final int FLAG_SQLJ
public void index(IndexingContext context, DataCollector data)
IndexerIndexingContext.getTextBuffer() is read locked at the time this
 method is called.  Note that any Throwable thrown by
 implementations of this method is considered a bug and will be reported
 to the user.index in interface Indexerindex in class KeywordIndexercontext - the contextdata - the data collector where the Indexer should store its
        datapublic void startIndexing(IndexingContext context)
IndexerstartIndexing in interface IndexerstartIndexing in class KeywordIndexercontext - the indexing contextpublic void endIndexing(IndexingContext context)
IndexerendIndexing in interface IndexerendIndexing in class KeywordIndexercontext - the indexing contextpublic void scanText(ReadTextBuffer buffer, int filterType, char[] filter, int flags, int startOffset, int endOffset, DataCollector data, javax.swing.text.Segment segment)
buffer - the text bufferfilterType - the type of filterfilter - the keyword to report locations of, or null to report on all
        keywords (optional)startOffset - the start of the region to search (inclusive)endOffset - the end of the region to search (exclusive)data - the collector in which to store datasegment - a segment to store string dataprotected void report(DataCollector data, ReadTextBuffer buffer, int start, int end, int dataType, int filterType, char[] filter, int hash, int flags, javax.swing.text.Segment segment)
protected boolean filter(ReadTextBuffer buffer, int start, int end, int dataType, int filterType, char[] filter, javax.swing.text.Segment segment)
protected void report(DataCollector data, int start, int end, int dataType, int filterType, char[] filter, int hash, int flags, char[] numberOfParams)
protected boolean filter(int dataType,
                         int filterType,
                         char[] filter,
                         char[] numberOfParams)