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.dependency.index
Class IndexDeclarationProvider

java.lang.Object
  extended by oracle.ide.dependency.index.IndexDeclarationProvider

All Implemented Interfaces:
DeclarationProvider

public abstract class IndexDeclarationProvider
extends java.lang.Object
implements DeclarationProvider

Provides declarations stored in the index.


Constructor Summary
IndexDeclarationProvider()
           

 

Method Summary
 boolean canGetDeclaration(Context context)
          Determine whether there could be a declaration in the context.
 boolean canGetDeclarations(Context context, Node node)
          Determine whether this provider can get declarations for a Node.
 Declaration getDeclaration(Context context)
          Get the declaration for the given context.
protected abstract  java.util.Collection<QueryCriteria> getDeclarationCriteria(Context context, Reference reference)
          Get the index query criteria to use to search for the declaration corresponding to a reference.
 java.util.Collection<? extends Declaration> getDeclarations(Context context, Node node)
          Get all declarations for a Node.
 java.util.Collection<? extends Declaration> getTopLevelDeclarations(Context context, Node node)
          Get all top-level declarations for a Node.

 

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

 

Constructor Detail

IndexDeclarationProvider

public IndexDeclarationProvider()

Method Detail

getDeclarationCriteria

protected abstract java.util.Collection<QueryCriteria> getDeclarationCriteria(Context context,
                                                                              Reference reference)
Get the index query criteria to use to search for the declaration corresponding to a reference.
Parameters:
context - the context
reference - the reference
Returns:
the query critiera

canGetDeclaration

public boolean canGetDeclaration(Context context)
Description copied from interface: DeclarationProvider
Determine whether there could be a declaration in the context. The implementation of this method should be very fast, as it is called from the event thread to enable or disable dependency-related actions.
Specified by:
canGetDeclaration in interface DeclarationProvider
Parameters:
context - the context
Returns:
true if this provider may have a declaration in the context, false otherwise

getDeclaration

public Declaration getDeclaration(Context context)
Description copied from interface: DeclarationProvider
Get the declaration for the given context. This will only be called if DeclarationProvider.canGetDeclaration(oracle.ide.Context) returned true for this context.
Specified by:
getDeclaration in interface DeclarationProvider
Parameters:
context - the context
Returns:
the declaration

canGetDeclarations

public boolean canGetDeclarations(Context context,
                                  Node node)
Description copied from interface: DeclarationProvider
Determine whether this provider can get declarations for a Node.
Specified by:
canGetDeclarations in interface DeclarationProvider
Parameters:
context - the context
node - the Node
Returns:
true if the provider can get declarations for this Node, false otherwise

getDeclarations

public java.util.Collection<? extends Declaration> getDeclarations(Context context,
                                                                   Node node)
Description copied from interface: DeclarationProvider
Get all declarations for a Node.
Specified by:
getDeclarations in interface DeclarationProvider
Parameters:
context - the context
node - the Node
Returns:
the declarations

getTopLevelDeclarations

public java.util.Collection<? extends Declaration> getTopLevelDeclarations(Context context,
                                                                           Node node)
Description copied from interface: DeclarationProvider
Get all top-level declarations for a Node.

Some languages have a hierarchy of declarations. Objects further down in the hierarchy can only be accessed through these top-level declarations. For example, methods in a Java class can only be referenced directly through a reference to the Java class. Or columns in a database table might only be referenced through a reference to the table. In those cases, it is possible to search for all references to a Node by searching only for the top-level declarations. This improves performance compared to searching for every declaration in the Node. Implementations that do not have such a declaration hierarchy can simply call DeclarationProvider.getDeclarations(Context,Node).

Specified by:
getTopLevelDeclarations in interface DeclarationProvider
Parameters:
context - the context
node - the Node
Returns:
the top-level declarations

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.