Class DeferredInstanceProvider<T>

    • Method Detail

      • get

        public T get()
        Description copied from interface: InstanceProvider
        Retrieve the first available instance
        Specified by:
        get in interface InstanceProvider<T>
        Specified by:
        get in interface jakarta.inject.Provider<T>
        Specified by:
        get in interface java.util.function.Supplier<T>
        Returns:
        the first available instance
      • hasMultiple

        public boolean hasMultiple()
        Description copied from interface: InstanceProvider
        Determines if there is more than one available implementation for the required type and qualifiers
        Specified by:
        hasMultiple in interface InstanceProvider<T>
        Returns:
        true if there are multiple providers, false otherwise
      • isUnsatisfied

        public boolean isUnsatisfied()
        Description copied from interface: InstanceProvider
        Determines if there is no available implementation for the required type and qualifiers. If this method returns true, then calling InstanceProvider.get() will raise a RuntimeException
        Specified by:
        isUnsatisfied in interface InstanceProvider<T>
        Returns:
        true if there is no provider, false otherwise
      • iterator

        public java.util.Iterator<T> iterator()
        Description copied from interface: InstanceProvider
        When a service has multiple providers (which can be determined by calling InstanceProvider.isAmbiguous()) this iterator enumerates each of the available providers
        Specified by:
        iterator in interface InstanceProvider<T>
        Specified by:
        iterator in interface java.lang.Iterable<T>
        Returns:
        The set of available providers
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object