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, useBaseElement.getClassType()
UseClassTypes.getSubtypesArray(Class)
to collect all subtypes as array of given metatype
Use methods below to get instances of these finders:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Finder.ByHyperlinkFinder
Search element by element hyperlink.static class
Finder.ByNameAllFinder
Search for all elements by simple name among the given root element(s) and direct children of root element(s)static class
Finder.ByNameAllRecursivelyFinder
Search for all elements by simple name among the given root element(s) and all(direct and indirect) children of root element(s)static class
Finder.ByNameFinder
Search for any first element by simple name among the given root element(s) and direct children of root element(s)static class
Finder.ByNameRecursivelyFinder
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 class
Finder.ByQualifiedNameFinder
Search for elements by qualified namestatic class
Finder.ByScopeFinder
Search for all elements in the given root element(s) and all(direct and indirect) children of root element(s)static class
Finder.ByTypeFinder
Search for all elements by element type in the given root element(s) and direct children of root element(s)static class
Finder.ByTypeRecursivelyFinder
Search for all elements by element type in the given root element(s) and all(direct and indirect) children of root element(s)
-
Field Summary
Fields Modifier and Type Field Description private static Finder.ByHyperlinkFinder
byHyperlinkFinder
private static Finder.ByNameFinder
byName
private static Finder.ByNameAllFinder
byNameAll
private static Finder.ByNameAllRecursivelyFinder
byNameAllRecursively
private static Finder.ByNameRecursivelyFinder
byNameRecursively
private static Finder.ByQualifiedNameFinder
byQualifiedName
private static Finder.ByScopeFinder
byScope
private static Finder.ByTypeFinder
byType
private static Finder.ByTypeRecursivelyFinder
byTypeRecursively
-
Constructor Summary
Constructors Constructor Description Finder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Finder.ByHyperlinkFinder
byHyperlink()
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
byNameAll()
Search for all elements by simple name among the given root element(s) and direct children of root element(s)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)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)static Finder.ByQualifiedNameFinder
byQualifiedName()
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)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)
-
-
-
Field Detail
-
byName
private static final Finder.ByNameFinder byName
-
byNameAll
private static final Finder.ByNameAllFinder byNameAll
-
byNameRecursively
private static final Finder.ByNameRecursivelyFinder byNameRecursively
-
byNameAllRecursively
private static final Finder.ByNameAllRecursivelyFinder byNameAllRecursively
-
byQualifiedName
private static final Finder.ByQualifiedNameFinder byQualifiedName
-
byHyperlinkFinder
private static final Finder.ByHyperlinkFinder byHyperlinkFinder
-
byType
private static final Finder.ByTypeFinder byType
-
byTypeRecursively
private static final Finder.ByTypeRecursivelyFinder byTypeRecursively
-
byScope
private static final Finder.ByScopeFinder byScope
-
-
Method Detail
-
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
-
-