}
ShuffleKey foldKey = a.getParameterKey(0);
if (foldKey == null) {
a.error("畳み込み演算子の引数には@Key注釈によってグループ化項目を指定する必要があります");
}
Fold annotation = context.element.getAnnotation(Fold.class);
if (annotation == null) {
a.error("注釈の解釈に失敗しました");
return null;
}
OperatorProcessorUtil.checkPortName(a, new String[] {
annotation.outputPort(),
});
if (a.hasError()) {
return null;
}
Builder builder = new Builder(getTargetAnnotationType(), context);
builder.addAttribute(FlowBoundary.SHUFFLE);
builder.addAttribute(a.getObservationCount());
builder.addAttribute(annotation.partialAggregation());
builder.setDocumentation(a.getExecutableDocument());
builder.addInput(
a.getParameterDocument(1),
Fold.INPUT,
a.getParameterType(1).getType(),
1,
foldKey);
builder.addOutput(
"畳み込みの結果",
annotation.outputPort(),
a.getParameterType(0).getType(),
Fold.INPUT,
0);
for (int i = 2, n = a.countParameters(); i < n; i++) {
builder.addParameter(