public static final class BoundFieldModule.BoundFieldInfo
extends java.lang.Object
BoundFieldModule
.Modifier and Type | Method and Description |
---|---|
Bind |
getBindAnnotation()
The @
Bind annotation which is present on the field. |
Key<?> |
getBoundKey()
The key this field will bind to.
|
java.lang.reflect.Field |
getField()
The field itself.
|
TypeLiteral<?> |
getFieldType()
The actual type of the field.
|
java.lang.Object |
getValue()
Returns the current value of this field.
|
public java.lang.reflect.Field getField()
public TypeLiteral<?> getFieldType()
For example, @Bind(to = Object.class) Number one = new Integer(1);
will be Number
. @Bind Provider<Number>
will be Provider<Number>
.
public Bind getBindAnnotation()
Bind
annotation which is present on the field.
Note this is not the same as the binding annotation (or qualifier) for getBoundKey()
public Key<?> getBoundKey()
@Bind(to = Object.class) @MyQualifier Number one = new Integer(1);
will be
@MyQualifier Object
.
@Bind @MyQualifier(2) Number one = new Integer(1);
will be
@MyQualifier(2) Number
.
@Bind @MyQualifier Provider<String> three = "default"
will be
@MyQualfier String
public java.lang.Object getValue()