|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ide.dependency.URLDeclarationProvider
public class URLDeclarationProvider
Provides generic URL declarations. Clients should generally refrence more specific objects when possible. This provider is for cases where the client does not know anything more about a reference than the URL it points to.
Constructor Summary | |
---|---|
URLDeclarationProvider() |
Method Summary | |
---|---|
boolean |
canGetDeclaration(Context context) Determine whether there could be a declaration in the context. |
boolean |
canGetDeclaration(Context context, java.lang.String id) Determine whether this provider can supply the declaration for an ID. |
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. |
IdDeclaration |
getDeclaration(Context context, java.lang.String id) Get the declaration corresponding to an ID. |
static java.lang.String |
getDeclarationId(java.net.URL url) Get the declaration ID for a URL. |
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. |
static java.net.URL |
getURL(java.lang.String id) Get the URL for a declaration ID. |
static boolean |
isURLDeclaration(java.lang.String id) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public URLDeclarationProvider()
Method Detail |
---|
public static java.lang.String getDeclarationId(java.net.URL url)
url
- the URLpublic static java.net.URL getURL(java.lang.String id)
id
- the declaration IDpublic static boolean isURLDeclaration(java.lang.String id)
public boolean canGetDeclaration(Context context, java.lang.String id)
IdDeclarationProvider
true
if they are responsible for this ID, regardless of whether the declaration actually exists.canGetDeclaration
in interface IdDeclarationProvider
context
- the contextid
- the declaration IDtrue
if the provider can find the declarationpublic IdDeclaration getDeclaration(Context context, java.lang.String id) throws java.lang.InterruptedException
IdDeclarationProvider
getDeclaration
in interface IdDeclarationProvider
context
- the contextid
- the declaration IDnull
if the declaration is not foundjava.lang.InterruptedException
- if the operation is interruptedpublic boolean canGetDeclaration(Context context)
DeclarationProvider
canGetDeclaration
in interface DeclarationProvider
context
- the contextpublic Declaration getDeclaration(Context context)
DeclarationProvider
DeclarationProvider.canGetDeclaration(oracle.ide.Context)
returned true for this context.getDeclaration
in interface DeclarationProvider
context
- the contextpublic boolean canGetDeclarations(Context context, Node node)
DeclarationProvider
canGetDeclarations
in interface DeclarationProvider
context
- the contextnode
- the Nodepublic java.util.Collection<? extends Declaration> getDeclarations(Context context, Node node)
DeclarationProvider
getDeclarations
in interface DeclarationProvider
context
- the contextnode
- the Nodepublic java.util.Collection<? extends Declaration> getTopLevelDeclarations(Context context, Node node)
DeclarationProvider
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)
.
getTopLevelDeclarations
in interface DeclarationProvider
context
- the contextnode
- the Node
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |