Skip navigation links

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

E13403-06


oracle.ide.index.keyword
Class KeywordIndexer

java.lang.Object
  extended by oracle.ide.index.keyword.KeywordIndexer

All Implemented Interfaces:
Indexer
Direct Known Subclasses:
JavaIndexer

public class KeywordIndexer
extends java.lang.Object
implements Indexer

Indexes keywords in a document.


Field Summary
protected static int IDENTIFIER_ARRAY_SIZE
          Size of our pre-calculated identifier arrays.
protected static boolean[] IDENTIFIER_PART
          Flags indicating whether the char value (array index) is an identifier part or not.
protected static boolean[] IDENTIFIER_START
          Flags indicating whether the char value (array index) is an identifier start or not.

 

Constructor Summary
KeywordIndexer()
           

 

Method Summary
 void endIndexing(IndexingContext context)
          Indexing has finished on the given context.
protected  boolean filterKeyword(ReadTextBuffer buffer, int start, int end, char[] filter, javax.swing.text.Segment segment)
           
 void index(IndexingContext context, DataCollector data)
          Index the current file in the context.
protected  void indexImpl(IndexingContext context, DataCollector data, char[] filter, javax.swing.text.Segment segment)
          Index the current file in the context, using the given filter.
protected static boolean isJavaIdentifierPart(char c)
          Determine whether a character may be part of a Java identifier.
protected static boolean isJavaIdentifierStart(char c)
          Determine whether a character may be the start of a Java identifier.
protected  void reportKeyword(DataCollector data, ReadTextBuffer buffer, int start, int end, char[] filter, int hash, int flags, javax.swing.text.Segment segment)
           
 void startIndexing(IndexingContext context)
          Indexing is about to start on the given context.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

IDENTIFIER_ARRAY_SIZE

protected static final int IDENTIFIER_ARRAY_SIZE
Size of our pre-calculated identifier arrays.
See Also:
Constant Field Values

IDENTIFIER_PART

protected static final boolean[] IDENTIFIER_PART
Flags indicating whether the char value (array index) is an identifier part or not.

IDENTIFIER_START

protected static final boolean[] IDENTIFIER_START
Flags indicating whether the char value (array index) is an identifier start or not.

Constructor Detail

KeywordIndexer

public KeywordIndexer()

Method Detail

isJavaIdentifierStart

protected static boolean isJavaIdentifierStart(char c)
Determine whether a character may be the start of a Java identifier.
Parameters:
c - the character
Returns:
true if the character may be the start of a Java identifier, false otherwise

isJavaIdentifierPart

protected static boolean isJavaIdentifierPart(char c)
Determine whether a character may be part of a Java identifier.
Parameters:
c - the character
Returns:
true if the character may be part of a Java identifier, false otherwise

startIndexing

public void startIndexing(IndexingContext context)
Description copied from interface: Indexer
Indexing is about to start on the given context.
Specified by:
startIndexing in interface Indexer
Parameters:
context - the indexing context

endIndexing

public void endIndexing(IndexingContext context)
Description copied from interface: Indexer
Indexing has finished on the given context.
Specified by:
endIndexing in interface Indexer
Parameters:
context - the indexing context

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
Parameters:
context - the context
data - the data collector where the Indexer should store its data

indexImpl

protected void indexImpl(IndexingContext context,
                         DataCollector data,
                         char[] filter,
                         javax.swing.text.Segment segment)
Index the current file in the context, using the given filter.
Parameters:
context - the indexing context
data - the data collector
filter - the filter, or null if no filter
segment - a segment that can be used to store string data

reportKeyword

protected void reportKeyword(DataCollector data,
                             ReadTextBuffer buffer,
                             int start,
                             int end,
                             char[] filter,
                             int hash,
                             int flags,
                             javax.swing.text.Segment segment)

filterKeyword

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

Skip navigation links

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

E13403-06


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