Package org.eclipse.emf.cdo
Class CDOElement
java.lang.Object
org.eclipse.emf.common.notify.impl.AdapterImpl
org.eclipse.emf.cdo.CDOElement
- All Implemented Interfaces:
IAdaptable,Adapter,Adapter.Internal
- Since:
- 4.4
- Author:
- Eike Stepper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceProvides the consumer with thestatesof objects such asCDOObjects.Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
Adapter.Internal -
Field Summary
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
target -
Constructor Summary
ConstructorsConstructorDescriptionCDOElement(EObject delegate) Creates a CDO element for the given delegate object. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a child to this element.getAdapter(Class adapter) Object[]Returns the children explicitly added to this element.Returns the adapted object represented by this element.static CDOElementReturns the existing CDO element adapter for the given object.Returns the parent of the adapted object in the CDO element hierarchy.static EObjectgetParentOf(EObject eObject) Returns the parent of the given object according to the CDO resource hierarchy.booleanReturns whether this element has any explicitly added children.booleanisAdapterForType(Object type) removeFrom(Object object) Removes CDO element adapters from the given object.voidreset()Removes all children from this element.toString()Returns a display string for a child object.Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
getTarget, notifyChanged, setTarget, unsetTarget
-
Constructor Details
-
CDOElement
Creates a CDO element for the given delegate object.- Parameters:
delegate- the object to adapt.
-
-
Method Details
-
getDelegate
Returns the adapted object represented by this element.- Returns:
- the adapted object.
-
getParent
Returns the parent of the adapted object in the CDO element hierarchy.- Returns:
- the parent object, or
nullif there is no parent.
-
getChildren
Returns the children explicitly added to this element.- Returns:
- the child objects.
-
hasChildren
public boolean hasChildren()Returns whether this element has any explicitly added children.- Returns:
trueif this element has children,falseotherwise.
-
addChild
Adds a child to this element.- Parameters:
child- the child object to add.
-
reset
public void reset()Removes all children from this element. -
isAdapterForType
- Specified by:
isAdapterForTypein interfaceAdapter- Overrides:
isAdapterForTypein classAdapterImpl
-
getAdapter
- Specified by:
getAdapterin interfaceIAdaptable
-
toString
Returns a display string for a child object.- Parameters:
child- the child object.- Returns:
- the display string.
-
toString
-
getParentOf
Returns the parent of the given object according to the CDO resource hierarchy.- Parameters:
eObject- the object whose parent is requested.- Returns:
- the parent object, or
nullif no parent is available.
-
getFor
Returns the existing CDO element adapter for the given object.- Parameters:
object- the object to inspect.- Returns:
- the existing CDO element, or
nullif none is installed.
-
removeFrom
Removes CDO element adapters from the given object.- Parameters:
object- the object from which adapters are removed.- Returns:
- the object's adapter list, or
nullif the object is not an EObject.
-