Class CheckedProviderMethod<T>
java.lang.Object
com.google.inject.throwingproviders.CheckedProviderMethod<T>
- All Implemented Interfaces:
HasDependencies
,CheckedProvider<T>
A provider that invokes a method and returns its result.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Class
<? extends CheckedProvider> private final com.google.common.collect.ImmutableSet
<Dependency<?>> private final List
<TypeLiteral<?>> private final boolean
private final Object
private final Method
private final Class
<? extends Annotation> private final boolean
-
Constructor Summary
ConstructorsConstructorDescriptionCheckedProviderMethod
(Key<T> key, Method method, Object instance, com.google.common.collect.ImmutableSet<Dependency<?>> dependencies, List<Provider<?>> parameterProviders, Class<? extends Annotation> scopeAnnotation, Class<? extends CheckedProvider> checkedProvider, List<TypeLiteral<?>> exceptionTypes, boolean scopeExceptions) -
Method Summary
Modifier and TypeMethodDescription(package private) void
get()
Set
<Dependency<?>> Returns the known dependencies for this type.toString()
-
Field Details
-
key
-
scopeAnnotation
-
instance
-
method
-
dependencies
-
parameterProviders
-
exposed
private final boolean exposed -
checkedProvider
-
exceptionTypes
-
scopeExceptions
private final boolean scopeExceptions
-
-
Constructor Details
-
CheckedProviderMethod
CheckedProviderMethod(Key<T> key, Method method, Object instance, com.google.common.collect.ImmutableSet<Dependency<?>> dependencies, List<Provider<?>> parameterProviders, Class<? extends Annotation> scopeAnnotation, Class<? extends CheckedProvider> checkedProvider, List<TypeLiteral<?>> exceptionTypes, boolean scopeExceptions)
-
-
Method Details
-
configure
-
get
- Specified by:
get
in interfaceCheckedProvider<T>
- Throws:
Exception
-
getDependencies
Description copied from interface:HasDependencies
Returns the known dependencies for this type. If this has dependencies whose values are not known statically, a dependency for theInjector
will be included in the returned set.- Specified by:
getDependencies
in interfaceHasDependencies
- Returns:
- a possibly empty set
-
toString
-