Package org.eclipse.handly.model.impl.support

## Class Element

- java.lang.Object
- - org.eclipse.core.runtime.PlatformObject
  - - org.eclipse.handly.model.impl.support.Element

- All Implemented Interfaces:
    `org.eclipse.core.runtime.IAdaptable`, `IElement`, `IElementImpl`, `IElementImplExtension`, `IElementImplSupport`, `IModelManager.Provider`
  Direct Known Subclasses:
    `SourceConstruct`, `SourceFile`

      public abstract class Element
      extends org.eclipse.core.runtime.PlatformObject
      implements IElementImplSupport

  Provides a skeletal implementation of `IElementImplExtension` to minimize the effort required to implement that interface. Clients might as well implement ("mix in") `IElementImplSupport` directly if extending this class is not possible/desirable for some reason.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.handly.model.impl.IElementImplExtension

      `IElementImplExtension.CloseHint`

  - ### Field Summary

    - ### Fields inherited from interface org.eclipse.handly.model.impl.IElementImplExtension

      `CLOSE_HINT, FORCE_OPEN`

    - ### Fields inherited from interface org.eclipse.handly.model.impl.support.IElementImplSupport

      `NEW_ELEMENTS, NO_BODY`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Element​(IElement parent, java.lang.String name)` | Constructs a handle for an element with the given parent element and the given name.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(java.lang.Object obj)` |
    `java.lang.String` | `getName_()` | Returns the name of this element, or `null` if this element has no name.
    `IElement` | `getParent_()` | Returns the element directly containing this element, or `null` if this element has no parent.
    `int` | `hashCode()` |
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class org.eclipse.core.runtime.PlatformObject

      `getAdapter`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.handly.model.impl.IElementImpl

      `equalsAndSameParentChain_, fetchChildren_, fetchChildrenOfType_, getChildrenOfType_, getHandleMemento_, getLocationUri_, getResource_, getRoot_, toDisplayString_`

    - ### Methods inherited from interface org.eclipse.handly.model.impl.IElementImplExtension

      `close_, getBody_, getBody_, getChildren_`

    - ### Methods inherited from interface org.eclipse.handly.model.impl.support.IElementImplSupport

      `buildStructure_, canEqual_, close_, defaultEquals_, defaultHashCode_, exists_, findBody_, getChildrenFromBody_, getElementManager_, getModel_, isOpenable_, newDoesNotExistException_, open_, openParent_, peekAtBody_, remove_, removing_, toString_, toStringAncestors_, toStringBody_, toStringChildren_, toStringName_, validateExistence_`

    - ### Methods inherited from interface org.eclipse.handly.model.impl.support.IModelManager.Provider

      `getModelManager_`

- - ### Constructor Detail

    - #### Element

          public Element​(IElement parent,
                         java.lang.String name)

      Constructs a handle for an element with the given parent element and the given name.
      Parameters:
        `parent` - the parent of the element, or `null` if the element has no parent
        `name` - the name of the element, or `null` if the element has no name

  - ### Method Detail

    - #### equals

          public boolean equals​(java.lang.Object obj)

      Specified by:
        `equals` in interface `IElement`
      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in interface `IElement`
      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getName_

          public final java.lang.String getName_()

      Description copied from interface: `IElementImpl`
      Returns the name of this element, or `null` if this element has no name. This is a handle-only method.
      Specified by:
        `getName_` in interface `IElementImpl`
      Returns:
        the element name, or `null` if this element has no name

    - #### getParent_

          public final IElement getParent_()

      Description copied from interface: `IElementImpl`
      Returns the element directly containing this element, or `null` if this element has no parent. This is a handle-only method.
      Specified by:
        `getParent_` in interface `IElementImpl`
      Returns:
        the parent element, or `null` if this element has no parent