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.
  • Constructor Details

    • Element

      public Element(IElement parent, 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 Details

    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface IElement
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface IElement
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getName_

      public final 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