Interface FieldInjectionPoint<B,​T>

  • Type Parameters:
    B - The bean type that declares the injection point
    T - The field component type
    All Superinterfaces:
    io.micronaut.core.annotation.AnnotatedElement, io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource, io.micronaut.core.type.ArgumentCoercible<T>, InjectionPoint<B>, io.micronaut.core.naming.Named

    public interface FieldInjectionPoint<B,​T>
    extends InjectionPoint<B>, io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotatedElement, io.micronaut.core.type.ArgumentCoercible<T>
    Defines an injection point for a field.
    Since:
    1.0
    • Field Summary

      • Fields inherited from interface io.micronaut.core.annotation.AnnotationSource

        EMPTY
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.reflect.Field getField()
      Resolves the underlying field.
      java.lang.String getName()  
      java.lang.Class<T> getType()  
      void set​(T instance, java.lang.Object object)
      Sets the value of the field.
      • Methods inherited from interface io.micronaut.core.annotation.AnnotatedElement

        isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable
      • Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider

        findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
      • Methods inherited from interface io.micronaut.core.annotation.AnnotationSource

        getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclared
      • Methods inherited from interface io.micronaut.core.type.ArgumentCoercible

        asArgument
    • Method Detail

      • getName

        java.lang.String getName()
        Specified by:
        getName in interface io.micronaut.core.naming.Named
        Returns:
        The name of the field
      • getField

        java.lang.reflect.Field getField()
        Resolves the underlying field. Note that this method will cause reflection metadata to be initialized and should be avoided.
        Returns:
        The target field
      • getType

        java.lang.Class<T> getType()
        Returns:
        The required component type
      • set

        void set​(T instance,
                 java.lang.Object object)
        Sets the value of the field. Note that this method will cause reflection metadata to be initialized and should be avoided.
        Parameters:
        instance - the instance
        object - The the field on the target object