List of usage examples for org.eclipse.jdt.internal.compiler.lookup MethodScope getBinding
public Binding getBinding(char[][] compoundName, int mask, InvocationSite invocationSite, boolean needResolve)
From source file:org.eclipse.objectteams.otdt.internal.core.compiler.util.RoleTypeCreator.java
License:Open Source License
private static VariableBinding findAnchorInScope(MethodScope scope, char[] anchorName) { // search for variable in class scope (could be obsolete, check this) SingleNameReference invocationSite = new SingleNameReference("this".toCharArray(), 0); //$NON-NLS-1$ invocationSite.binding = scope.enclosingSourceType(); Binding binding = scope.getBinding(anchorName, Binding.VARIABLE, invocationSite, true); if (binding instanceof VariableBinding) return (VariableBinding) binding; return null;//from w w w.j a v a 2s . com }