How to know if a Variable Binding represents a local variable, in Eclipse JDT?
-
12-10-2019 - |
سؤال
I've noticed eclipse.jdt.core.dom
variable bindings (IVariableBinding
) offer boolean methods to check if they are representing a field, Enum constant or parameter ( isEnumConstant()
, isField()
and isParameter()
).
How can I know if it represents a local variable? Is it safe to assume that if a IVariableBinding
is not one of the former three it will ALWAYS be a local variable?
المحلول
Answer from the Eclipse Forums (thanks to Deepak Azad): YES, it will always be a local variable, as I suspected.
لا تنتمي إلى StackOverflow