public static final class BoundFieldModule.BoundFieldInfo extends 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.
|
Field |
getField()
The field itself.
|
TypeLiteral<?> |
getFieldType()
The actual type of the field.
|
Object |
getValue()
Returns the current value of this field.
|
public 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 Object getValue()
Copyright © 2006–2018 Google, Inc.. All rights reserved.