Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.jdeveloper.java.index
Class JavaIndexer

java.lang.Object
  extended by oracle.ide.index.keyword.KeywordIndexer
      extended by oracle.jdeveloper.java.index.JavaIndexer
All Implemented Interfaces:
Indexer

public class JavaIndexer
extends KeywordIndexer

Indexer implementation for Java files that makes use of the JavaLexer.


Field Summary
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
          Flag indicating that a keyword appears in a SQLJ block.
 
Fields inherited from class oracle.ide.index.keyword.KeywordIndexer
IDENTIFIER_ARRAY_SIZE, IDENTIFIER_PART, IDENTIFIER_START
 
Constructor Summary
JavaIndexer()
           
 
Method Summary
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, 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.
 
Methods inherited from class oracle.ide.index.keyword.KeywordIndexer
endIndexing, filterKeyword, indexImpl, isJavaIdentifierPart, isJavaIdentifierStart, reportKeyword, startIndexing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTENDS_OR_IMPLEMENTS

public static final 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. The name is not a fully qualified name. It is up to the caller to determine if the results of the query resolve to the desired class or interface.

See Also:
Constant Field Values

ANNOTATION

public static final java.lang.String ANNOTATION
Index criteria to query all files containing Java classes that may contain an annotation with the given simple name. The name is not a fully qualified name. It is up to the caller to determine if the results of the query resolve to the desired annotation.

See Also:
Constant Field Values

FLAG_COMMENT

public static final int FLAG_COMMENT
Flag indicating that a keyword appears in a comment.

See Also:
Constant Field Values

FLAG_LITERAL

public static final int FLAG_LITERAL
Flag indicating that a keyword appears in a literal.

See Also:
Constant Field Values

FLAG_SQLJ

public static final int FLAG_SQLJ
Flag indicating that a keyword appears in a SQLJ block.

See Also:
Constant Field Values
Constructor Detail

JavaIndexer

public JavaIndexer()
Method Detail

index

public void index(IndexingContext context,
                  DataCollector data)
Description copied from interface: Indexer
Index the current file in the context. The text buffer returned by IndexingContext.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.

Specified by:
index in interface Indexer
Overrides:
index in class KeywordIndexer
Parameters:
context - the context
data - the data collector where the Indexer should store its data

scanText

public 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.

Parameters:
buffer - the text buffer
filterType - the type of filter
filter - 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 data
segment - a segment to store string data

report

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)

filter

protected boolean filter(ReadTextBuffer buffer,
                         int start,
                         int end,
                         int dataType,
                         int filterType,
                         char[] filter,
                         javax.swing.text.Segment segment)

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

Copyright © 1997, 2011, Oracle. All rights reserved.