org.eclipse.emf.ecp.internal.core.util
Class ElementDescriptor<ELEMENT extends ECPElement>

java.lang.Object
  extended by org.eclipse.emf.ecp.internal.core.util.Element
      extended by org.eclipse.emf.ecp.internal.core.util.ElementDescriptor<ELEMENT>
Type Parameters:
ELEMENT -
All Implemented Interfaces:
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
ElementDescriptor(ElementRegistry<ELEMENT,?> registry, String name)
           
 
Method Summary
 void addDisposeListener(ECPDisposable.DisposeListener listener)
          Adds a ECPDisposable.DisposeListener to this instance.
 void dispose()
          Disposes the current instance.
 void disposed(ECPDisposable disposable)
          Callback method being used to notify listeners about a dispose.
 String getDescription()
          Return the description.
 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 a ECPDisposable.DisposeListener from this instance.
 void setDescription(String description)
          Sets the description.
 void setLabel(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
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.ecp.core.util.ECPElement
getName
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

ElementDescriptor

public ElementDescriptor(ElementRegistry<ELEMENT,?> registry,
                         String name)
Method Detail

getRegistry

public final ElementRegistry<ELEMENT,?> getRegistry()

getLabel

public final String getLabel()
Returns the label.

Specified by:
getLabel in interface InternalRegistryElement
Returns:
the label

setLabel

public final void setLabel(String label)
Sets the label.

Specified by:
setLabel in interface InternalRegistryElement
Parameters:
label - the Label to set

getDescription

public final String getDescription()
Return the description.

Specified by:
getDescription in interface InternalRegistryElement
Returns:
the description

setDescription

public final void setDescription(String description)
Sets the description.

Specified by:
setDescription in interface InternalRegistryElement
Parameters:
description - the Description to set

isResolved

public final boolean isResolved()

Specified by:
isResolved in interface InternalDescriptor<ELEMENT extends ECPElement>

getResolvedElement

public final ELEMENT getResolvedElement()

Specified by:
getResolvedElement in interface InternalDescriptor<ELEMENT extends ECPElement>

isDisposed

public final boolean isDisposed()
Whether this instance is already disposed.

Specified by:
isDisposed in interface ECPDisposable
Returns:
true if already disposed, false otherwise.

dispose

public final void dispose()
Disposes the current instance.

Specified by:
dispose in interface ECPDisposable

addDisposeListener

public final void addDisposeListener(ECPDisposable.DisposeListener listener)
Adds a ECPDisposable.DisposeListener to this instance.

Specified by:
addDisposeListener in interface ECPDisposable
Parameters:
listener - the listener to add

removeDisposeListener

public final void removeDisposeListener(ECPDisposable.DisposeListener listener)
Removed a ECPDisposable.DisposeListener from this instance.

Specified by:
removeDisposeListener in interface ECPDisposable
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 interface ECPDisposable.DisposeListener
Parameters:
disposable - the object being disposed


Copyright © 2014. All Rights Reserved.