View Javadoc
1 package net.sourceforge.pmd.symboltable; 2 3 import net.sourceforge.pmd.util.Applier; 4 5 public class LocalScope extends AbstractScope { 6 7 public void addDeclaration(VariableNameDeclaration nameDecl) { 8 if (nameDecl.isExceptionBlockParameter()) { 9 // this declaration needs to go somewhere... should this be delegated to the next 10 // highest LocalScope? 11 return; 12 } 13 super.addDeclaration(nameDecl); 14 } 15 16 protected NameDeclaration findVariableHere(NameOccurrence occurrence) { 17 if (occurrence.isThisOrSuper()) { 18 return null; 19 } 20 ImageFinderFunction finder = new ImageFinderFunction(occurrence.getImage()); 21 Applier.apply(finder, variableNames.keySet().iterator()); 22 return finder.getDecl(); 23 } 24 25 public String toString() { 26 return "LocalScope:" + super.glomNames(); 27 } 28 }

This page was automatically generated by Maven