01: package org.acm.seguin.pmd.symboltable;
02:
03: import net.sourceforge.jrefactory.ast.ASTClassBodyDeclaration;
04: import net.sourceforge.jrefactory.ast.ASTUnmodifiedClassDeclaration;
05: import net.sourceforge.jrefactory.ast.ASTUnmodifiedInterfaceDeclaration;
06: import net.sourceforge.jrefactory.ast.SimpleNode;
07:
08: public class ClassScopeEvaluator extends AbstractScopeEvaluator {
09: public ClassScopeEvaluator() {
10: triggers.add(ASTUnmodifiedClassDeclaration.class);
11: triggers.add(ASTUnmodifiedInterfaceDeclaration.class);
12: triggers.add(ASTClassBodyDeclaration.class);
13: }
14:
15: public Scope getScopeFor(SimpleNode node) {
16: if (node instanceof ASTClassBodyDeclaration) {
17: return new ClassScope();
18: }
19: return new ClassScope(node.getImage());
20: }
21: }
|