StartContext
- type of starting contextParentContext
- type of the parent contextpublic class RecursiveTypedParentContextLookup<StartContext extends BaseContext,ParentContext extends BaseContext> extends Object implements ContextDataLookupFunction<StartContext,ParentContext>
ContextDataLookupFunction
that recurses up the parent chain of the input via
BaseContext.getParent()
, and returns the first parent context that is an instance
of the specified type.Modifier and Type | Field and Description |
---|---|
private Class<ParentContext> |
parentClass
The target parent class.
|
Constructor and Description |
---|
RecursiveTypedParentContextLookup(Class<ParentContext> targetClass)
Constructor.
|
private Class<ParentContext extends BaseContext> parentClass
public RecursiveTypedParentContextLookup(@Nonnull Class<ParentContext> targetClass)
targetClass
- the target parent class@Nullable public ParentContext apply(@Nullable StartContext input)
apply
in interface com.google.common.base.Function<StartContext extends BaseContext,ParentContext extends BaseContext>
Copyright © 1999–2015. All rights reserved.