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