Use better name

This commit is contained in:
Clément Fournier
2018-06-10 03:41:22 +02:00
parent b4c492d94f
commit 735b8dfe37
8 changed files with 11 additions and 11 deletions

View File

@ -519,7 +519,7 @@ public abstract class AbstractNode implements Node {
@Override
public Iterator<Attribute> getXPathAttributes() {
public Iterator<Attribute> getXPathAttributesIterator() {
return new AttributeAxisIterator(this);
}
}

View File

@ -327,9 +327,9 @@ public interface Node {
/**
* Returns an iterator containing all the attributes that are available
* Returns an iterator enumerating all the attributes that are available
* from XPath for this node.
*/
Iterator<Attribute> getXPathAttributes();
Iterator<Attribute> getXPathAttributesIterator();
}

View File

@ -44,7 +44,7 @@ public class AttributeAxisIterator implements Iterator<Attribute> {
/**
* Creates a new iterator that enumerates the attributes of the given node.
* Note: if you want to access the attributes of a node, don't use this directly,
* use instead the overridable {@link Node#getXPathAttributes()}.
* use instead the overridable {@link Node#getXPathAttributesIterator()}.
*/
public AttributeAxisIterator(Node contextNode) {
this.node = contextNode;

View File

@ -12,7 +12,7 @@ import java.util.Iterator;
* access to it's attributes, versus having them be determined via
* introspection.
*
* @deprecated See {@link net.sourceforge.pmd.lang.ast.Node#getXPathAttributes()}.
* @deprecated See {@link net.sourceforge.pmd.lang.ast.Node#getXPathAttributesIterator()}.
* Will be removed in 7.0.0
*/
@Deprecated

View File

@ -135,7 +135,7 @@ public class DocumentNavigator extends DefaultNavigator {
@Override
public Iterator<Attribute> getAttributeAxisIterator(Object arg0) {
return ((Node) arg0).getXPathAttributes();
return ((Node) arg0).getXPathAttributesIterator();
}
/**

View File

@ -27,7 +27,7 @@ public class AttributeAxisIterator extends Navigator.BaseEnumeration {
*/
public AttributeAxisIterator(ElementNode startNodeInfo) {
this.startNodeInfo = startNodeInfo;
this.iterator = startNodeInfo.node.getXPathAttributes();
this.iterator = startNodeInfo.node.getXPathAttributesIterator();
}
@Override

View File

@ -138,7 +138,7 @@ public class NodeInfoPanelController implements Initializable {
*/
private static ObservableList<String> getAttributes(Node node) {
ObservableList<String> result = FXCollections.observableArrayList();
Iterator<Attribute> attributeAxisIterator = node.getXPathAttributes();
Iterator<Attribute> attributeAxisIterator = node.getXPathAttributesIterator();
while (attributeAxisIterator.hasNext()) {
Attribute attribute = attributeAxisIterator.next();
// TODO the display should be handled in a ListCell

View File

@ -204,7 +204,7 @@ public class XmlNodeWrapper extends AbstractDomNodeProxy implements XmlNode {
@Override
public Iterator<Attribute> getXPathAttributes() {
public Iterator<Attribute> getXPathAttributesIterator() {
List<Iterator<Attribute>> iterators = new ArrayList<>();
// Expose DOM Attributes
@ -250,12 +250,12 @@ public class XmlNodeWrapper extends AbstractDomNodeProxy implements XmlNode {
/**
* @deprecated use {@link #getXPathAttributes()}
* @deprecated use {@link #getXPathAttributesIterator()}
*/
@Override
@Deprecated
public Iterator<Attribute> getAttributeIterator() {
return getXPathAttributes();
return getXPathAttributesIterator();
}