Class Finder.ByTypeRecursivelyFinder

java.lang.Object
com.nomagic.magicdraw.uml.Finder.ByTypeRecursivelyFinder
Enclosing class:
Finder

public static final class Finder.ByTypeRecursivelyFinder extends Object
Search for all elements by element type in the given root element(s) and all(direct and indirect) children of root element(s)
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends Element>
    Collection<T>
    find(Project project, Class[] types)
    Collect all elements of given specific type (not super class or interface) from the project.
    <T extends Element>
    Collection<T>
    find(Project project, Class[] types, boolean includeRoots)
    Collect all elements of given specific type (not super class or interface) from the project
    <T extends Element>
    Collection<T>
    find(Element root, Class[] types)
    Collect all elements of given specific type (not super class or interface) from the root element.
    <T extends Element>
    Collection<T>
    find(Element root, Class[] types, boolean includeRoots)
    Collect all elements of given specific type (not super class or interface) from the root element.
    <T extends Element>
    Collection<T>
    find(Element root, Class[] types, boolean includeRoot, boolean includeAdditionalContents, ProgressStatus monitor)
    Collect all elements of given specific type (not super class or interface) from the root element.
    <T extends Element>
    Collection<T>
    find(Collection<? extends Element> roots, Class[] types, boolean includeRoots)
    Collect all elements of given specific type (not super class or interface) from the root element.
    <T extends Element>
    Collection<T>
    find(Collection<? extends Element> roots, Class[] types, boolean includeRoots, boolean includeAdditionalContents, ProgressStatus monitor)
    Collect all elements of given specific type (not super class or interface) from the root element.
    <T extends Element>
    com.nomagic.ci.persistence.local.query.CloseableIterator<T>
    iterator(Project project, Class[] types)
    Returns iterator which contains elements of given specific type (not super class or interface).
    <T extends Element>
    com.nomagic.ci.persistence.local.query.CloseableIterator<T>
    iterator(Project project, Class[] types, boolean includeRoot)
    Returns iterator which contains elements of given specific type (not super class or interface).
    <T extends Element>
    com.nomagic.ci.persistence.local.query.CloseableIterator<T>
    iterator(Element root, Class[] types)
    Returns iterator which contains elements of given specific type (not super class or interface).
    <T extends Element>
    com.nomagic.ci.persistence.local.query.CloseableIterator<T>
    iterator(Element root, Class[] types, boolean includeRoot)
    Returns iterator which contains elements of given specific type (not super class or interface).
    <T extends Element>
    com.nomagic.ci.persistence.local.query.CloseableIterator<T>
    iterator(Collection<? extends Element> roots, Class[] types)
    Returns iterator which contains elements of given specific type (not super class or interface).
    <T extends Element>
    com.nomagic.ci.persistence.local.query.CloseableIterator<T>
    iterator(Collection<? extends Element> roots, Class[] types, boolean includeRoot)
    Returns iterator which contains elements of given specific type (not super class or interface).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • iterator

      public <T extends Element> com.nomagic.ci.persistence.local.query.CloseableIterator<T> iterator(Element root, @CheckForNull Class[] types)
      Returns iterator which contains elements of given specific type (not super class or interface). Search of elements is done from a given root element.
      Parameters:
      root - root element.
      types - element type. Null means any element
      Returns:
      iterator
    • iterator

      public <T extends Element> com.nomagic.ci.persistence.local.query.CloseableIterator<T> iterator(Element root, @CheckForNull Class[] types, boolean includeRoot)
      Returns iterator which contains elements of given specific type (not super class or interface). Search of elements is done from a given root element.
      Parameters:
      root - root element.
      types - element type. Null means any element
      includeRoot - include root into result
      Returns:
      iterator
    • iterator

      public <T extends Element> com.nomagic.ci.persistence.local.query.CloseableIterator<T> iterator(Collection<? extends Element> roots, @CheckForNull Class[] types)
      Returns iterator which contains elements of given specific type (not super class or interface). Search of elements is done from a given root element. Roots are included also.
      Parameters:
      roots - root elements.
      types - element type. Null means any element
      Returns:
      iterator
    • iterator

      public <T extends Element> com.nomagic.ci.persistence.local.query.CloseableIterator<T> iterator(Collection<? extends Element> roots, @CheckForNull Class[] types, boolean includeRoot)
      Returns iterator which contains elements of given specific type (not super class or interface). Search of elements is done from a given root element.
      Parameters:
      roots - root elements.
      types - element type. Null means any element
      includeRoot - include root elements into result
      Returns:
      iterator
    • iterator

      public <T extends Element> com.nomagic.ci.persistence.local.query.CloseableIterator<T> iterator(Project project, @CheckForNull Class[] types)
      Returns iterator which contains elements of given specific type (not super class or interface). Search of elements is done in whole project. Root models of project are included.
      Parameters:
      project - project
      types - element type. Null means any element
      Returns:
      iterator
    • iterator

      public <T extends Element> com.nomagic.ci.persistence.local.query.CloseableIterator<T> iterator(Project project, @CheckForNull Class[] types, boolean includeRoot)
      Returns iterator which contains elements of given specific type (not super class or interface). Search of elements is done in whole project
      Parameters:
      project - project
      types - element type. Null means any element
      includeRoot - include project root models into result
      Returns:
      iterator
    • find

      public <T extends Element> Collection<T> find(Element root, @CheckForNull Class[] types)
      Collect all elements of given specific type (not super class or interface) from the root element. Roots are also included
      Parameters:
      root - the root element for searching
      types - an array of Element's class types (Class.class, Package.class, Property.class and etc)
      Returns:
      found elements
    • find

      public <T extends Element> Collection<T> find(Element root, @CheckForNull Class[] types, boolean includeRoots)
      Collect all elements of given specific type (not super class or interface) from the root element.
      Parameters:
      root - the root element for searching
      types - an array of Element's class types (Class.class, Package.class, Property.class and etc)
      includeRoots - include root elements into search results
      Returns:
      found elements
    • find

      public <T extends Element> Collection<T> find(Project project, @CheckForNull Class[] types)
      Collect all elements of given specific type (not super class or interface) from the project. Roots are also included.
      Parameters:
      project - project
      types - an array of Element's class types (Class.class, Package.class, Property.class and etc)
      Returns:
      found elements
    • find

      public <T extends Element> Collection<T> find(Project project, @CheckForNull Class[] types, boolean includeRoots)
      Collect all elements of given specific type (not super class or interface) from the project
      Parameters:
      project - project
      types - an array of Element's class types (Class.class, Package.class, Property.class and etc)
      includeRoots - include root models of project into search results
      Returns:
      found elements
    • find

      public <T extends Element> Collection<T> find(Element root, @CheckForNull Class[] types, boolean includeRoot, boolean includeAdditionalContents, @CheckForNull ProgressStatus monitor)
      Collect all elements of given specific type (not super class or interface) from the root element.
      Parameters:
      root - the root element for searching
      types - an array of Element's class types (Class.class, Package.class, Property.class and etc)
      includeRoot - include root elements into search results
      includeAdditionalContents - include additional content of Element defined in DSL
      monitor - progress monitor
      Returns:
      found elements
    • find

      public <T extends Element> Collection<T> find(Collection<? extends Element> roots, @CheckForNull Class[] types, boolean includeRoots)
      Collect all elements of given specific type (not super class or interface) from the root element.
      Parameters:
      roots - the root element for searching
      types - an array of Element's class types (Class.class, Package.class, Property.class and etc)
      includeRoots - include root elements into search results
      Returns:
      found elements
    • find

      public <T extends Element> Collection<T> find(Collection<? extends Element> roots, @CheckForNull Class[] types, boolean includeRoots, boolean includeAdditionalContents, @CheckForNull ProgressStatus monitor)
      Collect all elements of given specific type (not super class or interface) from the root element.
      Parameters:
      roots - the root element for searching
      types - an array of Element's class types (Class.class, Package.class, Property.class and etc)
      includeRoots - include root elements into search results
      includeAdditionalContents - include additional content of Element defined in DSL
      monitor - progress monitor
      Returns:
      found elements