public static Matcher < ExpressionTree > sameVariable ( final ExpressionTree expr ) { return new Matcher < ExpressionTree > ( ) { @ Override public boolean matches ( ExpressionTree tree , VisitorState state ) { return ASTHelpers . sameVariable ( tree , expr ) ; } } ; }
Matches if this ExpressionTree refers to the same variable as the one passed into the matcher .