Class Finder.ByNameRecursivelyFinder

  • Enclosing class:
    Finder

    public static final class Finder.ByNameRecursivelyFinder
    extends java.lang.Object
    Search for any first element by simple name among the given root element(s) and all(direct and indirect) children of root element(s)
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends Element>
      T
      find​(Project project, java.lang.Class[] type, java.lang.String name)
      Find element by name.
      <T extends Element>
      T
      find​(Project project, java.lang.Class[] type, java.lang.String name, boolean includeRoot)
      Find element by name.
      <T extends Element>
      T
      find​(Project project, java.lang.Class type, java.lang.String name)
      Find element by name.
      <T extends Element>
      T
      find​(Project project, java.lang.Class type, java.lang.String name, boolean includeRoot)
      Find element by name.
      <T extends Element>
      T
      find​(Element root, java.lang.Class[] type, java.lang.String name)
      Find element by name.
      <T extends Element>
      T
      find​(Element root, java.lang.Class[] type, java.lang.String name, boolean includeRoot)
      Find element by name.
      <T extends Element>
      T
      find​(Element root, java.lang.Class type, java.lang.String name)
      Find element by name.
      <T extends Element>
      T
      find​(Element root, java.lang.Class type, java.lang.String name, boolean includeRoot)
      Find element by name.
      <T extends Element>
      T
      find​(java.util.Collection<? extends Element> roots, java.lang.Class[] type, java.lang.String name)
      Find element by name.
      <T extends Element>
      T
      find​(java.util.Collection<? extends Element> roots, java.lang.Class[] type, java.lang.String name, boolean includeRoot)
      Find element by name.
      <T extends Element>
      T
      find​(java.util.Collection<? extends Element> roots, java.lang.Class type, java.lang.String name)
      Find element by name.
      <T extends Element>
      T
      find​(java.util.Collection<? extends Element> roots, java.lang.Class type, java.lang.String name, boolean includeRoot)
      Find element by name.
      private static <T extends Element>
      T
      internalFind​(java.util.Collection<? extends Element> roots, java.lang.Class[] type, java.lang.String name, boolean includeRoot)  
      • Methods inherited from class java.lang.Object

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

      • ByNameRecursivelyFinder

        private ByNameRecursivelyFinder()
    • Method Detail

      • find

        @CheckForNull
        public <T extends Element> T find​(Element root,
                                          @CheckForNull
                                          java.lang.Class type,
                                          java.lang.String name)
        Find element by name. Include root(s) into a search.
        Parameters:
        root - root element
        type - strict class type of element. Nulls means any element
        name - Element name
        Returns:
        found Element or null
      • find

        @CheckForNull
        public <T extends Element> T find​(Element root,
                                          @CheckForNull
                                          java.lang.Class[] type,
                                          java.lang.String name)
        Find element by name. Include root(s) into a search.
        Parameters:
        root - root element
        type - strict class types of element. Nulls means any element
        name - Element name
        Returns:
        found Element or null
      • find

        @CheckForNull
        public <T extends Element> T find​(Element root,
                                          @CheckForNull
                                          java.lang.Class type,
                                          java.lang.String name,
                                          boolean includeRoot)
        Find element by name.
        Parameters:
        root - root element
        type - strict class type of element. Nulls means any element
        name - Element name
        includeRoot - include root element into a search
        Returns:
        found Element or null
      • find

        @CheckForNull
        public <T extends Element> T find​(Element root,
                                          @CheckForNull
                                          java.lang.Class[] type,
                                          java.lang.String name,
                                          boolean includeRoot)
        Find element by name.
        Parameters:
        root - root element
        type - strict class types of element. Nulls means any element
        name - Element name
        includeRoot - include root element into a search
        Returns:
        found Element or null
      • find

        @CheckForNull
        public <T extends Element> T find​(Project project,
                                          @CheckForNull
                                          java.lang.Class type,
                                          java.lang.String name)
        Find element by name. Include all project models into a search.
        Parameters:
        project - project (Project.getModels() will be used as roots)
        type - strict class type of element. Nulls means any element
        name - Element name
        Returns:
        found Element or null
      • find

        @CheckForNull
        public <T extends Element> T find​(Project project,
                                          @CheckForNull
                                          java.lang.Class[] type,
                                          java.lang.String name)
        Find element by name. Include all project models into a search.
        Parameters:
        project - project (Project.getModels() will be used as roots)
        type - strict class types of element. Nulls means any element
        name - Element name
        Returns:
        found Element or null
      • find

        @CheckForNull
        public <T extends Element> T find​(Project project,
                                          @CheckForNull
                                          java.lang.Class type,
                                          java.lang.String name,
                                          boolean includeRoot)
        Find element by name.
        Parameters:
        project - project (Project.getModels() will be used as roots)
        type - strict class type of element. Nulls means any element
        name - Element name
        includeRoot - include root element into a search
        Returns:
        found Element or null
      • find

        @CheckForNull
        public <T extends Element> T find​(Project project,
                                          @CheckForNull
                                          java.lang.Class[] type,
                                          java.lang.String name,
                                          boolean includeRoot)
        Find element by name.
        Parameters:
        project - project (Project.getModels() will be used as roots)
        type - strict class types of element. Nulls means any element
        name - Element name
        includeRoot - include root element into a search
        Returns:
        found Element or null
      • find

        @CheckForNull
        public <T extends Element> T find​(java.util.Collection<? extends Element> roots,
                                          @CheckForNull
                                          java.lang.Class type,
                                          java.lang.String name)
        Find element by name. Include root(s) into a search.
        Parameters:
        roots - root elements
        type - strict class type of element. Nulls means any element
        name - Element name
        Returns:
        found Element or null
      • find

        @CheckForNull
        public <T extends Element> T find​(java.util.Collection<? extends Element> roots,
                                          @CheckForNull
                                          java.lang.Class[] type,
                                          java.lang.String name)
        Find element by name. Include root(s) into a search.
        Parameters:
        roots - root element
        type - strict class types of element. Nulls means any element
        name - Element name
        Returns:
        found Element or null
      • find

        @CheckForNull
        public <T extends Element> T find​(java.util.Collection<? extends Element> roots,
                                          @CheckForNull
                                          java.lang.Class type,
                                          java.lang.String name,
                                          boolean includeRoot)
        Find element by name.
        Parameters:
        roots - root elements
        type - strict class type of element. Nulls means any element
        name - Element name
        includeRoot - include root element into a search
        Returns:
        found Element or null
      • find

        @CheckForNull
        public <T extends Element> T find​(java.util.Collection<? extends Element> roots,
                                          @CheckForNull
                                          java.lang.Class[] type,
                                          java.lang.String name,
                                          boolean includeRoot)
        Find element by name.
        Parameters:
        roots - root elements
        type - strict class types of element. Nulls means any element
        name - Element name
        includeRoot - include root element into a search
        Returns:
        found Element or null
      • internalFind

        @CheckForNull
        private static <T extends Element> T internalFind​(java.util.Collection<? extends Element> roots,
                                                          @CheckForNull
                                                          java.lang.Class[] type,
                                                          java.lang.String name,
                                                          boolean includeRoot)