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

net.sourceforge.pmd.lang.java.dfa.JavaDataFlowNode Maven / Gradle / Ivy

There is a newer version: 7.5.0
Show newest version
/**
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
 */

package net.sourceforge.pmd.lang.java.dfa;

import java.util.List;

import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.lang.dfa.AbstractDataFlowNode;
import net.sourceforge.pmd.lang.dfa.DataFlowNode;
import net.sourceforge.pmd.lang.java.ast.ASTConstructorDeclaration;
import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration;

/**
 * @deprecated See {@link DataFlowNode}
 */
@Deprecated
public class JavaDataFlowNode extends AbstractDataFlowNode {

    public JavaDataFlowNode(List dataFlow, Node node) {
        super(dataFlow, node);
    }

    @Override
    public String toString() {
        String res = "DataFlowNode: line " + this.getLine() + ", ";
        if (node instanceof ASTMethodDeclaration || node instanceof ASTConstructorDeclaration) {
            res += node instanceof ASTMethodDeclaration ? "(method)" : "(constructor)";
        } else {
            res = super.toString();
        }
        return res;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy