Class AbstractValueParamProvider

    • Constructor Detail

      • AbstractValueParamProvider

        protected AbstractValueParamProvider​(javax.inject.Provider<MultivaluedParameterExtractorProvider> mpep,
                                             Parameter.Source... compatibleSources)
        Initialize the provider.
        Parameters:
        mpep - multivalued map parameter extractor provider.
        compatibleSources - compatible parameter sources.
    • Method Detail

      • get

        protected final MultivaluedParameterExtractor<?> get​(Parameter parameter)
        Get a parameter extractor. The extractor returned from this method will use the default value set on the parameter, in case the parameter is not found in the supplied multivalued parameter map.
        Parameters:
        parameter - parameter supported by the returned extractor.
        Returns:
        extractor supporting the parameter. The returned instance ignores any default values set on the parameter.
      • createValueProvider

        protected abstract java.util.function.Function<ContainerRequest,​?> createValueProvider​(Parameter parameter)
        Create a value provider for the parameter. May return null in case the parameter is not supported by the value provider.
        Parameters:
        parameter - parameter requesting the value provider instance.
        Returns:
        parameter value supplier. Returns null if parameter is not supported.
      • getValueProvider

        public final java.util.function.Function<ContainerRequest,​?> getValueProvider​(Parameter parameter)
        Get an injected value provider for the parameter. May return null in case the parameter is not supported by the value provider.
        Specified by:
        getValueProvider in interface ValueParamProvider
        Parameters:
        parameter - parameter requesting the value provider instance.
        Returns:
        injected parameter value supplier. Returns null if parameter is not supported.