Class AbstractBeanResolutionContext.FieldSegment<B,T>
java.lang.Object
io.micronaut.context.AbstractBeanResolutionContext.AbstractSegment<B,T>
io.micronaut.context.AbstractBeanResolutionContext.FieldSegment<B,T>
- Type Parameters:
B- The declaring bean typeT- The field type
- All Implemented Interfaces:
BeanResolutionContext.Segment<B,T>, AnnotatedElement, AnnotationMetadataProvider, AnnotationSource, Named, ArgumentCoercible<T>, ArgumentInjectionPoint<B, T>, FieldInjectionPoint<B, T>, InjectionPoint<B>
- Enclosing class:
AbstractBeanResolutionContext
public static final class AbstractBeanResolutionContext.FieldSegment<B,T>
extends AbstractBeanResolutionContext.AbstractSegment<B,T>
implements FieldInjectionPoint<B,T>, ArgumentInjectionPoint<B,T>
A segment that represents a field. It is a
FieldInjectionPoint, so the kind of
injection can be told from the public injection point hierarchy alone; as a field has
no enclosing constructor or method its getOuterInjectionPoint() is null.- Since:
- 1.2.3
- Author:
- Graeme Rocher
-
Field Summary
Fields inherited from class AbstractBeanResolutionContext.AbstractSegment
MEMBER_SEPARATORFields inherited from interface AnnotationSource
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionSupplies the metadata.getField()Resolves the underlying field.@Nullable CallableInjectionPoint<B> getType()toConsoleString(boolean ansiSupported) To a console string.toString()Methods inherited from class AbstractBeanResolutionContext.AbstractSegment
equals, getArgument, getDeclaringType, getDeclaringTypeQualifier, getName, getTypeName, hashCodeMethods inherited from interface AnnotatedElement
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullableMethods inherited from interface AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredMethods inherited from interface ArgumentInjectionPoint
getArgumentMethods inherited from interface FieldInjectionPoint
getName
-
Method Details
-
toString
-
toConsoleString
Description copied from interface:BeanResolutionContext.SegmentTo a console string.- Specified by:
toConsoleStringin interfaceBeanResolutionContext.Segment<B,T> - Parameters:
ansiSupported- Whether ansi is supported- Returns:
- The string
-
getInjectionPoint
- Specified by:
getInjectionPointin interfaceBeanResolutionContext.Segment<B,T> - Returns:
- The inject point
-
getDeclaringBean
- Specified by:
getDeclaringBeanin interfaceInjectionPoint<B>- Returns:
- The bean that declares this injection point
-
getOuterInjectionPoint
- Specified by:
getOuterInjectionPointin interfaceArgumentInjectionPoint<B,T> - Returns:
- The outer injection point (method or constructor), or
nullwhen the injection point is not an argument of a callable, such as a field
-
getType
-
getField
Description copied from interface:FieldInjectionPointResolves the underlying field. Note that this method will cause reflection metadata to be initialized and should be avoided.- Specified by:
getFieldin interfaceFieldInjectionPoint<B,T> - Returns:
- The target field
-
asArgument
- Specified by:
asArgumentin interfaceArgumentCoercible<B>- Specified by:
asArgumentin interfaceArgumentInjectionPoint<B,T> - Returns:
- The argument
-
getAnnotationMetadata
Description copied from interface:AnnotationMetadataProviderSupplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA.- Specified by:
getAnnotationMetadatain interfaceAnnotationMetadataProvider- Returns:
- The
AnnotationMetadata
-
getDeclaringBeanQualifier
- Specified by:
getDeclaringBeanQualifierin interfaceInjectionPoint<B>- Returns:
- The qualifier of the bean that declares this injection point
-