Package org.apache.sling.testing.mock.osgi.config

# Class AnnotationTypedConfig<T>

java.lang.Object
org.apache.sling.testing.mock.osgi.config.AnnotationTypedConfig<T>

Type Parameters:
  `T` - the config type parameter

All Implemented Interfaces:
  `TypedConfig<T>`

public final class AnnotationTypedConfig<T> extends Object implements TypedConfig<T>
Default implementation of `TypedConfig`.

## Method Summary

Modifier and Type
Method
Description
`T`
`getConfig()`
The config object.
`@NotNull Map<String,Object>`
`getConfigMap()`
Convert the config instance into a traditional config property map.
`@NotNull Class<T>`
`getType()`
The config type.
`static <T> AnnotationTypedConfig<T>`
`newInstance(@NotNull Class<T> type, @NotNull Object config, @NotNull Annotation annotation)`
Constructs a new instance of a `AnnotationTypedConfig`.

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

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

### Methods inherited from interface org.apache.sling.testing.mock.osgi.config.annotations.TypedConfig

`configStream, stream`

## Method Details

### getType

@NotNull public @NotNull Class<T> getType()
Description copied from interface: `TypedConfig`
The config type. This will only be an annotation type or an interface type.

Specified by:
  `getType` in interface `TypedConfig<T>`
Returns:
  the config type

### getConfig

@NotNull public T getConfig()
Description copied from interface: `TypedConfig`
The config object. This is the value that is expected to be passed to an `Activate`-annotated SCR component constructor.

Specified by:
  `getConfig` in interface `TypedConfig<T>`
Returns:
  the config object

### getConfigMap

@NotNull public @NotNull Map<String,Object> getConfigMap()
Description copied from interface: `TypedConfig`
Convert the config instance into a traditional config property map.

Specified by:
  `getConfigMap` in interface `TypedConfig<T>`
Returns:
  a property map

### newInstance

public static <T> AnnotationTypedConfig<T> newInstance(@NotNull @NotNull Class<T> type, @NotNull @NotNull Object config, @NotNull @NotNull Annotation annotation)
Constructs a new instance of a `AnnotationTypedConfig`.

Type Parameters:
  `T` - the config type
Parameters:
  `type` - the config type
  `config` - the config value
  `annotation` - the annotation that provided the type
Returns:
  a new instance