Package org.opensaml.messaging.context.navigate

# Class RecursiveTypedChildContextLookup<ChildContext extends BaseContext>

java.lang.Object
org.opensaml.messaging.context.navigate.RecursiveTypedChildContextLookup<ChildContext>

Type Parameters:
  `ChildContext` - type of the child context

All Implemented Interfaces:
  `Function<BaseContext,ChildContext>`, `ContextDataLookupFunction<BaseContext,ChildContext>`

public class RecursiveTypedChildContextLookup<ChildContext extends BaseContext> extends Object implements ContextDataLookupFunction<BaseContext,ChildContext>
A `ContextDataLookupFunction` that peforms a depth-first search of context's children and returns the first nested child context that is an instance of the specified type.

Since:
  5.2.0

## Field Summary

Fields
Modifier and Type
Field
Description
`private Class<ChildContext>`
`childClass`
The target parent class.

## Constructor Summary

Constructors
Constructor
Description
`RecursiveTypedChildContextLookup(Class<ChildContext> targetClass)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`ChildContext`
`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

### childClass

@Nonnull private Class<ChildContext extends BaseContext> childClass
The target parent class.

## Constructor Details

### RecursiveTypedChildContextLookup

public RecursiveTypedChildContextLookup(@Nonnull @ParameterName(name="targetClass") Class<ChildContext> targetClass)
Constructor.

Parameters:
  `targetClass` - the target parent class

## Method Details

### apply

@Nullable public ChildContext apply(@Nullable BaseContext input)

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