Class BoundFieldModule.BoundFieldInfo

  • Enclosing class:
    BoundFieldModule

    public static final class BoundFieldModule.BoundFieldInfo
    extends java.lang.Object
    Information about a field bound by BoundFieldModule.
    • Method Detail

      • getField

        public java.lang.reflect.Field getField()
        The field itself.
      • getFieldType

        public TypeLiteral<?> getFieldType()
        The actual type of the field.

        For example, @Bind(to = Object.class) Number one = new Integer(1); will be Number. @Bind Provider<Number> will be Provider<Number>.

      • getBindAnnotation

        public Bind getBindAnnotation()
        The @Bind annotation which is present on the field.

        Note this is not the same as the binding annotation (or qualifier) for getBoundKey()

      • getBoundKey

        public Key<?> getBoundKey()
        The key this field will bind to.
        • @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
      • getValue

        public java.lang.Object getValue()
        Returns the current value of this field.