if (annotation == null) {
a.error("注釈の解釈に失敗しました");
return null;
}
Builder builder = new Builder(getTargetAnnotationType(), context);
builder.addAttribute(FlowBoundary.SHUFFLE);
builder.addAttribute(a.getObservationCount());
builder.addAttribute(annotation.inputBuffer());
builder.setDocumentation(a.getExecutableDocument());
for (int i = 0; i < startResults; i++) {
builder.addInput(
a.getParameterDocument(i),
a.getParameterName(i),
a.getParameterType(i).getTypeArgument().getType(),
i,
keys.get(i));
}
for (int i = startResults; i < startParameters; i++) {
TypeConstraint outputType = a.getParameterType(i).getTypeArgument();
TypeMirror outputTypeMirror = outputType.getType();
String found = builder.findInput(outputTypeMirror);
if (found == null && outputType.isProjectiveModel()) {
a.error("出力型{0}に対する入力が見つかりません", outputTypeMirror);
}
builder.addOutput(
a.getParameterDocument(i),
a.getParameterName(i),
outputTypeMirror,
found,
i);
}
for (int i = startParameters, n = a.countParameters(); i < n; i++) {
builder.addParameter(
a.getParameterDocument(i),
a.getParameterName(i),
a.getParameterType(i).getType(),
i);
}
return builder.toDescriptor();
}