try {
selector = MasterKindOperatorAnalyzer.findSelector(context.environment, context);
} catch (ResolveException e) {
a.error(e.getMessage());
}
MasterCheck annotation = context.element.getAnnotation(MasterCheck.class);
if (annotation == null) {
a.error("注釈の解釈に失敗しました");
return null;
}
OperatorProcessorUtil.checkPortName(a, new String[] {
annotation.foundPort(),
annotation.missedPort(),
});
if (a.hasError()) {
return null;
}
Builder builder = new Builder(getTargetAnnotationType(), context);
builder.addAttribute(FlowBoundary.SHUFFLE);
builder.addAttribute(a.getObservationCount());
if (selector != null) {
builder.addOperatorHelper(selector);
}
builder.setDocumentation(a.getExecutableDocument());
builder.addInput(
a.getParameterDocument(0),
a.getParameterName(0),
a.getParameterType(0).getType(),
0,
masterKey);
builder.addInput(
a.getParameterDocument(1),
a.getParameterName(1),
a.getParameterType(1).getType(),
1,
transactionKey);
builder.addOutput(
a.getParameterName(0) + "の引き当てに成功した" + a.getParameterName(1),
annotation.foundPort(),
a.getParameterType(1).getType(),
a.getParameterName(1),
null);
builder.addOutput(
a.getParameterName(0) + "の引き当てに失敗した" + a.getParameterName(1),
annotation.missedPort(),
a.getParameterType(1).getType(),
a.getParameterName(1),
null);
return builder.toDescriptor();
}