Package net.shibboleth.shared.spring.service

# Class ClassBasedServiceStrategy<T>

java.lang.Object
net.shibboleth.shared.spring.service.ClassBasedServiceStrategy<T>

Type Parameters:
  `T` - the service type to look for

All Implemented Interfaces:
  `Function<ApplicationContext,AbstractServiceableComponent<T>>`, `NonnullFunction<ApplicationContext,AbstractServiceableComponent<T>>`

public class ClassBasedServiceStrategy<T> extends Object implements NonnullFunction<ApplicationContext,AbstractServiceableComponent<T>>
Strategy to create `AbstractServiceableComponent`s from the `ApplicationContext`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final Class<T>`
`serviceClaz`
The class we are looking for.

## Constructor Summary

Constructors
Constructor
Description
`ClassBasedServiceStrategy(Class<T> serviceableClaz)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`AbstractServiceableComponent<T>`
`apply(ApplicationContext appContext)`

### 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

### serviceClaz

@Nonnull private final Class<T> serviceClaz
The class we are looking for.

## Constructor Details

### ClassBasedServiceStrategy

public ClassBasedServiceStrategy(@ParameterName(name="serviceableClaz") @Nonnull Class<T> serviceableClaz)
Constructor.

Parameters:
  `serviceableClaz` - what to look for.

## Method Details

### apply

@Nonnull public AbstractServiceableComponent<T> apply(@Nullable ApplicationContext appContext)

Specified by:
  `apply` in interface `Function<ApplicationContext,AbstractServiceableComponent<T>>`
Specified by:
  `apply` in interface `NonnullFunction<ApplicationContext,AbstractServiceableComponent<T>>`