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 context
ChildContext - 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 Details

    • childType

      @Nonnull private final Class<ChildContext extends BaseContext> childType
      Child context type to look up.
    • autocreate

      private boolean autocreate
      Whether 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

      public ChildContextLookup(@Nonnull @ParameterName(name="type") Class<ChildContext> type)
      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 up
      createContext - whether to create the child context if it does not exist
  • Method Details