Class ChildContextLookup<ParentContext extends BaseContext,ChildContext extends BaseContext>
java.lang.Object
org.opensaml.messaging.context.navigate.ChildContextLookup<ParentContext,ChildContext>
- Type Parameters:
ParentContext- type of the parent contextChildContext- type of the child context
- All Implemented Interfaces:
Function<ParentContext,,ChildContext> ContextDataLookupFunction<ParentContext,ChildContext>
public class ChildContextLookup<ParentContext extends BaseContext,ChildContext extends BaseContext>
extends Object
implements ContextDataLookupFunction<ParentContext,ChildContext>
A
ContextDataLookupFunction that gets the child context of a given parent context.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanWhether the child context should be created if it doesn't exist.private final Class<ChildContext>Child context type to look up. -
Constructor Summary
ConstructorsConstructorDescriptionChildContextLookup(Class<ChildContext> type) Constructor.ChildContextLookup(Class<ChildContext> type, boolean createContext) Constructor. -
Method Summary
-
Field Details
-
childType
Child context type to look up. -
autocreate
private boolean autocreateWhether the child context should be created if it doesn't exist. This requires that the child context has a no-arg constructor.
-
-
Constructor Details
-
ChildContextLookup
Constructor.Equivalent to calling the two-parameter constructor with false.
- Parameters:
type- child context type to look up
-
ChildContextLookup
public ChildContextLookup(@Nonnull @ParameterName(name="type") Class<ChildContext> type, @ParameterName(name="createContext") boolean createContext) Constructor.- Parameters:
type- child context type to look upcreateContext- whether to create the child context if it does not exist
-
-
Method Details
-
apply
- Specified by:
applyin interfaceFunction<ParentContext extends BaseContext,ChildContext extends BaseContext>
-