Please let me know under which subclass of the ASTNode (org.eclipse.jdt.core.dom.ASTNode) the statements with the Equality operator (==) will come.
I need to find out the instances in code where comparison for Non primitive types (eg: Integer) is done using ‘==’ operator. I want to ensure that the ‘==’ operator is used only for primitive types (eg: int).
I have the Java code logic for performing this check (using JDT library), but not sure which type of ASTNode i have to visit in order to access such statement.
You need to look for ‘InfixExpressions’ where the ‘operator’ is == (or InfixExpression.Operator.EQUALS).
Note that you can simply use ASTView to figure out answers to such questions yourself.