Class Finder

    • Constructor Detail

      • Finder

        public Finder()
    • Method Detail

      • toTypes

        @CheckForNull
        private static java.lang.Class[] toTypes​(@CheckForNull
                                                 java.lang.Class type)
      • toRoots

        private static java.util.Collection<? extends Element> toRoots​(Element root)
      • toRoots

        private static java.util.Collection<? extends Element> toRoots​(@CheckForNull
                                                                       Project project)
      • toSet

        @CheckForNull
        private static java.util.Set<java.lang.Class> toSet​(@CheckForNull
                                                            java.lang.Class[] types)
      • byName

        public static Finder.ByNameFinder byName()
        Search for any first element by simple name among the given root element(s) and direct children of root element(s)
        Returns:
        finder by element name
      • byNameAll

        public static Finder.ByNameAllFinder byNameAll()
        Search for all elements by simple name among the given root element(s) and direct children of root element(s)
        Returns:
        finder of all elements by name
      • byNameRecursively

        public static Finder.ByNameRecursivelyFinder byNameRecursively()
        Search for any first element by simple name among the given root element(s) and all(direct and indirect) children of root element(s)
        Returns:
        finder by element name recursively
      • byNameAllRecursively

        public static Finder.ByNameAllRecursivelyFinder byNameAllRecursively()
        Search for all elements by simple name among the given root element(s) and all(direct and indirect) children of root element(s)
        Returns:
        finder of all elements recursively
      • byQualifiedName

        public static Finder.ByQualifiedNameFinder byQualifiedName()
        Search for elements by qualified name
        Returns:
        finder by qualified name
      • byHyperlink

        public static Finder.ByHyperlinkFinder byHyperlink()
        Search for elements by element hyperlink.
        Returns:
        finder by qualified name
      • byType

        public static Finder.ByTypeFinder byType()
        Search for all elements by element type in the given root element(s) and direct children of root element(s)
        Returns:
        finder by element meta type
      • byTypeRecursively

        public static Finder.ByTypeRecursivelyFinder byTypeRecursively()
        Search for all elements by element type in the given root element(s) and all(direct and indirect) children of root element(s)
        Returns:
        finder by element metatype recursively
      • byScope

        public static Finder.ByScopeFinder byScope()
        Search for all elements in the given root element(s) and all(direct and indirect) children of root element(s)
        Returns:
        finder by scope
      • hasName

        private static <T extends Element> boolean hasName​(T element,
                                                           java.lang.String name)