public interface FlowAnalysisListener
| Modifier and Type | Method and Description |
|---|---|
boolean |
catchParameterUsed(SourceCatchParameter parameter,
SourceSimpleNameExpression context)
Usage of a catch parameter.
|
void |
clear()
Called at the end of the flow analysis.
|
boolean |
declareField(SourceFieldVariable sym,
SourceExpression initializer)
Declare or define a field.
|
boolean |
declareLocalVariable(SourceLocalVariable sym,
SourceExpression initializer)
Declare or define a local variable.
|
boolean |
endBlock(SourceBlock sym)
End flow analysis of a block.
|
boolean |
endClass(SourceClass sym)
End flow analysis of a class.
|
boolean |
endConstructors(SourceClass sym)
End flow analysis for constructors.
|
boolean |
endDoCondition(SourceWrapperExpression condition)
End a do condition.
|
boolean |
endFieldDeclaration(SourceFieldDeclaration sym)
End flow analysis of a field declaration.
|
boolean |
endIfCondition(SourceWrapperExpression condition)
End an if condition.
|
boolean |
endInitializer(SourceClassInitializer initializer)
End flow analysis of an initializer.
|
boolean |
endLambdaExpression(SourceLambdaExpression sym)
End flow analysis of a lambda expression.
|
boolean |
endMethod(SourceMethod sym)
End flow analysis of a method.
|
boolean |
endStatement(SourceStatement statement)
End flow analysis of a statement.
|
boolean |
endStaticInitializers(SourceClass sym)
End flow analysis for static initializers.
|
boolean |
endSwitchCondition(SourceWrapperExpression condition)
End a switch condition.
|
boolean |
endSynchronizedExpression(SourceWrapperExpression expression)
End a synchronized expression.
|
boolean |
endWhileCondition(SourceWrapperExpression condition)
End a while condition.
|
boolean |
fieldUsed(SourceFieldVariable field,
SourceExpression context)
Usage of a field.
|
boolean |
lambdaParameterUsed(SourceLambdaParameter parameter,
SourceSimpleNameExpression context)
Usage of a lambda parameter.
|
boolean |
localVariableUsed(SourceLocalVariable local,
SourceSimpleNameExpression context)
Usage of a local variable.
|
boolean |
methodCalled(SourceMethodCallExpression methodCall)
A method was called.
|
boolean |
newClassCreation(SourceNewClassExpression newClassExpr)
A new class is being created.
|
boolean |
parameterUsed(SourceFormalParameter parameter,
SourceSimpleNameExpression context)
Usage of a parameter.
|
boolean |
startBlock(SourceBlock sym)
Start flow analysis of a block, which is the time to get the
local variables of that block by calling SourceBlock.getLocalVariables().
|
boolean |
startClass(SourceClass sym)
Start flow analysis of a class.
|
boolean |
startConstructors(SourceClass sym)
Start flow analysis for constructors.
|
boolean |
startDoCondition(SourceWrapperExpression condition)
Start a do condition.
|
boolean |
startFieldDeclaration(SourceFieldDeclaration sym)
Start flow analysis of a field declaration.
|
boolean |
startIfCondition(SourceWrapperExpression condition)
Start an if condition.
|
boolean |
startInitializer(SourceClassInitializer initializer)
Start flow analysis of an initializer.
|
boolean |
startLambdaExpression(SourceLambdaExpression sym)
Start flow analysis of a lambda expression.
|
boolean |
startMethod(SourceMethod sym)
Start flow analysis of a method.
|
boolean |
startStatement(SourceStatement statement)
Start flow analysis of a statement.
|
boolean |
startStaticInitializers(SourceClass sym)
Start flow analysis for static initializers.
|
boolean |
startSwitchCondition(SourceWrapperExpression condition)
Start a switch condition.
|
boolean |
startSynchronizedExpression(SourceWrapperExpression expression)
Start a synchronized expression.
|
boolean |
startWhileCondition(SourceWrapperExpression condition)
Start a while condition.
|
boolean |
statementLabel(SourceStatementLabel sym)
Compiler encountered a statement label.
|
boolean |
switchLabel(SourceSwitchLabel sym)
Compiler encountered a case label in a switch.
|
void clear()
boolean startClass(SourceClass sym)
sym - The class symboolean endClass(SourceClass sym)
sym - The class symboolean startStaticInitializers(SourceClass sym)
sym - The class sym that owns the static initializersboolean endStaticInitializers(SourceClass sym)
sym - The class sym that owns the static initializersboolean startInitializer(SourceClassInitializer initializer)
initializer - The initializerboolean endInitializer(SourceClassInitializer initializer)
initializer - The initializerboolean startConstructors(SourceClass sym)
sym - The class sym that owns the constructors.boolean endConstructors(SourceClass sym)
sym - The class sym that owns the constructors.boolean startFieldDeclaration(SourceFieldDeclaration sym)
sym - The field declaration symboolean endFieldDeclaration(SourceFieldDeclaration sym)
sym - The field declaration symboolean startMethod(SourceMethod sym)
sym - The method symboolean endMethod(SourceMethod sym)
sym - The method symboolean startLambdaExpression(SourceLambdaExpression sym)
sym - The lambda expressionboolean endLambdaExpression(SourceLambdaExpression sym)
sym - The lambda expressionboolean startBlock(SourceBlock sym)
sym - The block symboolean endBlock(SourceBlock sym)
sym - The block symboolean declareField(SourceFieldVariable sym, SourceExpression initializer)
sym - The fieldinitializer - If not null, this is the initializer of a defineboolean declareLocalVariable(SourceLocalVariable sym, SourceExpression initializer)
sym - The local variableinitializer - If not null, this is the initializer of a defineboolean statementLabel(SourceStatementLabel sym)
sym - The label symboolean switchLabel(SourceSwitchLabel sym)
sym - The label symboolean localVariableUsed(SourceLocalVariable local, SourceSimpleNameExpression context)
local - The local variable symcontext - The expression contextboolean fieldUsed(SourceFieldVariable field, SourceExpression context)
field - The field symcontext - The expression context, should be a SourceSimpleNameExpression
or a SourceDotExpressionboolean parameterUsed(SourceFormalParameter parameter, SourceSimpleNameExpression context)
parameter - The parameter symcontext - The expression contextboolean catchParameterUsed(SourceCatchParameter parameter, SourceSimpleNameExpression context)
parameter - The catch parameter symcontext - The expression contextboolean lambdaParameterUsed(SourceLambdaParameter parameter, SourceSimpleNameExpression context)
parameter - The lambda parameter symcontext - The expression contextboolean startStatement(SourceStatement statement)
statement - The statement symboolean endStatement(SourceStatement statement)
statement - The statement symboolean methodCalled(SourceMethodCallExpression methodCall)
methodCall - The method call expressionboolean newClassCreation(SourceNewClassExpression newClassExpr)
newClassExpr - The new class creation expression.boolean startIfCondition(SourceWrapperExpression condition)
condition - An if conditionboolean endIfCondition(SourceWrapperExpression condition)
condition - An if conditionboolean startWhileCondition(SourceWrapperExpression condition)
condition - A while conditionboolean endWhileCondition(SourceWrapperExpression condition)
condition - A while conditionboolean startDoCondition(SourceWrapperExpression condition)
condition - A do conditionboolean endDoCondition(SourceWrapperExpression condition)
condition - A do conditionboolean startSwitchCondition(SourceWrapperExpression condition)
condition - A switch conditionboolean endSwitchCondition(SourceWrapperExpression condition)
condition - A switch conditionboolean startSynchronizedExpression(SourceWrapperExpression expression)
expression - An expressionboolean endSynchronizedExpression(SourceWrapperExpression expression)
expression - An expression