Class ByQualifiedName
java.lang.Object
com.dassault_systemes.modeler.kerml.find.AbstractFinder
com.dassault_systemes.modeler.kerml.find.ByQualifiedName
@OpenApiAll
public class ByQualifiedName
extends com.dassault_systemes.modeler.kerml.find.AbstractFinder
Finder implementation that resolves
elements by their
qualified name within a model context.
A qualified name represents the hierarchical path to an element, typically
composed of nested namespace or package names separated by a delimiter
(e.g., "::"). This allows unambiguous identification of elements across
different scopes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends Element>
TFinds a single element matching the given qualified name and metaclass.<T extends Element>
Collection<T> Finds all elements matching the given qualified name and metaclass.Methods inherited from class com.dassault_systemes.modeler.kerml.find.AbstractFinder
find, streamOf
-
Constructor Details
-
ByQualifiedName
public ByQualifiedName()
-
-
Method Details
-
find
@CheckForNull public <T extends Element> T find(Element context, String qualifiedName, Class<T> metaclass) Finds a single element matching the given qualified name and metaclass.- Type Parameters:
T- the element type- Parameters:
context- the starting element (e.g., namespace or root) from which the qualified name is resolvedqualifiedName- the fully qualified name identifying the target elementmetaclass- the expected type of the result- Returns:
- the matching element, or
nullif no match is found
-
findAll
public <T extends Element> Collection<T> findAll(Element context, String qualifiedName, Class<T> metaclass) Finds all elements matching the given qualified name and metaclass.- Type Parameters:
T- the element type- Parameters:
context- the starting element from which resolution beginsqualifiedName- the fully qualified name identifying target elementsmetaclass- the expected type of the results- Returns:
- a collection of matching elements, possibly empty but never
null
-