Interface TypeLocator

  • All Known Implementing Classes:
    TypeReflections

    public interface TypeLocator
    Service for selecting TypeReflection instances
    Since:
    19.3.0
    Author:
    cdivilly
  • <section role="region">
    • Method Detail

      • forType

        default <T> TypeReflection<T> forType​(java.lang.Class<T> type)
                                       throws java.lang.IllegalArgumentException
        Find match for the specified type
        Type Parameters:
        T - The type of the service
        Parameters:
        type - The type to search for
        Returns:
        TypeReflection instance
        Throws:
        java.lang.IllegalArgumentException - if the specified type is not part of this set
      • get

        default <T> TypeReflection<T> get​(java.lang.Class<T> type)
                                   throws java.lang.IllegalArgumentException
        Synonym for forType(Class)
        Type Parameters:
        T - The type of the service
        Parameters:
        type - The type to search for
        Returns:
        TypeReflection instance
        Throws:
        java.lang.IllegalArgumentException - if the specified type is not part of this set
      • selectType

        <T> java.util.Set<TypeReflection<? extends T>> selectType​(TypeQualifier<T> service)
        Choose the TypeReflections that matches the specified criteria
        Type Parameters:
        T - The type of the service to find
        Parameters:
        service - The qualifiers on the service
        Returns:
        Set of matching TypeReflection instances
    </section>