Skip navigation links

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

E17493-03


oracle.ide.dependency
Class IdDeclaration

java.lang.Object
  extended by oracle.ide.dependency.IdDeclaration

All Implemented Interfaces:
Declaration
Direct Known Subclasses:
AnnotationDeclaration, ClassDeclaration, FieldDeclaration, IndexDeclaration, MethodDeclaration

public abstract class IdDeclaration
extends java.lang.Object
implements Declaration

A declaration that is identified by a unique ID. This allows different languages to have references to each other. The language containing the reference just has to know the ID of the declaration. The owner of the declaration is reponsible for providing a public API to obtain the ID. For example, a Java language provider should have an API to obtain the declaration ID for classes, methods, fields, etc.

See Also:
IdDeclarationProvider, IdReference

Field Summary
protected  java.lang.String id
           

 

Constructor Summary
IdDeclaration(java.lang.String id)
           

 

Method Summary
 boolean canDelete()
          Determine whether this declaration can be deleted.
 boolean delete()
          Delete this declaration.
 boolean equals(java.lang.Object object)
           
static IdDeclaration findDeclaration(Context context, java.lang.String id)
          Find the IdDeclaration for an ID.
 java.lang.String getDeclarationId()
          Gets the unique ID for this declaration.
 int hashCode()
           

 

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

 

Methods inherited from interface oracle.ide.dependency.Declaration
getURL, show

 

Field Detail

id

protected java.lang.String id

Constructor Detail

IdDeclaration

public IdDeclaration(java.lang.String id)

Method Detail

findDeclaration

public static IdDeclaration findDeclaration(Context context,
                                            java.lang.String id)
                                     throws java.lang.InterruptedException
Find the IdDeclaration for an ID.
Parameters:
context - the context
id - the declaration ID
Returns:
the IdDeclaration, or null if no matching declaration is found
Throws:
java.lang.InterruptedException - if the operation is interrupted
java.lang.IllegalStateException - if the method is called on the event thread

getDeclarationId

public java.lang.String getDeclarationId()
Gets the unique ID for this declaration. To ensure uniqueness, the ID should contain a unique language identifier. For example, the ID for a Java class might be "java:class:" followed by the fully qualified class name.
Returns:
the unique ID for this declaration

canDelete

public boolean canDelete()
Description copied from interface: Declaration
Determine whether this declaration can be deleted.
Specified by:
canDelete in interface Declaration
Returns:
true if this declaration can be deleted, false otherwise

delete

public boolean delete()
Description copied from interface: Declaration
Delete this declaration. This will only be called if Declaration.canDelete() returns true.
Specified by:
delete in interface Declaration
Returns:
true if this declaration was successfully deleted, false otherwise

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

Skip navigation links

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

E17493-03


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