01: package org.acm.seguin.pmd.symboltable;
02:
03: import org.acm.seguin.pmd.util.Applier;
04:
05: public class MethodScope extends AbstractScope {
06:
07: protected NameDeclaration findVariableHere(NameOccurrence occurrence) {
08: //System.err.println("MethodScope.findVariableHere("+occurrence+")");
09: if (occurrence.isThisOrSuper()) {
10: return null;
11: }
12: ImageFinderFunction finder = new ImageFinderFunction(occurrence
13: .getImage());
14: Applier.apply(finder, variableNames.keySet().iterator());
15: //System.err.println(" "+this);
16: return finder.getDecl();
17: }
18:
19: public String toString() {
20: return "MethodScope:" + super.glomNames();
21: }
22: }
|