public class InjectionContext extends AbstractChain<org.apache.commons.lang3.tuple.Pair<Satisfaction,InjectionPoint>>
InjectionContext represents the current path through the dependency graph to
the desire being resolved by
BindingFunction.bind(InjectionContext, DesireChain). The InjectionContext
is most significantly represented as a list of satisfactions and the
associated injection point attributes. This list represents the "type path"
from the root node in the graph to the previously resolved satisfaction.
length, previous, tailValuemodCount| Modifier and Type | Method and Description |
|---|---|
static InjectionContext |
extend(InjectionContext prefix,
Satisfaction satisfaction,
InjectionPoint ip)
Extend or create an injection context.
|
InjectionContext |
extend(Satisfaction satisfaction,
InjectionPoint ip)
Create a new context that is updated to have the satisfaction and attribute pushed to the
end of its type path.
|
InjectionContext |
getLeading()
Get everything except the last element of this context.
|
static InjectionContext |
singleton(Satisfaction satisfaction)
Construct a singleton injection context with no attributes.
|
static InjectionContext |
singleton(Satisfaction satisfaction,
InjectionPoint ip)
Construct a singleton injection context.
|
equals, get, getTailValue, hashCode, iterator, reverse, reverseIterator, sizeadd, add, addAll, clear, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayparallelStream, removeIf, streampublic static InjectionContext singleton(Satisfaction satisfaction, InjectionPoint ip)
satisfaction - The satisfaction.ip - The injection point.public static InjectionContext extend(@Nullable InjectionContext prefix, Satisfaction satisfaction, InjectionPoint ip)
prefix - The initial context.satisfaction - The satisfaction.ip - The injection point.public static InjectionContext singleton(Satisfaction satisfaction)
satisfaction - The satisfaction.public InjectionContext extend(Satisfaction satisfaction, InjectionPoint ip)
satisfaction - The next satisfaction in the dependency graphip - The injection point receiving the satisfaction@Nullable public InjectionContext getLeading()
null if the context is
a singleton.Copyright © 2016 GroupLens Research. All rights reserved.