FunctionNameNode functionName = nodeFactory.functionName(Tokens.EMPTY_TOKEN, willTriggerIdentifier);
ParameterNode typeParameter =
AbstractSyntaxTreeUtil.generateParameter(nodeFactory, TYPE, STRING, false);
ParameterListNode parameterList = nodeFactory.parameterList(null, typeParameter);
MemberExpressionNode returnTypeMemberExpression =
AbstractSyntaxTreeUtil.generateGetterSelector(nodeFactory, BOOLEAN, true);
TypeExpressionNode returnType = nodeFactory.typeExpression(returnTypeMemberExpression, true, false, -1);
FunctionSignatureNode functionSignature = nodeFactory.functionSignature(parameterList, returnType);
MemberExpressionNode _bindingEventDispatcherGetterSelector =
AbstractSyntaxTreeUtil.generateGetterSelector(nodeFactory, _BINDING_EVENT_DISPATCHER, false);
IdentifierNode identifier = nodeFactory.identifier(WILL_TRIGGER, false);
MemberExpressionNode typeGetterSelector =
AbstractSyntaxTreeUtil.generateGetterSelector(nodeFactory, TYPE, false);
ArgumentListNode argumentList = nodeFactory.argumentList(null, typeGetterSelector);
CallExpressionNode callExpression =
(CallExpressionNode) nodeFactory.callExpression(identifier, argumentList);
callExpression.setRValue(false);
MemberExpressionNode memberExpression =
nodeFactory.memberExpression(_bindingEventDispatcherGetterSelector, callExpression);
ListNode returnList = nodeFactory.list(null, memberExpression);
ReturnStatementNode returnStatement = nodeFactory.returnStatement(returnList);
StatementListNode functionStatementList = nodeFactory.statementList(null, returnStatement);