Class Finder.ByTypeRecursivelyFinder

  • Enclosing class:
    Finder

    public static final class Finder.ByTypeRecursivelyFinder
    extends java.lang.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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends Element>
      java.util.Collection<T>
      find​(Project project, java.lang.Class[] types)
      Collect all elements of given specific type (not super class or interface) from the project.
      <T extends Element>
      java.util.Collection<T>
      find​(Project project, java.lang.Class[] types, boolean includeRoots)
      Collect all elements of given specific type (not super class or interface) from the project
      <T extends Element>
      java.util.Collection<T>
      find​(Element root, java.lang.Class[] types)
      Collect all elements of given specific type (not super class or interface) from the root element.
      <T extends Element>
      java.util.Collection<T>
      find​(Element root, java.lang.Class[] types, boolean includeRoots)
      Collect all elements of given specific type (not super class or interface) from the root element.
      <T extends Element>
      java.util.Collection<T>
      find​(Element root, java.lang.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>
      java.util.Collection<T>
      find​(java.util.Collection<? extends Element> roots, java.lang.Class[] types, boolean includeRoots)
      Collect all elements of given specific type (not super class or interface) from the root element.
      <T extends Element>
      java.util.Collection<T>
      find​(java.util.Collection<? extends Element> roots, java.lang.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, java.lang.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, java.lang.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, java.lang.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, java.lang.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​(java.util.Collection<? extends Element> roots, java.lang.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​(java.util.Collection<? extends Element> roots, java.lang.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 Detail

      • iterator

        public <T extends Element> com.nomagic.ci.persistence.local.query.CloseableIterator<T> iterator​(Element root,
                                                                                                        @CheckForNull
                                                                                                        java.lang.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
                                                                                                        java.lang.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​(java.util.Collection<? extends Element> roots,
                                                                                                        @CheckForNull
                                                                                                        java.lang.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​(java.util.Collection<? extends Element> roots,
                                                                                                        @CheckForNull
                                                                                                        java.lang.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
                                                                                                        java.lang.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
                                                                                                        java.lang.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> java.util.Collection<T> find​(Element root,
                                                                @CheckForNull
                                                                java.lang.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> java.util.Collection<T> find​(Element root,
                                                                @CheckForNull
                                                                java.lang.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> java.util.Collection<T> find​(Project project,
                                                                @CheckForNull
                                                                java.lang.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> java.util.Collection<T> find​(Project project,
                                                                @CheckForNull
                                                                java.lang.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> java.util.Collection<T> find​(Element root,
                                                                @CheckForNull
                                                                java.lang.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> java.util.Collection<T> find​(java.util.Collection<? extends Element> roots,
                                                                @CheckForNull
                                                                java.lang.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> java.util.Collection<T> find​(java.util.Collection<? extends Element> roots,
                                                                @CheckForNull
                                                                java.lang.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