Class DefaultLookup

java.lang.Object
org.apache.maven.internal.impl.DefaultLookup
All Implemented Interfaces:
Service, Lookup

@Named @Singleton public class DefaultLookup extends Object implements Lookup
  • Constructor Details

    • DefaultLookup

      @Inject public DefaultLookup(org.codehaus.plexus.PlexusContainer container)
  • Method Details

    • lookup

      public <T> T lookup(Class<T> type)
      Description copied from interface: Lookup
      Performs a lookup for given typed component.
      Specified by:
      lookup in interface Lookup
      Type Parameters:
      T - The component type.
      Parameters:
      type - The component type.
      Returns:
      The component.
    • lookup

      public <T> T lookup(Class<T> type, String name)
      Description copied from interface: Lookup
      Performs a lookup for given typed component.
      Specified by:
      lookup in interface Lookup
      Type Parameters:
      T - The component type.
      Parameters:
      type - The component type.
      name - The component name.
      Returns:
      The component.
    • lookupOptional

      public <T> Optional<T> lookupOptional(Class<T> type)
      Description copied from interface: Lookup
      Performs a lookup for optional typed component.
      Specified by:
      lookupOptional in interface Lookup
      Type Parameters:
      T - The component type.
      Parameters:
      type - The component type.
      Returns:
      Optional carrying component or empty optional if no such component.
    • lookupOptional

      public <T> Optional<T> lookupOptional(Class<T> type, String name)
      Description copied from interface: Lookup
      Performs a lookup for optional typed component.
      Specified by:
      lookupOptional in interface Lookup
      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.
    • lookupList

      public <T> List<T> lookupList(Class<T> type)
      Description copied from interface: Lookup
      Performs a collection lookup for given typed components.
      Specified by:
      lookupList in interface Lookup
      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.
    • lookupMap

      public <T> Map<String,T> lookupMap(Class<T> type)
      Description copied from interface: Lookup
      Performs a collection lookup for given typed components.
      Specified by:
      lookupMap in interface Lookup
      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.