|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.common.inject.Injectors
public class Injectors
Constructor Summary | |
---|---|
Injectors()
|
Method Summary | ||
---|---|---|
static void |
close(org.elasticsearch.common.inject.Injector injector)
|
|
static org.elasticsearch.common.inject.Binding<?> |
getBinding(org.elasticsearch.common.inject.Injector injector,
org.elasticsearch.common.inject.Key<?> key)
Returns the binding for the given key or null if there is no such binding |
|
static java.util.Set<org.elasticsearch.common.inject.Binding<?>> |
getBindingsOf(org.elasticsearch.common.inject.Injector injector,
java.lang.Class<?> baseClass)
Returns a collection of all bindings of the given base type |
|
static java.util.Set<org.elasticsearch.common.inject.Binding<?>> |
getBindingsOf(org.elasticsearch.common.inject.Injector injector,
org.elasticsearch.common.inject.matcher.Matcher<java.lang.Class> matcher)
Returns a collection of all of the bindings matching the given matcher |
|
static
|
getInstance(org.elasticsearch.common.inject.Injector injector,
java.lang.Class<T> type,
java.lang.String name)
Returns an instance of the given type with the Named
annotation value. |
|
static
|
getInstancesOf(org.elasticsearch.common.inject.Injector injector,
java.lang.Class<T> baseClass)
Returns a collection of all instances of the given base type |
|
static
|
getInstancesOf(org.elasticsearch.common.inject.Injector injector,
org.elasticsearch.common.inject.matcher.Matcher<java.lang.Class> matcher)
Returns a collection of all instances matching the given matcher |
|
static
|
getKeyType(org.elasticsearch.common.inject.Key<?> key)
Returns the key type of the given key |
|
static
|
getProvidersOf(org.elasticsearch.common.inject.Injector injector,
java.lang.Class<T> baseClass)
Returns a collection of all providers of the given base type |
|
static
|
getProvidersOf(org.elasticsearch.common.inject.Injector injector,
org.elasticsearch.common.inject.matcher.Matcher<java.lang.Class> matcher)
Returns a collection of all of the providers matching the given matcher |
|
static boolean |
hasBinding(org.elasticsearch.common.inject.Injector injector,
java.lang.Class<?> baseClass)
Returns true if a binding exists for the given base class |
|
static boolean |
hasBinding(org.elasticsearch.common.inject.Injector injector,
org.elasticsearch.common.inject.Key<?> key)
Returns true if a binding exists for the given key |
|
static boolean |
hasBinding(org.elasticsearch.common.inject.Injector injector,
org.elasticsearch.common.inject.matcher.Matcher<java.lang.Class> matcher)
Returns true if a binding exists for the given matcher |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Injectors()
Method Detail |
---|
public static <T> T getInstance(org.elasticsearch.common.inject.Injector injector, java.lang.Class<T> type, java.lang.String name)
Named
annotation value.
This method allows you to switch this code
injector.getInstance(Key.get(type, Names.named(name)));
to the more concise
Injectors.getInstance(injector, type, name);
public static <T> java.util.Set<T> getInstancesOf(org.elasticsearch.common.inject.Injector injector, java.lang.Class<T> baseClass)
T
- the base typebaseClass
- the base type of objects required
public static <T> java.util.Set<T> getInstancesOf(org.elasticsearch.common.inject.Injector injector, org.elasticsearch.common.inject.matcher.Matcher<java.lang.Class> matcher)
matcher
- matches the types to return instances
public static <T> java.util.Set<org.elasticsearch.common.inject.Provider<T>> getProvidersOf(org.elasticsearch.common.inject.Injector injector, org.elasticsearch.common.inject.matcher.Matcher<java.lang.Class> matcher)
matcher
- matches the types to return instances
public static <T> java.util.Set<org.elasticsearch.common.inject.Provider<T>> getProvidersOf(org.elasticsearch.common.inject.Injector injector, java.lang.Class<T> baseClass)
T
- the base typebaseClass
- the base type of objects required
public static boolean hasBinding(org.elasticsearch.common.inject.Injector injector, org.elasticsearch.common.inject.matcher.Matcher<java.lang.Class> matcher)
public static boolean hasBinding(org.elasticsearch.common.inject.Injector injector, java.lang.Class<?> baseClass)
public static boolean hasBinding(org.elasticsearch.common.inject.Injector injector, org.elasticsearch.common.inject.Key<?> key)
public static org.elasticsearch.common.inject.Binding<?> getBinding(org.elasticsearch.common.inject.Injector injector, org.elasticsearch.common.inject.Key<?> key)
public static java.util.Set<org.elasticsearch.common.inject.Binding<?>> getBindingsOf(org.elasticsearch.common.inject.Injector injector, org.elasticsearch.common.inject.matcher.Matcher<java.lang.Class> matcher)
matcher
- matches the types to return instances
public static java.util.Set<org.elasticsearch.common.inject.Binding<?>> getBindingsOf(org.elasticsearch.common.inject.Injector injector, java.lang.Class<?> baseClass)
baseClass
- the base type of objects required
public static <T> java.lang.Class<?> getKeyType(org.elasticsearch.common.inject.Key<?> key)
public static void close(org.elasticsearch.common.inject.Injector injector)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |