All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy