"handler must be either " +
UpstreamHandler.class.getName() + " or " +
DownstreamHandler.class.getName() + '.');
}
PipelineCoverage coverage = handler.getClass().getAnnotation(PipelineCoverage.class);
if (coverage == null) {
logger.warning(
"Handler '" + handler.getClass().getName() +
"' doesn't have a '" +
PipelineCoverage.class.getSimpleName() +
"' annotation with its class declaration. " +
"It is recommended to add the annotation to tell if " +
"one handler instance can handle more than one pipeline " +
"(\"" + ALL + "\") or not (\"" + ONE + "\")");
} else {
String coverageValue = coverage.value();
if (coverageValue == null) {
throw new AnnotationFormatError(
PipelineCoverage.class.getSimpleName() +
" annotation value is undefined for type: " +
handler.getClass().getName());