Class Finder.ByTypeFinder

  • Enclosing class:
    Finder

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends Element>
      java.util.Collection<T>
      find​(Project project, java.lang.Class type)
      Collects owned elements of the given project root models.
      <T extends Element>
      java.util.Collection<T>
      find​(Project project, java.lang.Class[] types)
      Collects owned elements of the given project root models.
      <T extends Element>
      java.util.Collection<T>
      find​(Project project, java.lang.Class[] types, boolean includeRoots)
      Collects owned elements of the given project root models.
      <T extends Element>
      java.util.Collection<T>
      find​(Project project, java.lang.Class type, boolean includeRoots)
      Collects owned elements of the given project root models.
      <T extends Element>
      java.util.Collection<T>
      find​(Element root, java.lang.Class type)
      Collects owned elements of the given root elements of specified types.
      <T extends Element>
      java.util.Collection<T>
      find​(Element root, java.lang.Class[] types)
      Collects owned elements of the given root elements of specified types.
      <T extends Element>
      java.util.Collection<T>
      find​(Element root, java.lang.Class[] types, boolean includeRoot)
      Collects owned elements of the given root elements of specified types.
      <T extends Element>
      java.util.Collection<T>
      find​(Element root, java.lang.Class type, boolean includeRoot)
      Collects owned elements of the given root elements of specified types.
      <T extends Element>
      java.util.Collection<T>
      find​(java.util.Collection<? extends Element> roots, java.lang.Class type)
      Collects owned elements of the given root elements.
      <T extends Element>
      java.util.Collection<T>
      find​(java.util.Collection<? extends Element> roots, java.lang.Class[] types)
      Collects owned elements of the given root elements.
      <T extends Element>
      java.util.Collection<T>
      find​(java.util.Collection<? extends Element> roots, java.lang.Class[] types, boolean includeRoot)
      Collects owned elements of the given root elements.
      <T extends Element>
      java.util.Collection<T>
      find​(java.util.Collection<? extends Element> roots, java.lang.Class type, boolean includeRoot)
      Collects owned elements of the given root elements.
      static <T extends Element>
      java.util.Collection<? extends T>
      findInCollection​(java.util.Collection<? extends Element> elements, java.lang.Class type)
      Search by type for elements in the given Collection
      static <T extends Element>
      java.util.Collection<? extends T>
      findInCollection​(java.util.Collection<? extends Element> elements, java.lang.Class[] types)
      Search by type for elements in the given Collection
      • Methods inherited from class java.lang.Object

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

      • find

        public <T extends Element> java.util.Collection<T> find​(Element root,
                                                                @CheckForNull
                                                                java.lang.Class type)
        Collects owned elements of the given root elements of specified types. Includes root itself.
        Parameters:
        root - root element
        type - Element class types (Class.class, Package.class, Property.class and etc). Null means any type
        Returns:
        elements
      • findInCollection

        public static <T extends Element> java.util.Collection<? extends T> findInCollection​(java.util.Collection<? extends Element> elements,
                                                                                             java.lang.Class type)
        Search by type for elements in the given Collection
        Parameters:
        elements - elements
        type - element metatype
        Returns:
        found elements of given type
      • findInCollection

        public static <T extends Element> java.util.Collection<? extends T> findInCollection​(java.util.Collection<? extends Element> elements,
                                                                                             java.lang.Class[] types)
        Search by type for elements in the given Collection
        Parameters:
        elements - elements
        types - element meta types
        Returns:
        found elements of given type
      • find

        public <T extends Element> java.util.Collection<T> find​(Element root,
                                                                @CheckForNull
                                                                java.lang.Class type,
                                                                boolean includeRoot)
        Collects owned elements of the given root elements of specified types.
        Parameters:
        root - root element
        type - Element class types (Class.class, Package.class, Property.class and etc). Null means any type
        includeRoot - include root elements into search results
        Returns:
        elements
      • find

        public <T extends Element> java.util.Collection<T> find​(Project project,
                                                                @CheckForNull
                                                                java.lang.Class type)
        Collects owned elements of the given project root models. Roots are also included.
        Parameters:
        project - project
        type - Element class types (Class.class, Package.class, Property.class and etc). Null means any type
        Returns:
        elements
      • find

        public <T extends Element> java.util.Collection<T> find​(Project project,
                                                                @CheckForNull
                                                                java.lang.Class type,
                                                                boolean includeRoots)
        Collects owned elements of the given project root models.
        Parameters:
        project - project
        type - Element class types (Class.class, Package.class, Property.class and etc). Null means any type
        includeRoots - include root elements of the project
        Returns:
        elements
      • find

        public <T extends Element> java.util.Collection<T> find​(java.util.Collection<? extends Element> roots,
                                                                @CheckForNull
                                                                java.lang.Class type)
        Collects owned elements of the given root elements. Roots are also included.
        Parameters:
        roots - root elements
        type - Element class types (Class.class, Package.class, Property.class and etc). Null means any type
        Returns:
        roots
      • find

        public <T extends Element> java.util.Collection<T> find​(java.util.Collection<? extends Element> roots,
                                                                @CheckForNull
                                                                java.lang.Class type,
                                                                boolean includeRoot)
        Collects owned elements of the given root elements.
        Parameters:
        roots - root elements
        type - Element class types (Class.class, Package.class, Property.class and etc). Null means any type
        includeRoot - include root elements into search results
        Returns:
        roots
      • find

        public <T extends Element> java.util.Collection<T> find​(Element root,
                                                                @CheckForNull
                                                                java.lang.Class[] types)
        Collects owned elements of the given root elements of specified types. Includes root itself.
        Parameters:
        root - root element
        types - an array of Element's class types (Class.class, Package.class, Property.class and etc). Null means any type
        Returns:
        elements
      • find

        public <T extends Element> java.util.Collection<T> find​(Element root,
                                                                @CheckForNull
                                                                java.lang.Class[] types,
                                                                boolean includeRoot)
        Collects owned elements of the given root elements of specified types.
        Parameters:
        root - root element
        types - an array of Element's class types (Class.class, Package.class, Property.class and etc). Null means any type
        includeRoot - include root elements into search results
        Returns:
        elements
      • find

        public <T extends Element> java.util.Collection<T> find​(Project project,
                                                                @CheckForNull
                                                                java.lang.Class[] types)
        Collects owned elements of the given project root models. Roots are also included.
        Parameters:
        project - project
        types - an array of Element's class types (Class.class, Package.class, Property.class and etc). Null means any type
        Returns:
        elements
      • find

        public <T extends Element> java.util.Collection<T> find​(Project project,
                                                                @CheckForNull
                                                                java.lang.Class[] types,
                                                                boolean includeRoots)
        Collects owned elements of the given project root models.
        Parameters:
        project - project
        types - an array of Element's class types (Class.class, Package.class, Property.class and etc). Null means any type
        includeRoots - include root elements of the project
        Returns:
        elements
      • find

        public <T extends Element> java.util.Collection<T> find​(java.util.Collection<? extends Element> roots,
                                                                @CheckForNull
                                                                java.lang.Class[] types)
        Collects owned elements of the given root elements. Roots are also included.
        Parameters:
        roots - root elements
        types - an array of Element's class types (Class.class, Package.class, Property.class and etc). Null means any type
        Returns:
        roots
      • find

        public <T extends Element> java.util.Collection<T> find​(java.util.Collection<? extends Element> roots,
                                                                @CheckForNull
                                                                java.lang.Class[] types,
                                                                boolean includeRoot)
        Collects owned elements of the given root elements.
        Parameters:
        roots - root elements
        types - an array of Element's class types (Class.class, Package.class, Property.class and etc). Null means any type
        includeRoot - include root elements into search results
        Returns:
        roots