class Parameter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.annotation.Annotation |
bindingAnnotation |
private boolean |
isAssisted |
private boolean |
isProvider |
private Provider<? extends java.lang.Object> |
provider |
private java.lang.reflect.Type |
type |
Constructor and Description |
---|
Parameter(java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations) |
Modifier and Type | Method and Description |
---|---|
Key<?> |
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 java.lang.annotation.Annotation |
getBindingAnnotation(java.lang.annotation.Annotation[] annotations)
Returns the unique binding annotation from the specified list, or
null if there are none. |
private Key<?> |
getBindingForType(java.lang.reflect.Type type) |
(package private) Key<?> |
getPrimaryBindingKey() |
private java.lang.reflect.Type |
getProvidedType(java.lang.reflect.Type type) |
java.lang.reflect.Type |
getType() |
java.lang.Object |
getValue(Injector injector)
Returns the Guice
Key for this parameter. |
private boolean |
hasAssistedAnnotation(java.lang.annotation.Annotation[] annotations) |
boolean |
isBound(Injector injector) |
private boolean |
isBound(Injector injector,
Key<?> key) |
boolean |
isProvidedByFactory() |
private boolean |
isProvider(java.lang.reflect.Type type) |
java.lang.String |
toString() |
private final java.lang.reflect.Type type
private final boolean isAssisted
private final java.lang.annotation.Annotation bindingAnnotation
private final boolean isProvider
private volatile Provider<? extends java.lang.Object> provider
public Parameter(java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations)
public boolean isProvidedByFactory()
public java.lang.reflect.Type getType()
public java.lang.String toString()
toString
in class java.lang.Object
private boolean hasAssistedAnnotation(java.lang.annotation.Annotation[] annotations)
public java.lang.Object getValue(Injector injector)
Key
for this parameter.public boolean isBound(Injector injector)
public Key<?> fixAnnotations(Key<?> key)
Key<?> getPrimaryBindingKey()
private java.lang.reflect.Type getProvidedType(java.lang.reflect.Type type)
private boolean isProvider(java.lang.reflect.Type type)
private Key<?> getBindingForType(java.lang.reflect.Type type)
private java.lang.annotation.Annotation getBindingAnnotation(java.lang.annotation.Annotation[] annotations)
null
if there are none.java.lang.IllegalStateException
- if multiple binding annotations exist.