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 Adapter
Adapter.Internal -
Field Summary
Fields inherited from class 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 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
-
toString
-
getParentOf
-
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
-