Package com.nomagic.magicdraw.uml
Class Finder
java.lang.Object
com.nomagic.uml2.finder.BaseFinder
com.nomagic.magicdraw.uml.Finder
@OpenApiAll
public class Finder
extends com.nomagic.uml2.finder.BaseFinder
This utility class should be used for searching element(s) in the model using various criteria.
Search criteria are organized in several inner finders.
To retrieve Element metatype, use
Use
Use methods below to get instances of these finders:
To retrieve Element metatype, use
BaseElement.getClassType()
Use
ClassTypes.getSubtypesArray(Class)
to collect all subtypes as array of given metatype
Use methods below to get instances of these finders:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Search element by element hyperlink.static final class
Search for all elements by simple name among the given root element(s) and direct children of root element(s)static final class
Search for all elements by simple name among the given root element(s) and all(direct and indirect) children of root element(s)static final class
Search for any first element by simple name among the given root element(s) and direct children of root element(s)static final class
Search for any first element by simple name among the given root element(s) and all(direct and indirect) children of root element(s)static final class
Search for elements by qualified namestatic final class
Search for all elements in the given root element(s) and all(direct and indirect) children of root element(s)static final class
Search for all elements by element type in the given root element(s) and direct children of root element(s)static final class
Search for all elements by element type in the given root element(s) and all(direct and indirect) children of root element(s) -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Finder.ByHyperlinkFinder
Search for elements by element hyperlink.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)static Finder.ByNameAllFinder
Search for all elements by simple name among the given root element(s) and direct children of root element(s)Search for all elements by simple name among the given root element(s) and all(direct and indirect) children of root element(s)Search for any first element by simple name among the given root element(s) and all(direct and indirect) children of root element(s)static Finder.ByQualifiedNameFinder
Search for elements by qualified namestatic Finder.ByScopeFinder
byScope()
Search for all elements in the given root element(s) and all(direct and indirect) children of root element(s)static Finder.ByTypeFinder
byType()
Search for all elements by element type in the given root element(s) and direct children of root element(s)Search for all elements by element type in the given root element(s) and all(direct and indirect) children of root element(s)Methods inherited from class com.nomagic.uml2.finder.BaseFinder
hasName, toRoots, toRoots, toSet, toTypes
-
Constructor Details
-
Finder
public Finder()
-
-
Method Details
-
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
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
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
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
Search for elements by qualified name- Returns:
- finder by qualified name
-
byHyperlink
Search for elements by element hyperlink.- Returns:
- finder by qualified name
-
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
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
Search for all elements in the given root element(s) and all(direct and indirect) children of root element(s)- Returns:
- finder by scope
-