Package com.nomagic.magicdraw.uml
Class Finder.ByTypeFinder
- java.lang.Object
-
- com.nomagic.magicdraw.uml.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 Collectionstatic <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
-
-
-
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 elementtype
- 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
- elementstype
- 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
- elementstypes
- 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 elementtype
- Element class types (Class.class, Package.class, Property.class and etc). Null means any typeincludeRoot
- 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
- projecttype
- 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
- projecttype
- Element class types (Class.class, Package.class, Property.class and etc). Null means any typeincludeRoots
- 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 elementstype
- 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 elementstype
- Element class types (Class.class, Package.class, Property.class and etc). Null means any typeincludeRoot
- 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 elementtypes
- 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 elementtypes
- an array of Element's class types (Class.class, Package.class, Property.class and etc). Null means any typeincludeRoot
- 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
- projecttypes
- 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
- projecttypes
- an array of Element's class types (Class.class, Package.class, Property.class and etc). Null means any typeincludeRoots
- 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 elementstypes
- 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 elementstypes
- an array of Element's class types (Class.class, Package.class, Property.class and etc). Null means any typeincludeRoot
- include root elements into search results- Returns:
- roots
-
-