View Javadoc

1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.lang.java.symboltable;
5   
6   import net.sourceforge.pmd.lang.ast.Node;
7   import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceDeclaration;
8   import net.sourceforge.pmd.lang.symboltable.AbstractNameDeclaration;
9   
10  public class ClassNameDeclaration extends AbstractNameDeclaration implements TypedNameDeclaration {
11  
12      public ClassNameDeclaration(ASTClassOrInterfaceDeclaration node) {
13          super(node);
14      }
15  
16      public String toString() {
17          return "Class " + node.getImage();
18      }
19  
20      public Node getAccessNodeParent() {
21          return node;
22      }
23  
24      public String getTypeImage() {
25          return ((ASTClassOrInterfaceDeclaration)node).getImage();
26      }
27  
28      public Class<?> getType() {
29          return ((ASTClassOrInterfaceDeclaration)node).getType();
30      }
31  }