Class ElementDescriptor<ELEMENT extends ECPElement>
- java.lang.Object
-
- org.eclipse.emf.ecp.internal.core.util.Element
-
- org.eclipse.emf.ecp.internal.core.util.ElementDescriptor<ELEMENT>
-
- Type Parameters:
ELEMENT
-
- All Implemented Interfaces:
java.lang.Comparable<ECPElement>
,ECPElement
,ECPDisposable
,ECPDisposable.DisposeListener
,InternalDescriptor<ELEMENT>
,InternalRegistryElement
- Direct Known Subclasses:
ExtensionParser.ExtensionDescriptor
public abstract class ElementDescriptor<ELEMENT extends ECPElement> extends Element implements InternalDescriptor<ELEMENT>, ECPDisposable.DisposeListener
- Author:
- Eike Stepper
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.emf.ecp.spi.core.util.ECPDisposable
ECPDisposable.DisposeListener
-
-
Constructor Summary
Constructors Constructor Description ElementDescriptor(ElementRegistry<ELEMENT,?> registry, java.lang.String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addDisposeListener(ECPDisposable.DisposeListener listener)
Adds aECPDisposable.DisposeListener
to this instance.void
dispose()
Disposes the current instance.void
disposed(ECPDisposable disposable)
Callback method being used to notify listeners about a dispose.protected void
doDispose()
java.lang.String
getDescription()
Return the description.java.lang.String
getLabel()
Returns the label.ElementRegistry<ELEMENT,?>
getRegistry()
ELEMENT
getResolvedElement()
boolean
isDisposed()
Whether this instance is already disposed.boolean
isResolved()
void
removeDisposeListener(ECPDisposable.DisposeListener listener)
Removed aECPDisposable.DisposeListener
from this instance.protected abstract ELEMENT
resolve()
protected void
resolvedElement(ELEMENT element)
void
setDescription(java.lang.String description)
Sets the description.void
setLabel(java.lang.String label)
Sets the label.-
Methods inherited from class org.eclipse.emf.ecp.internal.core.util.Element
compareTo, equals, getName, getType, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.emf.ecp.core.util.ECPElement
getName
-
-
-
-
Constructor Detail
-
ElementDescriptor
public ElementDescriptor(ElementRegistry<ELEMENT,?> registry, java.lang.String name)
-
-
Method Detail
-
getRegistry
public final ElementRegistry<ELEMENT,?> getRegistry()
-
getLabel
public final java.lang.String getLabel()
Returns the label.- Specified by:
getLabel
in interfaceInternalRegistryElement
- Returns:
- the label
-
setLabel
public final void setLabel(java.lang.String label)
Sets the label.- Specified by:
setLabel
in interfaceInternalRegistryElement
- Parameters:
label
- the Label to set
-
getDescription
public final java.lang.String getDescription()
Return the description.- Specified by:
getDescription
in interfaceInternalRegistryElement
- Returns:
- the description
-
setDescription
public final void setDescription(java.lang.String description)
Sets the description.- Specified by:
setDescription
in interfaceInternalRegistryElement
- Parameters:
description
- the Description to set
-
isResolved
public final boolean isResolved()
- Specified by:
isResolved
in interfaceInternalDescriptor<ELEMENT extends ECPElement>
-
getResolvedElement
public final ELEMENT getResolvedElement()
- Specified by:
getResolvedElement
in interfaceInternalDescriptor<ELEMENT extends ECPElement>
-
isDisposed
public final boolean isDisposed()
Whether this instance is already disposed.- Specified by:
isDisposed
in interfaceECPDisposable
- Returns:
- true if already disposed, false otherwise.
-
dispose
public final void dispose()
Disposes the current instance.- Specified by:
dispose
in interfaceECPDisposable
-
addDisposeListener
public final void addDisposeListener(ECPDisposable.DisposeListener listener)
Adds aECPDisposable.DisposeListener
to this instance.- Specified by:
addDisposeListener
in interfaceECPDisposable
- Parameters:
listener
- the listener to add
-
removeDisposeListener
public final void removeDisposeListener(ECPDisposable.DisposeListener listener)
Removed aECPDisposable.DisposeListener
from this instance.- Specified by:
removeDisposeListener
in interfaceECPDisposable
- Parameters:
listener
- the listener to remove
-
disposed
public final void disposed(ECPDisposable disposable)
Callback method being used to notify listeners about a dispose.- Specified by:
disposed
in interfaceECPDisposable.DisposeListener
- Parameters:
disposable
- the object being disposed
-
doDispose
protected void doDispose()
-
resolvedElement
protected void resolvedElement(ELEMENT element)
-
resolve
protected abstract ELEMENT resolve() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-