gr.uom.java.xmi.AnonymousClassDeclarationVisitor Maven / Gradle / Ivy
package gr.uom.java.xmi;
import java.util.LinkedHashSet;
import java.util.Set;
import org.eclipse.jdt.core.dom.ASTVisitor;
import org.eclipse.jdt.core.dom.AnonymousClassDeclaration;
import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
public class AnonymousClassDeclarationVisitor extends ASTVisitor {
private Set anonymousClassDeclarations = new LinkedHashSet<>();
private Set typeDeclarationStatements = new LinkedHashSet<>();
public boolean visit(TypeDeclarationStatement node) {
typeDeclarationStatements.add(node);
return super.visit(node);
}
public boolean visit(AnonymousClassDeclaration node) {
anonymousClassDeclarations.add(node);
return super.visit(node);
}
public Set getTypeDeclarationStatements() {
return typeDeclarationStatements;
}
public Set getAnonymousClassDeclarations() {
return anonymousClassDeclarations;
}
}