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

# Annotation Type CollectConfigTypes

@Retention(RUNTIME) @Target(PARAMETER) public @interface CollectConfigTypes
Annotate a `ConfigCollection` test parameter to only include `ConfigType`-constructed configs and optionally override the configuration pid applied to them.

## Optional Element Summary

Optional Elements
Modifier and Type
Optional Element
Description
`Class<?>`
`component`
When `pid()` is set to `Component.NAME`, set this attribute to a class whose name should be used instead.
`String`
`pid`
Optionally specify a configuration pid to apply to any collected `ConfigType` annotations.

## Element Details

### pid

String pid
Optionally specify a configuration pid to apply to any collected `ConfigType` annotations. A non-empty value will override any non-empty `ConfigType.pid()` attributes specified by those collected annotations. In order to specify the name of the `component()` class as a configuration PID, set this value to `Component.NAME`. The default value is the empty string, which skips loading any configuration from ConfigurationAdmin.

Returns:
  a configuration pid, or an empty string

Default:
  `"$"`

### component

Class<?> component
When `pid()` is set to `Component.NAME`, set this attribute to a class whose name should be used instead.

Returns:
  the configurable component class

Default:
  `java.lang.Void.class`