Use better name
This commit is contained in:
@ -519,7 +519,7 @@ public abstract class AbstractNode implements Node {
|
||||
|
||||
|
||||
@Override
|
||||
public Iterator<Attribute> getXPathAttributes() {
|
||||
public Iterator<Attribute> getXPathAttributesIterator() {
|
||||
return new AttributeAxisIterator(this);
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -135,7 +135,7 @@ public class DocumentNavigator extends DefaultNavigator {
|
||||
|
||||
@Override
|
||||
public Iterator<Attribute> getAttributeAxisIterator(Object arg0) {
|
||||
return ((Node) arg0).getXPathAttributes();
|
||||
return ((Node) arg0).getXPathAttributesIterator();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user