super(unit, classMap, typeAnalyzer, generatedOutputDirectory, generateAbstractSyntaxTree, processComments);
}
private void addIEventDispatcherImplementation(Context context, ClassDefinitionNode classDefinition)
{
NodeFactory nodeFactory = context.getNodeFactory();
MemberExpressionNode memberExpression =
AbstractSyntaxTreeUtil.generateGetterSelector(nodeFactory, FLASH_EVENTS,
I_EVENT_DISPATCHER, false);
classDefinition.interfaces = nodeFactory.list(classDefinition.interfaces, memberExpression);
VariableDefinitionNode variableDefinition = generateBindingEventDispatcherVariable(nodeFactory);
classDefinition.statements =
nodeFactory.statementList(classDefinition.statements, variableDefinition);
DocCommentNode docCommentNode = generateInheritDocComment(context);
classDefinition.statements =
nodeFactory.statementList(classDefinition.statements, docCommentNode);
FunctionDefinitionNode addEventListenerFunctionDefinition =
generateAddEventListenerFunctionDefinition(context);
classDefinition.statements =
nodeFactory.statementList(classDefinition.statements, addEventListenerFunctionDefinition);
docCommentNode = generateInheritDocComment(context);
classDefinition.statements =
nodeFactory.statementList(classDefinition.statements, docCommentNode);
FunctionDefinitionNode dispatchEventFunctionDefinition =
generateDispatchEventFunctionDefinition(context);
classDefinition.statements =
nodeFactory.statementList(classDefinition.statements, dispatchEventFunctionDefinition);
docCommentNode = generateInheritDocComment(context);
classDefinition.statements =
nodeFactory.statementList(classDefinition.statements, docCommentNode);
FunctionDefinitionNode hasEventListenerFunctionDefinition =
generateHasEventListenerFunctionDefinition(context);
classDefinition.statements =
nodeFactory.statementList(classDefinition.statements, hasEventListenerFunctionDefinition);
docCommentNode = generateInheritDocComment(context);
classDefinition.statements =
nodeFactory.statementList(classDefinition.statements, docCommentNode);
FunctionDefinitionNode removeEventListenerFunctionDefinition =
generateRemoveEventListenerFunctionDefinition(context);
classDefinition.statements =
nodeFactory.statementList(classDefinition.statements, removeEventListenerFunctionDefinition);
docCommentNode = generateInheritDocComment(context);
classDefinition.statements =
nodeFactory.statementList(classDefinition.statements, docCommentNode);
FunctionDefinitionNode willTriggerFunctionDefinition =
generateWillTriggerFunctionDefinition(context);
classDefinition.statements =
nodeFactory.statementList(classDefinition.statements, willTriggerFunctionDefinition);
}