Interface ScopedBindingBuilder<T>

    • Method Detail

      • to

        ScopedBindingBuilder<T> to​(java.lang.Class<? super T> contract)
        Bind a new contract to a service.
        Parameters:
        contract - contract type.
        Returns:
        updated binder.
      • loadedBy

        ScopedBindingBuilder<T> loadedBy​(HK2Loader loader)
        Custom HK2 loader to be used when service class is about to be loaded.
        Parameters:
        loader - custom service loader.
        Returns:
        updated binder.
      • withMetadata

        ScopedBindingBuilder<T> withMetadata​(java.lang.String key,
                                             java.lang.String value)
        Add binding descriptor metadata. The metadata can be later used to e.g. filter binding descriptors. If this is for Factory descriptors the metadata will be placed on both the Factory as a service and on the Factories Factory.provide() method
        Parameters:
        key - metadata key.
        value - metadata value.
        Returns:
        updated binder.
      • withMetadata

        ScopedBindingBuilder<T> withMetadata​(java.lang.String key,
                                             java.util.List<java.lang.String> values)
        Add binding descriptor metadata. The metadata can be later used to e.g. filter binding descriptors. If this is for Factory descriptors the metadata will be placed on both the Factory as a service and on the Factories Factory.provide() method
        Parameters:
        key - metadata key.
        values - metadata values.
        Returns:
        updated binder.
      • qualifiedBy

        ScopedBindingBuilder<T> qualifiedBy​(java.lang.annotation.Annotation annotation)
        Add a binging qualifier annotation. If this is being used with a Factory then both the Factory Service and the Factory.provide() method will get the qualifier
        Parameters:
        annotation - qualifier annotation.
        Returns:
        updated binder.
      • named

        ScopedNamedBindingBuilder<T> named​(java.lang.String name)
        Name the binding.
        Parameters:
        name - new name value.
        Returns:
        updated binding.
      • ranked

        void ranked​(int rank)
        Rank the binding. The higher rank, the more prominent position in an injected iterable provider for a contract.
        Parameters:
        rank - binding rank to be used to resolve ordering in case of multiple services are bound to the same contract.
      • proxy

        ScopedBindingBuilder<T> proxy​(boolean proxiable)
        Set proxy flag on the binding.
        Parameters:
        proxiable - flag to determine if the binding should be proxiable.
      • proxyForSameScope

        ScopedBindingBuilder<T> proxyForSameScope​(boolean proxyForSameScope)
        Set proxyForSameScope flag on the binding
        Parameters:
        proxyForSameScope - flag to determine if the binding should be proxiable within the same scope
        Returns:
        A further refined builder
      • analyzeWith

        ScopedBindingBuilder<T> analyzeWith​(java.lang.String analyzer)
        Set the name of the ClassAnalyzer on the binding.
        Parameters:
        analyzer - The name of the analyzer that should be used. May be null to indicate the default class analzyer