Search in sources :

Example 36 with Structure

use of net.sourceforge.pmd.lang.dfa.Structure in project pmd by pmd.

the class StatementAndBraceFinder method visit.

@Override
public Object visit(ASTRaiseStatement node, Object data) {
    if (!(data instanceof Structure)) {
        return data;
    }
    Structure dataFlow = (Structure) data;
    dataFlow.createNewNode(node);
    dataFlow.pushOnStack(NodeType.THROW_STATEMENT, dataFlow.getLast());
    if (LOGGER.isLoggable(Level.FINEST)) {
        LOGGER.finest("pushOnStack THROW: line " + node.getBeginLine() + ", column " + node.getBeginColumn());
    }
    return super.visit(node, data);
}
Also used : Structure(net.sourceforge.pmd.lang.dfa.Structure)

Aggregations

Structure (net.sourceforge.pmd.lang.dfa.Structure)36 Node (net.sourceforge.pmd.lang.ast.Node)2 Linker (net.sourceforge.pmd.lang.dfa.Linker)2 LinkerException (net.sourceforge.pmd.lang.dfa.LinkerException)2 SequenceException (net.sourceforge.pmd.lang.dfa.SequenceException)2 ASTDoStatement (net.sourceforge.pmd.lang.java.ast.ASTDoStatement)2 ASTForStatement (net.sourceforge.pmd.lang.java.ast.ASTForStatement)2 ASTIfStatement (net.sourceforge.pmd.lang.java.ast.ASTIfStatement)2 ASTMethodDeclaration (net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration)2 ASTWhileStatement (net.sourceforge.pmd.lang.java.ast.ASTWhileStatement)2 ASTElseClause (net.sourceforge.pmd.lang.plsql.ast.ASTElseClause)2 ASTElsifClause (net.sourceforge.pmd.lang.plsql.ast.ASTElsifClause)2 ASTForStatement (net.sourceforge.pmd.lang.plsql.ast.ASTForStatement)2 ASTIfStatement (net.sourceforge.pmd.lang.plsql.ast.ASTIfStatement)2 ASTLabelledStatement (net.sourceforge.pmd.lang.plsql.ast.ASTLabelledStatement)2 ASTLoopStatement (net.sourceforge.pmd.lang.plsql.ast.ASTLoopStatement)2 ASTWhileStatement (net.sourceforge.pmd.lang.plsql.ast.ASTWhileStatement)2 List (java.util.List)1 ASTAssertStatement (net.sourceforge.pmd.lang.java.ast.ASTAssertStatement)1 ASTConstructorDeclaration (net.sourceforge.pmd.lang.java.ast.ASTConstructorDeclaration)1