|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.hk2.utilities.binding.BindingBuilderFactory
public class BindingBuilderFactory
HK2 injection binding utility methods.
| Constructor Summary | |
|---|---|
BindingBuilderFactory()
|
|
| Method Summary | ||
|---|---|---|
static void |
addBinding(BindingBuilder<?> builder,
DynamicConfiguration configuration)
Add a binding represented by the binding builder to the HK2 dynamic configuration. |
|
static void |
addBinding(BindingBuilder<?> builder,
DynamicConfiguration configuration,
HK2Loader defaultLoader)
Add a binding represented by the binding builder to the HK2 dynamic configuration. |
|
static
|
newBinder(java.lang.Class<T> serviceType)
Get a new class-based service binding builder. |
|
static
|
newBinder(T service)
Get a new instance-based service binding builder. |
|
static
|
newFactoryBinder(java.lang.Class<? extends Factory<T>> factoryType)
Get a new factory class-based service binding builder. |
|
static
|
newFactoryBinder(java.lang.Class<? extends Factory<T>> factoryType,
java.lang.Class<? extends java.lang.annotation.Annotation> factoryScope)
Get a new factory class-based service binding builder. |
|
static
|
newFactoryBinder(Factory<T> factory)
Get a new factory instance-based service binding builder. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BindingBuilderFactory()
| Method Detail |
|---|
public static void addBinding(BindingBuilder<?> builder,
DynamicConfiguration configuration)
builder - binding builder.configuration - HK2 dynamic configuration.
public static void addBinding(BindingBuilder<?> builder,
DynamicConfiguration configuration,
HK2Loader defaultLoader)
builder - binding builder.configuration - HK2 dynamic configuration.defaultLoader - default HK2 service loader that should be used to load the service class
in case a custom loader has not been set.
public static <T> ServiceBindingBuilder<T> newFactoryBinder(java.lang.Class<? extends Factory<T>> factoryType,
java.lang.Class<? extends java.lang.annotation.Annotation> factoryScope)
T - service type.factoryType - service factory class.factoryScope - factory scope.
public static <T> ServiceBindingBuilder<T> newFactoryBinder(java.lang.Class<? extends Factory<T>> factoryType)
per-lookup scope.
T - service type.factoryType - service factory class.
public static <T> ServiceBindingBuilder<T> newFactoryBinder(Factory<T> factory)
T - service type.factory - service instance.
public static <T> ServiceBindingBuilder<T> newBinder(java.lang.Class<T> serviceType)
T - service type.serviceType - service class.
public static <T> ScopedBindingBuilder<T> newBinder(T service)
singleton-scoped.
Does NOT bind the service type itself as a contract type.
T - service type.service - service instance.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||