Class Finder.ByTypeFinder

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

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

    • find

      public <T extends Element> Collection<T> find(Element root, @CheckForNull 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> Collection<? extends T> findInCollection(Collection<? extends Element> elements, 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> Collection<? extends T> findInCollection(Collection<? extends Element> elements, 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> Collection<T> find(Element root, @CheckForNull 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> Collection<T> find(Project project, @CheckForNull 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> Collection<T> find(Project project, @CheckForNull 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> Collection<T> find(Collection<? extends Element> roots, @CheckForNull 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> Collection<T> find(Collection<? extends Element> roots, @CheckForNull 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> Collection<T> find(Element root, @CheckForNull 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> Collection<T> find(Element root, @CheckForNull 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> Collection<T> find(Project project, @CheckForNull 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> Collection<T> find(Project project, @CheckForNull 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> Collection<T> find(Collection<? extends Element> roots, @CheckForNull 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> Collection<T> find(Collection<? extends Element> roots, @CheckForNull 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