1 /***
2 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3 */
4 package net.sourceforge.pmd.symboltable;
5
6 import net.sourceforge.pmd.ast.ASTClassBodyDeclaration;
7 import net.sourceforge.pmd.ast.ASTUnmodifiedClassDeclaration;
8 import net.sourceforge.pmd.ast.ASTUnmodifiedInterfaceDeclaration;
9 import net.sourceforge.pmd.ast.SimpleNode;
10
11 public class ClassScopeEvaluator extends AbstractScopeEvaluator {
12 public ClassScopeEvaluator() {
13 triggers.add(ASTUnmodifiedClassDeclaration.class);
14 triggers.add(ASTUnmodifiedInterfaceDeclaration.class);
15 triggers.add(ASTClassBodyDeclaration.class);
16 }
17 public Scope getScopeFor(SimpleNode node) {
18 if (node instanceof ASTClassBodyDeclaration) {
19 return new ClassScope();
20 }
21 return new ClassScope(node.getImage());
22 }
23 }
24
This page was automatically generated by Maven