T - the type variable indicating the annotation this class can interpret.public interface ExtensionInterpreter<T extends Annotation>
[at]ExtensionMarker(MyDnsAnnotationInterpreter.class)
public @interface MyDnsAnnotation {
String value() default "8.8.4.4";
}
public class MyDnsAnnotationInterpreter implements ExtensionInterpreter<MyDnsAnnotation> {
[at]Override
public CreateContainerCmd build(TestDescriptor td, CreateContainerCmd cmd, MyDnsAnnotation t) {
return cmd.withDns(t.value());
}
}
| Modifier and Type | Method and Description |
|---|---|
com.github.dockerjava.api.command.CreateContainerCmd |
build(ServiceDescriptor sd,
com.github.dockerjava.api.command.CreateContainerCmd cmd,
T t)
Updates the CreateContainerCmd instance to reflect the value of the interpreted annotation.
|
com.github.dockerjava.api.command.CreateContainerCmd build(ServiceDescriptor sd, com.github.dockerjava.api.command.CreateContainerCmd cmd, T t)
sd - the whole configuration for this test including values from other annotations.cmd - the docker-java command that will instantiate the Docker container based on Dockerunit configt - the annotation that is interpreted by this classCopyright © 2021. All rights reserved.