Java custom rule for checking instance variable with in a method

Hello,

I am writing a rule to check particular instance variable with in content of a method body(StatementTree).is there any way we can check instance variable(not local variable) present or not with in a method?