T - service type.public interface ScopedBindingBuilder<T> extends BindingBuilder<T>
| Modifier and Type | Method and Description |
|---|---|
ScopedBindingBuilder<T> |
analyzeWith(java.lang.String analyzer)
Set the name of the
ClassAnalyzer on the binding. |
ScopedBindingBuilder<T> |
loadedBy(HK2Loader loader)
Custom HK2 loader to be used when service class is about to be loaded.
|
ScopedNamedBindingBuilder<T> |
named(java.lang.String name)
Name the binding. |
ScopedBindingBuilder<T> |
proxy(boolean proxiable)
Set proxy flag on the binding.
|
ScopedBindingBuilder<T> |
qualifiedBy(java.lang.annotation.Annotation annotation)
Add a binging qualifier annotation.
|
void |
ranked(int rank)
Rank the binding.
|
ScopedBindingBuilder<T> |
to(java.lang.Class<? super T> contract)
Bind a new contract to a service.
|
ScopedBindingBuilder<T> |
to(TypeLiteral<?> contract)
Bind a new contract to a service.
|
ScopedBindingBuilder<T> |
withMetadata(java.lang.String key,
java.util.List<java.lang.String> values)
Add binding descriptor metadata.
|
ScopedBindingBuilder<T> |
withMetadata(java.lang.String key,
java.lang.String value)
Add binding descriptor metadata.
|
ScopedBindingBuilder<T> to(java.lang.Class<? super T> contract)
contract - contract type.ScopedBindingBuilder<T> to(TypeLiteral<?> contract)
contract - contract type.ScopedBindingBuilder<T> loadedBy(HK2Loader loader)
loader - custom service loader.ScopedBindingBuilder<T> withMetadata(java.lang.String key, java.lang.String value)
filter binding
descriptors.key - metadata key.value - metadata value.ScopedBindingBuilder<T> withMetadata(java.lang.String key, java.util.List<java.lang.String> values)
filter binding
descriptors.key - metadata key.values - metadata values.ScopedBindingBuilder<T> qualifiedBy(java.lang.annotation.Annotation annotation)
annotation - qualifier annotation.ScopedNamedBindingBuilder<T> named(java.lang.String name)
Name the binding.name - new name value.void ranked(int rank)
iterable provider for a contract.rank - binding rank to be used to resolve ordering in case of multiple services
are bound to the same contract.ScopedBindingBuilder<T> proxy(boolean proxiable)
proxiable - flag to determine if the binding should be proxiable.ScopedBindingBuilder<T> analyzeWith(java.lang.String analyzer)
ClassAnalyzer on the binding.analyzer - The name of the analyzer that should be used. May be null
to indicate the default class analzyerCopyright © 2013 Oracle Corporation. All Rights Reserved.