com.appperfect.codeanalyzer.engine
Interface ITokenListener
- public interface ITokenListener
If a rule needs to examine some more nodes apart from the node it is supplied by the Rule Engine in its evaluate() method
, the rule may register a listener of type ITokenListener with the Rule Engine and receive the notifications when specified
nodes are found. For example, a rule may also implement this interface and to initiate traversal on AST it may
call the static method of EventRuleEngine - EventRuleEngine.traverse(ASTNode startingNode, int[] iaNodeTypes, ITokenListener tokenListener)
while passing itself (this) as the token listener. Upon this request the event rule engine starts traversing the AST
at specified starting node and will notify the rule by calling reportTokenFound(ASTNode) method for each node of
specified type it finds.
- Version:
- 6.0
- Author:
- AppPerfect Corporation.
Method Summary |
void |
reportTokenFound(org.eclipse.jdt.core.dom.ASTNode ast)
The event rule engine notifies the listener when specified type of node is found through this method. |
reportTokenFound
public void reportTokenFound(org.eclipse.jdt.core.dom.ASTNode ast)
- The event rule engine notifies the listener when specified type of node is found through this method.
- Parameters:
ast
-