java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.Region
All Implemented Interfaces:
IRegion

public class Region extends Object implements IRegion
See Also:
IRegion
  • Constructor Details

    • Region

      public Region()
  • Method Details

    • add

      public void add(IJavaElement element)
      Description copied from interface: IRegion
      Adds the given element and all of its descendents to this region. If the specified element is already included, or one of its ancestors is already included, this has no effect. If the element being added is an ancestor of an element already contained in this region, the ancestor subsumes the descendent.
      Specified by:
      add in interface IRegion
      Parameters:
      element - the given element
    • contains

      public boolean contains(IJavaElement element)
      Description copied from interface: IRegion
      Returns whether the given element is contained in this region.
      Specified by:
      contains in interface IRegion
      Parameters:
      element - the given element
      Returns:
      true if the given element is contained in this region, false otherwise
    • getElements

      public IJavaElement[] getElements()
      Description copied from interface: IRegion
      Returns the top level elements in this region. All descendents of these elements are also included in this region.
      Specified by:
      getElements in interface IRegion
      Returns:
      the top level elements in this region
    • remove

      public boolean remove(IJavaElement element)
      Description copied from interface: IRegion
      Removes the specified element from the region and returns true if successful, false if the remove fails. If an ancestor of the given element is included, the remove fails (in other words, it is not possible to selectively exclude descendants of included ancestors).
      Specified by:
      remove in interface IRegion
      Parameters:
      element - the given element
      Returns:
      true if successful, false if the remove fails
    • getParent

      protected IJavaElement getParent(IJavaElement element)