Package org.opensaml.messaging.context.navigate

# Class RootContextLookup<StartContext extends BaseContext,RootContext extends BaseContext>

java.lang.Object
org.opensaml.messaging.context.navigate.RootContextLookup<StartContext,RootContext>

Type Parameters:
  `StartContext` - type of the starting context
  `RootContext` - type of the root context

All Implemented Interfaces:
  `Function<StartContext,RootContext>`, `ContextDataLookupFunction<StartContext,RootContext>`

public class RootContextLookup<StartContext extends BaseContext,RootContext extends BaseContext> extends Object implements ContextDataLookupFunction<StartContext,RootContext>
A `ContextDataLookupFunction` that gets the root of context tree.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final Class<RootContext>`
`claz`
Class type being returned.

## Constructor Summary

Constructors
Constructor
Description
`RootContextLookup()`
Constructor.
`RootContextLookup(Class<RootContext> targetClass)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`RootContext`
`apply(BaseContext input)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.Function

`andThen, compose`

## Field Details

### claz

@Nullable private final Class<RootContext extends BaseContext> claz
Class type being returned.

## Constructor Details

### RootContextLookup

public RootContextLookup()
Constructor.

### RootContextLookup

public RootContextLookup(@Nonnull @ParameterName(name="targetClass") Class<RootContext> targetClass)
Constructor.

Parameters:
  `targetClass` - the type to return

## Method Details

### apply

@Nullable public RootContext apply(@Nullable BaseContext input)

Specified by:
  `apply` in interface `Function<StartContext extends BaseContext,RootContext extends BaseContext>`