/* Generated By:JJTree: Do not edit this line. ASTThrowStatement.java */

package net.sourceforge.pmd.ast;

public class ASTThrowStatement extends SimpleJavaNode {
    public ASTThrowStatement(int id) {
        super(id);
    }

    public ASTThrowStatement(JavaParser p, int id) {
        super(p, id);
    }


    /**
     * Accept the visitor. *
     */
    public Object jjtAccept(JavaParserVisitor visitor, Object data) {
        return visitor.visit(this, data);
    }

    /**
     * Gets the image of the first ASTClassOrInterfaceType child or <code>null</code> if none is found.
     * Note that when the statement is something like throw new Exception, this method
     * returns 'Exception' and if the throw statement is like throw e: this method returns 'e'.
     * A special case of returning <code>null</code> is when the throws is like throw this.e or
     * throw this.
     * <p/>
     * TODO - use symbol table (?)
     *
     * @return the image of the first ASTClassOrInterfaceType node found or <code>null</code>
     */
    public final String getFirstClassOrInterfaceTypeImage() {
        final ASTClassOrInterfaceType t = getFirstChildOfType(ASTClassOrInterfaceType.class);
        return t == null ? null : t.getImage();
    }
}
