Package io.micronaut.context
Interface BeanResolutionContext.Path
- All Superinterfaces:
AutoCloseable
,Collection<BeanResolutionContext.Segment<?,
,?>> Deque<BeanResolutionContext.Segment<?,
,?>> Iterable<BeanResolutionContext.Segment<?,
,?>> Queue<BeanResolutionContext.Segment<?,
?>>
- Enclosing interface:
- BeanResolutionContext
public static interface BeanResolutionContext.Path
extends Deque<BeanResolutionContext.Segment<?,?>>, AutoCloseable
Represents a path taken to resolve a bean definitions dependencies.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
close()
pushAnnotationResolve
(BeanDefinition beanDefinition, Argument annotationMemberBeanAsArgument) Push resolution of a bean from an annotation.pushBeanCreate
(BeanDefinition<?> declaringType, Argument<?> beanType) Push an unresolved constructor call onto the queue.pushConstructorResolve
(BeanDefinition declaringType, Argument argument) Push an unresolved constructor call onto the queue.pushConstructorResolve
(BeanDefinition declaringType, String methodName, Argument argument, Argument[] arguments) Push an unresolved constructor call onto the queue.pushEventListenerResolve
(BeanDefinition<?> declaringType, Argument<?> eventType) Push resolution of an event listenerpushFieldResolve
(BeanDefinition declaringType, Argument fieldAsArgument) Push an unresolved field onto the queue.pushFieldResolve
(BeanDefinition declaringType, FieldInjectionPoint fieldInjectionPoint) Push an unresolved field onto the queue.pushMethodArgumentResolve
(BeanDefinition declaringType, MethodInjectionPoint methodInjectionPoint, Argument argument) Push an unresolved method call onto the queue.pushMethodArgumentResolve
(BeanDefinition declaringType, String methodName, Argument argument, Argument[] arguments) Push an unresolved method call onto the queue.Converts the path to a circular string.default String
toConsoleCircularString
(boolean ansiSupported) Converts the path to a circular string.default String
toConsoleString
(boolean ansiSupported) Converts the path to a string.Methods inherited from interface java.util.Collection
clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
Methods inherited from interface java.util.Deque
add, addAll, addFirst, addLast, contains, descendingIterator, element, getFirst, getLast, iterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, size
-
Method Details
-
pushBeanCreate
Push an unresolved constructor call onto the queue.- Parameters:
declaringType
- The typebeanType
- The bean type- Returns:
- This path
-
pushConstructorResolve
BeanResolutionContext.Path pushConstructorResolve(BeanDefinition declaringType, String methodName, Argument argument, Argument[] arguments) Push an unresolved constructor call onto the queue.- Parameters:
declaringType
- The typemethodName
- The method nameargument
- The unresolved argumentarguments
- The arguments- Returns:
- This path
-
pushConstructorResolve
Push an unresolved constructor call onto the queue.- Parameters:
declaringType
- The typeargument
- The unresolved argument- Returns:
- This path
-
pushMethodArgumentResolve
BeanResolutionContext.Path pushMethodArgumentResolve(BeanDefinition declaringType, MethodInjectionPoint methodInjectionPoint, Argument argument) Push an unresolved method call onto the queue.- Parameters:
declaringType
- The typemethodInjectionPoint
- The method injection pointargument
- The unresolved argument- Returns:
- This path
-
pushMethodArgumentResolve
BeanResolutionContext.Path pushMethodArgumentResolve(BeanDefinition declaringType, String methodName, Argument argument, Argument[] arguments) Push an unresolved method call onto the queue.- Parameters:
declaringType
- The typemethodName
- The method nameargument
- The unresolved argumentarguments
- The arguments- Returns:
- This path
-
pushEventListenerResolve
BeanResolutionContext.Path pushEventListenerResolve(BeanDefinition<?> declaringType, Argument<?> eventType) Push resolution of an event listener- Parameters:
declaringType
- The declaration typeeventType
- The event type- Returns:
- The path
-
pushFieldResolve
BeanResolutionContext.Path pushFieldResolve(BeanDefinition declaringType, FieldInjectionPoint fieldInjectionPoint) Push an unresolved field onto the queue.- Parameters:
declaringType
- declaring typefieldInjectionPoint
- The field injection point- Returns:
- This path
-
pushFieldResolve
Push an unresolved field onto the queue.- Parameters:
declaringType
- declaring typefieldAsArgument
- The field as argument- Returns:
- This path
-
pushAnnotationResolve
BeanResolutionContext.Path pushAnnotationResolve(BeanDefinition beanDefinition, Argument annotationMemberBeanAsArgument) Push resolution of a bean from an annotation.- Parameters:
beanDefinition
- The bean definitionannotationMemberBeanAsArgument
- The annotation member- Returns:
- The path
-
toCircularString
String toCircularString()Converts the path to a circular string.- Returns:
- The circular string
-
toConsoleCircularString
Converts the path to a circular string.- Parameters:
ansiSupported
- Whether ANSI colour is supported- Returns:
- The circular string
- Since:
- 4.8.0
-
toConsoleString
Converts the path to a string.- Parameters:
ansiSupported
- Whether ANSI colour is supported- Returns:
- The string
- Since:
- 4.8.0
-
currentSegment
Optional<BeanResolutionContext.Segment<?,?>> currentSegment()- Returns:
- The current path segment
-
close
default void close()- Specified by:
close
in interfaceAutoCloseable
-