Package io.micronaut.inject
Interface FieldInjectionPoint<B,T>
-
- Type Parameters:
B- The bean type that declares the injection pointT- 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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.reflect.FieldgetField()Resolves the underlying field.java.lang.StringgetName()java.lang.Class<T>getType()voidset(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.inject.InjectionPoint
getDeclaringBean, requiresReflection
-
-
-
-
Method Detail
-
getName
java.lang.String getName()
- Specified by:
getNamein interfaceio.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 instanceobject- The the field on the target object
-
-