Package cn.sliew.milky.component
Interface ComponentLookupService
-
- All Known Subinterfaces:
ComponentRegistry<E,C>
- All Known Implementing Classes:
AbstractComponentRegistry
public interface ComponentLookupServicecomponent lookup service.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanexists(String name)<T extends Component>
booleanexists(T component)Set<String>lookup(AttributeKey key)Set<String>lookup(Tag tag)<T extends Component>
Set<String>lookup(Class<T> componentType)<T extends Component>
Optional<T>lookup(String name)
-
-
-
Method Detail
-
lookup
<T extends Component> Optional<T> lookup(String name)
- Parameters:
name- component unique name- Returns:
- Component indentified by unique name
-
lookup
<T extends Component> Set<String> lookup(Class<T> componentType)
- Parameters:
componentType- component class- Returns:
- all component names by component type
-
lookup
Set<String> lookup(Tag tag)
- Parameters:
tag- the tag- Returns:
- all component by specified tag
-
lookup
Set<String> lookup(AttributeKey key)
- Parameters:
key- the attribute- Returns:
- all component by specified attribute
-
exists
boolean exists(String name)
- Parameters:
name- component unique name- Returns:
- true if component indentified by unique name exists, otherwise false
-
exists
<T extends Component> boolean exists(T component)
- Parameters:
component-- Returns:
- true if component exists, otherwise false
-
-