Class ThrowingProviderBinder.SecondaryBinder<P extends CheckedProvider,T>
java.lang.Object
com.google.inject.throwingproviders.ThrowingProviderBinder.SecondaryBinder<P,T>
- Enclosing class:
- ThrowingProviderBinder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Annotation
private Class<? extends Annotation>
private boolean
private final boolean
private final Type
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionannotatedWith
(Annotation annotation) annotatedWith
(Class<? extends Annotation> annotationType) private boolean
createResultProvider
(Key<? extends CheckedProvider<?>> targetKey, Provider<? extends CheckedProvider<?>> targetProvider) getExceptionType
(Class<P> interfaceType) Returns the exception type declared to be thrown by the get method ofinterfaceType
.getKey()
providing
(TypeLiteral<? extends T> cxtorLiteral) scopeExceptions
(boolean scopeExceptions) Determines if exceptions should be scoped.private ScopedBindingBuilder
toInternal
(Key<? extends CheckedProvider<?>> targetKey) (package private) ScopedBindingBuilder
toProviderMethod
(CheckedProviderMethod<?> target)
-
Field Details
-
interfaceType
-
valueType
-
exceptionTypes
-
valid
private final boolean valid -
annotationType
-
annotation
-
interfaceKey
-
scopeExceptions
private boolean scopeExceptions
-
-
Constructor Details
-
SecondaryBinder
-
-
Method Details
-
getExceptionTypes
-
getKey
-
annotatedWith
public ThrowingProviderBinder.SecondaryBinder<P,T> annotatedWith(Class<? extends Annotation> annotationType) -
annotatedWith
-
scopeExceptions
Determines if exceptions should be scoped. By default exceptions are scoped.- Parameters:
scopeExceptions
- whether exceptions should be scoped.- Since:
- 4.0
-
to
-
to
-
providing
- Since:
- 4.0
-
providing
- Since:
- 4.0
-
toProviderMethod
-
to
-
toInternal
-
createResultProvider
private ProviderWithDependencies<ThrowingProviderBinder.Result> createResultProvider(Key<? extends CheckedProvider<?>> targetKey, Provider<? extends CheckedProvider<?>> targetProvider) -
getExceptionType
Returns the exception type declared to be thrown by the get method ofinterfaceType
. -
checkInterface
private boolean checkInterface() -
createKey
-