Package org.elasticsearch.common.inject
Interface PrivateBinder
-
- All Superinterfaces:
Binder
public interface PrivateBinder extends Binder
Returns a binder whose configuration information is hidden from its environment by default. SeePrivateModulefor details.- Since:
- 2.0
-
-
Method Summary
Modifier and Type Method Description AnnotatedElementBuilderexpose(java.lang.Class<?> type)Makes a binding fortypeavailable to the enclosing environment.voidexpose(Key<?> key)Makes the binding forkeyavailable to the enclosing environmentAnnotatedElementBuilderexpose(TypeLiteral<?> type)Makes a binding fortypeavailable to the enclosing environment.PrivateBinderskipSources(java.lang.Class... classesToSkip)Returns a binder that skipsclassesToSkipwhen identify the calling code.PrivateBinderwithSource(java.lang.Object source)Returns a binder that usessourceas the reference location for configuration errors.-
Methods inherited from interface org.elasticsearch.common.inject.Binder
addError, addError, addError, bind, bind, bind, bindConstant, bindListener, bindScope, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, newPrivateBinder, requestInjection, requestInjection, requestStaticInjection
-
-
-
-
Method Detail
-
expose
void expose(Key<?> key)
Makes the binding forkeyavailable to the enclosing environment
-
expose
AnnotatedElementBuilder expose(java.lang.Class<?> type)
Makes a binding fortypeavailable to the enclosing environment. UseannotatedWith()to exposetypewith a binding annotation.
-
expose
AnnotatedElementBuilder expose(TypeLiteral<?> type)
Makes a binding fortypeavailable to the enclosing environment. UseannotatedWith()to exposetypewith a binding annotation.
-
withSource
PrivateBinder withSource(java.lang.Object source)
Description copied from interface:BinderReturns a binder that usessourceas the reference location for configuration errors. This is typically aStackTraceElementfor.javasource but it could any binding source, such as the path to a.propertiesfile.- Specified by:
withSourcein interfaceBinder- Parameters:
source- any object representing the source location and has a concisetoString()value- Returns:
- a binder that shares its configuration with this binder
-
skipSources
PrivateBinder skipSources(java.lang.Class... classesToSkip)
Description copied from interface:BinderReturns a binder that skipsclassesToSkipwhen identify the calling code. The caller'sStackTraceElementis used to locate the source of configuration errors.- Specified by:
skipSourcesin interfaceBinder- Parameters:
classesToSkip- library classes that create bindings on behalf of their clients.- Returns:
- a binder that shares its configuration with this binder.
-
-