Class AbstractBeanResolutionContext.MethodArgumentSegment
java.lang.Object
io.micronaut.context.AbstractBeanResolutionContext.AbstractSegment<Object,Object>
io.micronaut.context.AbstractBeanResolutionContext.MethodSegment<Object,Object>
io.micronaut.context.AbstractBeanResolutionContext.MethodArgumentSegment
- All Implemented Interfaces:
BeanResolutionContext.Segment<Object,Object>, AnnotationMetadataProvider, AnnotationSource, Named, ArgumentCoercible<Object>, ArgumentInjectionPoint<Object, Object>, CallableInjectionPoint<Object>, InjectionPoint<Object>
- Enclosing class:
AbstractBeanResolutionContext
public static final class AbstractBeanResolutionContext.MethodArgumentSegment
extends AbstractBeanResolutionContext.MethodSegment<Object,Object>
implements ArgumentInjectionPoint<Object,Object>
A segment that represents a method argument. Its
getOuterInjectionPoint() is
the method the argument belongs to: for an injected method that is the bean's
MethodInjectionPoint, and for a factory method argument it is the bean's
ConstructorInjectionPoint, as for a constructor argument.- Since:
- 1.2.3
- Author:
- Graeme Rocher
-
Field Summary
Fields inherited from class AbstractBeanResolutionContext.AbstractSegment
MEMBER_SEPARATORFields inherited from interface AnnotationSource
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionMethodArgumentSegment(BeanDefinition<Object> declaringType, @Nullable Qualifier<Object> qualifier, String methodName, Argument<Object> argument, Argument<Object>[] arguments, @Nullable CallableInjectionPoint<Object> outer) -
Method Summary
Modifier and TypeMethodDescriptionThe method this argument belongs to.toConsoleString(boolean ansiSupported) To a console string.toString()Methods inherited from class AbstractBeanResolutionContext.MethodSegment
getAnnotationMetadata, getArguments, getDeclaringBean, getDeclaringBeanQualifier, getInjectionPointMethods inherited from class AbstractBeanResolutionContext.AbstractSegment
equals, getArgument, getDeclaringType, getDeclaringTypeQualifier, getName, getTypeName, hashCodeMethods inherited from interface AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, 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
asArgument, getArgumentMethods inherited from interface InjectionPoint
getDeclaringBean, getDeclaringBeanQualifier
-
Constructor Details
-
MethodArgumentSegment
public MethodArgumentSegment(BeanDefinition<Object> declaringType, @Nullable Qualifier<Object> qualifier, String methodName, Argument<Object> argument, Argument<Object>[] arguments, @Nullable CallableInjectionPoint<Object> outer) - Parameters:
declaringType- The declaring typequalifier- The qualifiermethodName- The method nameargument- The argumentarguments- The argumentsouter- The method the argument belongs to, ornullto find it among the declaring type's methods on demand
-
-
Method Details
-
getOuterInjectionPoint
The method this argument belongs to. When the segment was pushed without aMethodInjectionPoint, the declaring type's factory method and injected methods are searched for the method by name and arguments; when none matches (a setter that is not an injected method, for example) this segment, which is itself theCallableInjectionPointof the method, is answered.- Specified by:
getOuterInjectionPointin interfaceArgumentInjectionPoint<Object,Object> - Returns:
- The method the argument belongs to, never
null
-
toString
- Overrides:
toStringin classAbstractBeanResolutionContext.MethodSegment<Object,Object>
-
toConsoleString
Description copied from interface:BeanResolutionContext.SegmentTo a console string.- Specified by:
toConsoleStringin interfaceBeanResolutionContext.Segment<Object,Object> - Overrides:
toConsoleStringin classAbstractBeanResolutionContext.MethodSegment<Object,Object> - Parameters:
ansiSupported- Whether ansi is supported- Returns:
- The string
-