Skip navigation links
oracle.ide.dependency
Class IdDeclaration
java.lang.Object
oracle.ide.dependency.IdDeclaration
- All Implemented Interfaces:
- Declaration
- Direct Known Subclasses:
- 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
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
id
protected java.lang.String id
IdDeclaration
public IdDeclaration(java.lang.String id)
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
Copyright © 1997, 2011, Oracle. All rights reserved.