package strutsrewriting; import org.eclipse.jdt.core.dom.ASTVisitor; import org.eclipse.jdt.core.dom.MarkerAnnotation; import org.eclipse.jdt.core.dom.NormalAnnotation; import org.eclipse.jdt.core.dom.TypeDeclaration; import org.eclipse.jdt.core.dom.TypeDeclarationStatement; public class AnnotationVisitor extends ASTVisitor { // represents an annotation with a List of properties // Returns a list of structural property descriptors for this node type. // Clients must not modify the result of type StructuralPropertyDescriptor. @Override public boolean visit(MarkerAnnotation node) { System.out.println("NEW NODE!!!!!!!! MarkerAnnotation node"); return true; } // represents an annotation with List of properties and values for each // one, which may be modified dynamically, of type MemberValuePair @Override public boolean visit(NormalAnnotation node) { System.out.println("NEW NODE!!!!!!!! NormalAnnotation node"); return true; } // A type declaration is the union of a class declaration and an interface // declaration. For JLS3, type parameters and reified modifiers (and // annotations) were added @Override public boolean visit(TypeDeclaration node) { System.out.println("NEW NODE!!!!!!!! TypeDeclaration node"); return true; } // think it's to declared inner anynonimous types, such as enums or classes @Override public boolean visit(TypeDeclarationStatement node) { System.out.println("NEW NODE!!!!!!!! TypeDeclarationStatement node"); return true; } }