# Class SimpleDeclarationVisitor

java.lang.Object
com.sun.mirror.util.SimpleDeclarationVisitor

All Implemented Interfaces:
  `DeclarationVisitor`

public class SimpleDeclarationVisitor extends Object implements DeclarationVisitor
A simple visitor for declarations.

The implementations of the methods of this class do nothing but delegate up the declaration hierarchy. A subclass should override the methods that correspond to the kinds of declarations on which it will operate.

Since:
  1.5
Version:
  1.3 04/04/30
Author:
  Joseph D. Darcy, Scott Seligman

## Constructor Summary

Constructors
Constructor
Description
`SimpleDeclarationVisitor()`
Creates a new `SimpleDeclarationVisitor`.

## Method Summary

Modifier and Type
Method
Description
`void`
`visitAnnotationTypeDeclaration(AnnotationTypeDeclaration d)`
Visits an annotation type declaration.
`void`
`visitAnnotationTypeElementDeclaration(AnnotationTypeElementDeclaration d)`
Visits an annotation type element declaration.
`void`
`visitClassDeclaration(ClassDeclaration d)`
Visits a class declaration.
`void`
`visitConstructorDeclaration(ConstructorDeclaration d)`
Visits a constructor declaration.
`void`
`visitDeclaration(Declaration d)`
Visits a declaration.
`void`
`visitEnumConstantDeclaration(EnumConstantDeclaration d)`
Visits an enum constant declaration.
`void`
`visitEnumDeclaration(EnumDeclaration d)`
Visits an enum declaration.
`void`
`visitExecutableDeclaration(ExecutableDeclaration d)`
Visits a method or constructor declaration.
`void`
`visitFieldDeclaration(FieldDeclaration d)`
Visits a field declaration.
`void`
`visitInterfaceDeclaration(InterfaceDeclaration d)`
Visits an interface declaration.
`void`
`visitMemberDeclaration(MemberDeclaration d)`
Visits a member or constructor declaration.
`void`
`visitMethodDeclaration(MethodDeclaration d)`
Visits a method declaration.
`void`
`visitPackageDeclaration(PackageDeclaration d)`
Visits a package declaration.
`void`
`visitParameterDeclaration(ParameterDeclaration d)`
Visits a parameter declaration.
`void`
`visitTypeDeclaration(TypeDeclaration d)`
Visits a type declaration.
`void`
`visitTypeParameterDeclaration(TypeParameterDeclaration d)`
Visits a type parameter declaration.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SimpleDeclarationVisitor

public SimpleDeclarationVisitor()
Creates a new `SimpleDeclarationVisitor`.

## Method Details

### visitDeclaration

public void visitDeclaration(Declaration d)
Visits a declaration. The implementation does nothing.

Specified by:
  `visitDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit

### visitPackageDeclaration

public void visitPackageDeclaration(PackageDeclaration d)
Visits a package declaration. The implementation simply invokes `visitDeclaration`.

Specified by:
  `visitPackageDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit

### visitMemberDeclaration

public void visitMemberDeclaration(MemberDeclaration d)
Visits a member or constructor declaration. The implementation simply invokes `visitDeclaration`.

Specified by:
  `visitMemberDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit

### visitTypeDeclaration

public void visitTypeDeclaration(TypeDeclaration d)
Visits a type declaration. The implementation simply invokes `visitMemberDeclaration`.

Specified by:
  `visitTypeDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit

### visitClassDeclaration

public void visitClassDeclaration(ClassDeclaration d)
Visits a class declaration. The implementation simply invokes `visitTypeDeclaration`.

Specified by:
  `visitClassDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit

### visitEnumDeclaration

public void visitEnumDeclaration(EnumDeclaration d)
Visits an enum declaration. The implementation simply invokes `visitClassDeclaration`.

Specified by:
  `visitEnumDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit

### visitInterfaceDeclaration

public void visitInterfaceDeclaration(InterfaceDeclaration d)
Visits an interface declaration. The implementation simply invokes `visitTypeDeclaration`.

Specified by:
  `visitInterfaceDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit

### visitAnnotationTypeDeclaration

public void visitAnnotationTypeDeclaration(AnnotationTypeDeclaration d)
Visits an annotation type declaration. The implementation simply invokes `visitInterfaceDeclaration`.

Specified by:
  `visitAnnotationTypeDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit

### visitFieldDeclaration

public void visitFieldDeclaration(FieldDeclaration d)
Visits a field declaration. The implementation simply invokes `visitMemberDeclaration`.

Specified by:
  `visitFieldDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit

### visitEnumConstantDeclaration

public void visitEnumConstantDeclaration(EnumConstantDeclaration d)
Visits an enum constant declaration. The implementation simply invokes `visitFieldDeclaration`.

Specified by:
  `visitEnumConstantDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit

### visitExecutableDeclaration

public void visitExecutableDeclaration(ExecutableDeclaration d)
Visits a method or constructor declaration. The implementation simply invokes `visitMemberDeclaration`.

Specified by:
  `visitExecutableDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit

### visitConstructorDeclaration

public void visitConstructorDeclaration(ConstructorDeclaration d)
Visits a constructor declaration. The implementation simply invokes `visitExecutableDeclaration`.

Specified by:
  `visitConstructorDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit

### visitMethodDeclaration

public void visitMethodDeclaration(MethodDeclaration d)
Visits a method declaration. The implementation simply invokes `visitExecutableDeclaration`.

Specified by:
  `visitMethodDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit

### visitAnnotationTypeElementDeclaration

public void visitAnnotationTypeElementDeclaration(AnnotationTypeElementDeclaration d)
Visits an annotation type element declaration. The implementation simply invokes `visitMethodDeclaration`.

Specified by:
  `visitAnnotationTypeElementDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit

### visitParameterDeclaration

public void visitParameterDeclaration(ParameterDeclaration d)
Visits a parameter declaration. The implementation simply invokes `visitDeclaration`.

Specified by:
  `visitParameterDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit

### visitTypeParameterDeclaration

public void visitTypeParameterDeclaration(TypeParameterDeclaration d)
Visits a type parameter declaration. The implementation simply invokes `visitDeclaration`.

Specified by:
  `visitTypeParameterDeclaration` in interface `DeclarationVisitor`
Parameters:
  `d` - the declaration to visit