com.appperfect.codeanalyzer.engine
Class EventRuleEngine

java.lang.Object
  |
  +--com.appperfect.codeanalyzer.engine.EventRuleEngine

public class EventRuleEngine
extends java.lang.Object

This class contains a static method traverse that enables a rule to traverse the AST. If a rule needs to examine some more nodes apart from the node it is supplied by the Rule Engine in its evaluate() method, it may do so with help of traverse() method of this class.

Version:
6.0
Author:
AppPerfect Corporation.

Method Summary
static com.appperfect.codeanalyzer.engine.EventRuleEngine getInstance()
          Used internally
 int hashCode()
          Used internally
 void processingUnit(org.eclipse.jdt.core.dom.ASTNode cunitRoot)
          Used internally.
static void pushInstance(com.appperfect.codeanalyzer.engine.EventRuleEngine er)
          Used internally
 void reportEvent(org.eclipse.jdt.core.dom.ASTNode astNode)
          Used internally
static void reset()
          Used internally
 void setEventIds(int[] eventIds)
          Used internally.
 void setListener(com.appperfect.codeanalyzer.engine.ITokenListener tl)
          Used internally.
 void setRestrictedEventIds(int[] eventIds)
          Used internally.
 void startTraversing(org.eclipse.jdt.core.dom.ASTNode astNode)
          Used internally.
static void traverse(org.eclipse.jdt.core.dom.ASTNode startingNode, int[] iaNodeTypes, com.appperfect.codeanalyzer.engine.ITokenListener tokenListener)
          Allows traversing a subtree of AST starting at given node.
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setListener

public void setListener(com.appperfect.codeanalyzer.engine.ITokenListener tl)
Used internally.


setEventIds

public final void setEventIds(int[] eventIds)
Used internally.

Parameters:
eventIds -

setRestrictedEventIds

public final void setRestrictedEventIds(int[] eventIds)
Used internally.

Parameters:
eventIds -

reportEvent

public void reportEvent(org.eclipse.jdt.core.dom.ASTNode astNode)
Used internally


startTraversing

public void startTraversing(org.eclipse.jdt.core.dom.ASTNode astNode)
Used internally.


getInstance

public static com.appperfect.codeanalyzer.engine.EventRuleEngine getInstance()
Used internally

Returns:
EventRuleEngine

pushInstance

public static void pushInstance(com.appperfect.codeanalyzer.engine.EventRuleEngine er)
Used internally

Parameters:
er -

processingUnit

public void processingUnit(org.eclipse.jdt.core.dom.ASTNode cunitRoot)
Used internally.


hashCode

public final int hashCode()
Used internally

Overrides:
hashCode in class java.lang.Object

reset

public static void reset()
Used internally


traverse

public static void traverse(org.eclipse.jdt.core.dom.ASTNode startingNode,
                            int[] iaNodeTypes,
                            com.appperfect.codeanalyzer.engine.ITokenListener tokenListener)
Allows traversing a subtree of AST starting at given node.

Parameters:
startingNode -
iaNodeTypes - an int array specifying the node types that the listener is interested in. These shuld be the node type constants as defined by org.eclipse.jdt.core.dom.ASTNode