ParameterNode typeParameter =
AbstractSyntaxTreeUtil.generateParameter(nodeFactory, TYPE, STRING, false);
ParameterListNode parameterList = nodeFactory.parameterList(null, typeParameter);
ParameterNode listenerParameter =
AbstractSyntaxTreeUtil.generateParameter(nodeFactory, LISTENER, FUNCTION, false);
parameterList = nodeFactory.parameterList(parameterList, listenerParameter);
LiteralBooleanNode literalBoolean = nodeFactory.literalBoolean(false);
ParameterNode useCaptureParameter =
AbstractSyntaxTreeUtil.generateParameter(nodeFactory, USE_CAPTURE, BOOLEAN,
false, literalBoolean);
parameterList = nodeFactory.parameterList(parameterList, useCaptureParameter);