Fix build

This commit is contained in:
Clément Fournier
2020-01-17 14:48:43 +01:00
parent a773203f46
commit 240b1fe68a
6 changed files with 9 additions and 25 deletions

View File

@ -82,7 +82,7 @@ public abstract class AbstractNode implements Node {
@Override
public int getIndexInParent() {
return jjtGetChildIndex();
return childIndex;
}
@Override
@ -128,6 +128,7 @@ public abstract class AbstractNode implements Node {
this.parent = parent;
}
@Override
@Deprecated
public Node jjtGetParent() {
return parent;
@ -154,13 +155,8 @@ public abstract class AbstractNode implements Node {
childIndex = index;
}
@Override
@Deprecated
public int jjtGetChildIndex() {
return childIndex;
}
@Deprecated
public Node jjtGetChild(final int index) {
return children[index];

View File

@ -137,19 +137,6 @@ public interface Node {
}
/**
* Gets the index of this node in the children of its parent.
*
* @return The index of the node
*
* @deprecated Use {@link #getIndexInParent()}
*/
@Deprecated
default int jjtGetChildIndex() {
return getIndexInParent();
}
/**
* This method returns a child node. The children are numbered from zero, left to right.
*

View File

@ -43,7 +43,7 @@ public class AttributeAxisIterator implements Iterator<Attribute> {
Long.TYPE, Character.TYPE, Float.TYPE));
private static final Set<String> FILTERED_OUT_NAMES
= new HashSet<>(Arrays.asList("toString", "getNumChildren", "getIndexInParent", "getParent", "getClass", "getRuleIndex", "getXPathNodeName", "isFindBoundary", "altNumber", "toStringTree", "getTypeNameNode", "hashCode", "getImportedNameNode", "getScope"));
= new HashSet<>(Arrays.asList("toString", "getNumChildren", "getIndexInParent", "getParent", "getClass", "getRuleIndex", "getXPathNodeName", "altNumber", "toStringTree", "getTypeNameNode", "hashCode", "getImportedNameNode", "getScope"));
/* Iteration variables */
private final Iterator<MethodWrapper> iterator;

View File

@ -5,6 +5,7 @@
package net.sourceforge.pmd.lang.scala.ast;
import net.sourceforge.pmd.lang.ast.AbstractNode;
import net.sourceforge.pmd.lang.ast.NodeStream;
import scala.meta.Tree;
import scala.meta.inputs.Position;
@ -34,8 +35,8 @@ abstract class AbstractScalaNode<T extends Tree> extends AbstractNode implements
@Override
@SuppressWarnings("unchecked")
public Iterable<ScalaNode<?>> children() {
return (Iterable<ScalaNode<?>>) super.children();
public NodeStream<ScalaNode<?>> children() {
return (NodeStream<ScalaNode<?>>) super.children();
}
@Override

View File

@ -4,8 +4,8 @@
package net.sourceforge.pmd.lang.vf.ast;
import net.sourceforge.pmd.lang.ast.impl.javacc.AbstractJjtreeNode;
import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.lang.ast.impl.javacc.AbstractJjtreeNode;
public class AbstractVFNode extends AbstractJjtreeNode<VfNode> implements VfNode {

View File

@ -26,8 +26,8 @@ import java.io.Writer;
import org.apache.commons.lang3.text.StrBuilder;
import net.sourceforge.pmd.annotation.InternalApi;
import net.sourceforge.pmd.lang.ast.impl.javacc.AbstractJjtreeNode;
import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.lang.ast.impl.javacc.AbstractJjtreeNode;
/**
*