Class ProtoLookup

java.lang.Object
org.apache.maven.cling.invoker.ProtoLookup
All Implemented Interfaces:
Service, Lookup

public class ProtoLookup extends Object implements Lookup
Proto-Lookup offer ways to provide early components to invoker.
  • 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.
    • builder

      public static ProtoLookup.Builder builder()