Package org.apache.maven.api.services
Interface Lookup
- All Superinterfaces:
Service
- All Known Implementing Classes:
DefaultLookup
,ProtoLookup
-
Method Summary
Modifier and TypeMethodDescription<T> T
Performs a lookup for given typed component.<T> T
Performs a lookup for given typed component.<T> List
<T> lookupList
(Class<T> type) Performs a collection lookup for given typed components.Performs a collection lookup for given typed components.<T> Optional
<T> lookupOptional
(Class<T> type) Performs a lookup for optional typed component.<T> Optional
<T> lookupOptional
(Class<T> type, String name) Performs a lookup for optional typed component.
-
Method Details
-
lookup
Performs a lookup for given typed component.- Type Parameters:
T
- The component type.- Parameters:
type
- The component type.- Returns:
- The component.
- Throws:
LookupException
- if no such component or there is some provisioning related issue.
-
lookup
Performs a lookup for given typed component.- Type Parameters:
T
- The component type.- Parameters:
type
- The component type.name
- The component name.- Returns:
- The component.
- Throws:
LookupException
- if no such component or there is some provisioning related issue.
-
lookupOptional
Performs a lookup for optional typed component.- Type Parameters:
T
- The component type.- Parameters:
type
- The component type.- Returns:
- Optional carrying component or empty optional if no such component.
- Throws:
LookupException
- if there is some provisioning related issue.
-
lookupOptional
Performs a lookup for optional typed component.- Type Parameters:
T
- The component type.- Parameters:
type
- The component type.name
- The component name.- Returns:
- Optional carrying component or empty optional if no such component.
- Throws:
LookupException
- if there is some provisioning related issue.
-
lookupList
Performs a collection lookup for given typed components.- Type Parameters:
T
- The component type.- Parameters:
type
- The component type.- Returns:
- The list of components. The list may be empty if no components found.
- Throws:
LookupException
- if there is some provisioning related issue.
-
lookupMap
Performs a collection lookup for given typed components.- Type Parameters:
T
- The component type.- Parameters:
type
- The component type.- Returns:
- The map of components. The map may be empty if no components found.
- Throws:
LookupException
- if there is some provisioning related issue.
-