A - The annotation class used for configuring the resource on a test objectCFG - The type of the resource configuration classpublic abstract class AnnotationConfigLoader<A extends Annotation,CFG extends ResourceConfig> extends Object implements ResourceConfigLoader<CFG>
| Modifier and Type | Field and Description |
|---|---|
protected Class<A> |
annotationClass
The annotation class used for configuring the resource on a test object
|
| Constructor and Description |
|---|
AnnotationConfigLoader(Class<A> annotationClass)
Creates a new instance for the given annotation class
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract CFG |
createResourceConfig(A configuringAnnotation,
Method customConfigMethod)
Either the given configuring annotation or custom config method must not be null (may also both be not-null)
|
protected Method |
getCustomConfigMethod(Class<?> testClass) |
protected CFG |
getResourceConfig(Class<?> testClass) |
protected abstract boolean |
isConfiguringAnnotation(A annotation) |
protected abstract boolean |
isCustomConfigMethod(Method annotatedMethod) |
CFG |
loadResourceConfig(Object testObject)
Loads the resource configuration for the given test object
|
protected Class<A extends Annotation> annotationClass
public CFG loadResourceConfig(Object testObject)
loadResourceConfig in interface ResourceConfigLoader<CFG extends ResourceConfig>protected CFG getResourceConfig(Class<?> testClass)
testClass - The test class, not nullprotected abstract CFG createResourceConfig(A configuringAnnotation, Method customConfigMethod)
configuringAnnotation - Configuring annotation, if anycustomConfigMethod - Custom config method, if anyprotected Method getCustomConfigMethod(Class<?> testClass)
testClass - The test class, not nullprotected abstract boolean isCustomConfigMethod(Method annotatedMethod)
annotatedMethod - A method annotated with annotationClassprotected abstract boolean isConfiguringAnnotation(A annotation)
annotation - Annotation of type annotationClassCopyright © 2016. All Rights Reserved.