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>
Default implementation of
TypedConfig.-
Method Summary
Modifier and TypeMethodDescriptionThe config object.Convert the config instance into a traditional config property map.getType()The config type.static <T> AnnotationTypedConfig<T>newInstance(@NotNull Class<T> type, @NotNull Object config, @NotNull Annotation annotation) Constructs a new instance of aAnnotationTypedConfig.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.sling.testing.mock.osgi.config.annotations.TypedConfig
configStream, stream
-
Method Details
-
getType
Description copied from interface:TypedConfigThe config type. This will only be an annotation type or an interface type.- Specified by:
getTypein interfaceTypedConfig<T>- Returns:
- the config type
-
getConfig
Description copied from interface:TypedConfigThe config object. This is the value that is expected to be passed to anActivate-annotated SCR component constructor.- Specified by:
getConfigin interfaceTypedConfig<T>- Returns:
- the config object
-
getConfigMap
Description copied from interface:TypedConfigConvert the config instance into a traditional config property map.- Specified by:
getConfigMapin interfaceTypedConfig<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 aAnnotationTypedConfig.- Type Parameters:
T- the config type- Parameters:
type- the config typeconfig- the config valueannotation- the annotation that provided the type- Returns:
- a new instance
-