TPTP 4.6.0 Platform Project
Public API Specification

org.eclipse.tptp.platform.analysis.codereview.cpp.rulefilter
Class ASTNodeTypeRuleFilter

java.lang.Object
  extended by org.eclipse.tptp.platform.analysis.codereview.cpp.AbstractRuleFilter
      extended by org.eclipse.tptp.platform.analysis.codereview.cpp.rulefilter.ASTNodeTypeRuleFilter
All Implemented Interfaces:
IRuleFilter

public class ASTNodeTypeRuleFilter
extends AbstractRuleFilter


Constructor Summary
ASTNodeTypeRuleFilter(int[] statementTypes, boolean inclusive)
          This class provides filtering of statements by their type.
ASTNodeTypeRuleFilter(int statementType, boolean inclusive)
          This class provides filtering of statements by their type.
 
Method Summary
 boolean satisfies(org.eclipse.cdt.core.dom.ast.IASTNode node)
          Determine if the node is satisfied by the specified filter rule
 
Methods inherited from class org.eclipse.tptp.platform.analysis.codereview.cpp.AbstractRuleFilter
isInclusive
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASTNodeTypeRuleFilter

public ASTNodeTypeRuleFilter(int statementType,
                             boolean inclusive)
This class provides filtering of statements by their type. All three types in IASTNodeTypes are checked, eg: If you filter for ICPPASTSimpleDeclaration, nodes of classes CPPASTSimpleDeclaration and CASTSimpleDeclaration will be accepted - one cannot assume to only filter ICPPASTSimpleDeclaration in this case.

Parameters:
statementType - The statement class by which to filter
inclusive - True if filtering will include only nodes that match the filter criteria, false to exclude matching nodes

ASTNodeTypeRuleFilter

public ASTNodeTypeRuleFilter(int[] statementTypes,
                             boolean inclusive)
This class provides filtering of statements by their type. All three types in IASTNodeTypes are checked, eg: If you filter for ICPPASTSimpleDeclaration, nodes of classes CPPASTSimpleDeclaration and CASTSimpleDeclaration will be accepted - one cannot assume to only filter ICPPASTSimpleDeclaration in this case.

Parameters:
statementTypes - An array of statement classes on which to filter
inclusive - True if filtering will include only nodes that match the filter criteria, false to exclude matching nodes
Method Detail

satisfies

public boolean satisfies(org.eclipse.cdt.core.dom.ast.IASTNode node)
Determine if the node is satisfied by the specified filter rule

Specified by:
satisfies in interface IRuleFilter
Specified by:
satisfies in class AbstractRuleFilter
Parameters:
node - The ASTNode to test
Returns:
true if the node satisifes the filtering rule

TPTP 4.6.0 Platform Project
Public API Specification