-
Notifications
You must be signed in to change notification settings - Fork 2
/
UseSourceManagerForLoading.java
31 lines (25 loc) · 1.13 KB
/
UseSourceManagerForLoading.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
* Copyright 2022 PPI AG (Hamburg, Germany)
* This program is made available under the terms of the MIT License.
*/
package de.ppi.deepsampler.junit;
import de.ppi.deepsampler.persistence.api.SourceManager;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Extensions may define their own annotations, to load samples for test methods. Annotations, that
* tell DeepSampler to load samples, must be annotated with this meta-annotation {@link UseSourceManagerForLoading}.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.ANNOTATION_TYPE)
public @interface UseSourceManagerForLoading {
/**
* Defines the {@link SourceManagerFactory} that will be used to create the {@link de.ppi.deepsampler.persistence.api.SourceManager}
* that will load the samples.
* @return A {@link SourceManagerFactory}
*/
@SuppressWarnings("java:S1452") // The generic wildcard is necessary because we want to allow all kinds of SourceManagers
Class<? extends SourceManagerFactory<? extends SourceManager>> value();
}