Package com.google.inject.assistedinject
Class Parameter
java.lang.Object
com.google.inject.assistedinject.Parameter
Models a method or constructor parameter.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Annotation
private final boolean
private final boolean
private final Type
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionKey
<?> fixAnnotations
(Key<?> key) Replace annotation instances with annotation types, this is only appropriate for testing if a key is bound and not for injecting.private Annotation
getBindingAnnotation
(Annotation[] annotations) Returns the unique binding annotation from the specified list, ornull
if there are none.private Key
<?> getBindingForType
(Type type) (package private) Key
<?> private Type
getProvidedType
(Type type) getType()
Returns the GuiceKey
for this parameter.private boolean
hasAssistedAnnotation
(Annotation[] annotations) boolean
private boolean
boolean
private boolean
isProvider
(Type type) toString()
-
Field Details
-
type
-
isAssisted
private final boolean isAssisted -
bindingAnnotation
-
isProvider
private final boolean isProvider -
provider
-
-
Constructor Details
-
Parameter
-
-
Method Details
-
isProvidedByFactory
public boolean isProvidedByFactory() -
getType
-
toString
-
hasAssistedAnnotation
-
getValue
Returns the GuiceKey
for this parameter. -
isBound
-
isBound
-
fixAnnotations
Replace annotation instances with annotation types, this is only appropriate for testing if a key is bound and not for injecting.See Guice bug 125, https://github.com/google/guice/issues/125
-
getPrimaryBindingKey
Key<?> getPrimaryBindingKey() -
getProvidedType
-
isProvider
-
getBindingForType
-
getBindingAnnotation
Returns the unique binding annotation from the specified list, ornull
if there are none.- Throws:
IllegalStateException
- if multiple binding annotations exist.
-