Class InternalFactory.Instance<T>
- java.lang.Object
-
- org.elasticsearch.common.inject.internal.InternalFactory.Instance<T>
-
- All Implemented Interfaces:
InternalFactory<T>
- Enclosing interface:
- InternalFactory<T>
public static class InternalFactory.Instance<T> extends java.lang.Object implements InternalFactory<T>
ES: An factory that returns a pre created instance.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.inject.internal.InternalFactory
InternalFactory.Instance<T>
-
-
Method Summary
Modifier and Type Method Description T
get(Errors errors, InternalContext context, Dependency<?> dependency)
Creates an object to be injected.java.lang.String
toString()
-
-
-
Constructor Detail
-
Instance
public Instance(T object)
-
-
Method Detail
-
get
public T get(Errors errors, InternalContext context, Dependency<?> dependency) throws ErrorsException
Description copied from interface:InternalFactory
Creates an object to be injected.- Specified by:
get
in interfaceInternalFactory<T>
context
- of this injection- Returns:
- instance to be injected
- Throws:
ErrorsException
- if a value cannot be provided
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-