Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.ide.dependency
Interface Reference

All Known Subinterfaces:
SourceReference
All Known Implementing Classes:
IdReference, IndexReference

public interface Reference

A reference.


Method Summary
 java.net.URL getURL()
          Get the URL containing this reference, if there is one.
 boolean isReferenceTo(Context context, Declaration declaration)
          Determine whether this is a reference to a specifc declaration.
 Declaration resolve(Context context)
          Resolve this reference to the corresponding declaration, if it exists.
 void show()
          Show this reference to the user.
 

Method Detail

getURL

java.net.URL getURL()
Get the URL containing this reference, if there is one.

Returns:
the URL, or null if there is no URL associated with this reference

show

void show()
Show this reference to the user. For example, this might open an editor with the reference selected.


resolve

Declaration resolve(Context context)
                    throws java.lang.InterruptedException
Resolve this reference to the corresponding declaration, if it exists.

Parameters:
context - the context
Returns:
the declaration, or null if the declaration is not found
Throws:
java.lang.InterruptedException - if the operation is interrupted
java.lang.IllegalStateException - if the method is called on the event thread

isReferenceTo

boolean isReferenceTo(Context context,
                      Declaration declaration)
                      throws java.lang.InterruptedException
Determine whether this is a reference to a specifc declaration. A simple implementation of this method would be to call resolve(oracle.ide.Context) and check if the result matches the declaration. But some implementations may be able to optimize this.

Parameters:
context - the context
declaration - the declaration
Returns:
true if the reference would resolve to this declaration, false otherwise
Throws:
java.lang.InterruptedException - if the operation is interrupted

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

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