Uses of Interface
net.sourceforge.pmd.lang.ast.Node
-
Packages that use Node Package Description net.sourceforge.pmd This is the PMD programming mistake detector.net.sourceforge.pmd.lang net.sourceforge.pmd.lang.ast net.sourceforge.pmd.lang.ast.impl.javacc net.sourceforge.pmd.lang.ast.xpath net.sourceforge.pmd.lang.ast.xpath.saxon net.sourceforge.pmd.lang.dfa net.sourceforge.pmd.lang.metrics Language-independent framework to represent code metrics.net.sourceforge.pmd.lang.rule net.sourceforge.pmd.lang.rule.xpath net.sourceforge.pmd.lang.symboltable net.sourceforge.pmd.stat net.sourceforge.pmd.util.designer net.sourceforge.pmd.util.designerbindings net.sourceforge.pmd.util.treeexport net.sourceforge.pmd.util.viewer.gui.menu net.sourceforge.pmd.util.viewer.model -
-
Uses of Node in net.sourceforge.pmd
Methods in net.sourceforge.pmd with parameters of type Node Modifier and Type Method Description void
RuleContext. addViolation(Node location)
Record a new violation of the contextual rule, at the given node.void
RuleContext. addViolation(Node location, Object... formatArgs)
Record a new violation of the contextual rule, at the given node.void
RuleContext. addViolationWithMessage(Node location, String message)
Record a new violation of the contextual rule, at the given node.void
RuleContext. addViolationWithMessage(Node location, String message, Object... formatArgs)
Record a new violation of the contextual rule, at the given node.void
RuleContext. addViolationWithPosition(Node location, int beginLine, int endLine, String message, Object... formatArgs)
Record a new violation of the contextual rule, at the given node.Method parameters in net.sourceforge.pmd with type arguments of type Node Modifier and Type Method Description void
Rule. addRuleChainVisit(Class<? extends Node> nodeClass)
Adds an AST node by class to be visited by the Rule on the RuleChain.void
Rule. apply(List<? extends Node> nodes, RuleContext ctx)
Apply this rule to the given collection of nodes, using the given context.void
RuleChain. apply(List<Node> nodes, RuleContext ctx, Language language)
Deprecated.Apply the RuleChain to the given Nodes using the given RuleContext, for those rules using the given Language.void
RuleSet. apply(List<? extends Node> acuList, RuleContext ctx)
Deprecated.This is internal API, removed in PMD 7.void
RuleSets. apply(List<Node> acuList, RuleContext ctx, Language language)
Deprecated.Apply all applicable rules to the compilation units. -
Uses of Node in net.sourceforge.pmd.lang
Classes in net.sourceforge.pmd.lang that implement Node Modifier and Type Class Description static class
PlainTextLanguage.PlainTextFile
The only node produced by the parser ofPlainTextLanguage
.Methods in net.sourceforge.pmd.lang that return Node Modifier and Type Method Description static Node
AbstractParser. doParse(Parser parser, String fileName, Reader source)
Deprecated.Node
Parser. parse(String fileName, Reader source)
Parse source code and return the root node of the AST.Methods in net.sourceforge.pmd.lang that return types with arguments of type Node Modifier and Type Method Description Class<? extends Node>
DataFlowHandler. getLabelStatementNodeClass()
Deprecated.Methods in net.sourceforge.pmd.lang with parameters of type Node Modifier and Type Method Description DataFlowNode
DataFlowHandler. createDataFlowNode(List<DataFlowNode> dataFlow, Node node)
Deprecated.static void
AbstractParser. setFileName(String fileName, Node rootNode)
Deprecated.void
VisitorStarter. start(Node rootNode)
Deprecated.Start the visitor, given the root-node of the AST. -
Uses of Node in net.sourceforge.pmd.lang.ast
Subinterfaces of Node in net.sourceforge.pmd.lang.ast Modifier and Type Interface Description interface
QualifiableNode
Deprecated.Not useful anymoreinterface
RootNode
This interface can be used to tag the root node of various ASTs.interface
SignedNode<N>
Nodes that can be described by a signature.Classes in net.sourceforge.pmd.lang.ast that implement Node Modifier and Type Class Description class
AbstractNode
Base class for all implementations of the Node interface.Fields in net.sourceforge.pmd.lang.ast declared as Node Modifier and Type Field Description protected Node[]
AbstractNode. children
Deprecated.protected Node
AbstractNode. parent
Deprecated.Methods in net.sourceforge.pmd.lang.ast that return Node Modifier and Type Method Description Node
AbstractNode. getChild(int index)
Node
Node. getChild(int index)
Returns the child of this node at the given index.Node
AbstractNode. getNthParent(int n)
Node
Node. getNthParent(int n)
Returns the n-th parent or null if there are less thann
ancestors.Node
AbstractNode. getParent()
Node
Node. getParent()
Returns the parent of this node, or null if this is the root of the tree.Node
AbstractNode. jjtGetChild(int index)
Deprecated.Node
Node. jjtGetChild(int index)
Deprecated.UsegetChild(int)
Node
AbstractNode. jjtGetParent()
Deprecated.Node
Node. jjtGetParent()
Deprecated.UsegetParent()
Methods in net.sourceforge.pmd.lang.ast that return types with arguments of type Node Modifier and Type Method Description Iterable<? extends Node>
AbstractNode. children()
Iterable<? extends Node>
Node. children()
Returns an iterable enumerating the children of this node.List<Node>
AbstractNode. findChildNodesWithXPath(String xpathString)
List<? extends Node>
Node. findChildNodesWithXPath(String xpathString)
Deprecated.This is very inefficient and should not be used in new code.Methods in net.sourceforge.pmd.lang.ast with parameters of type Node Modifier and Type Method Description void
AbstractNode. jjtAddChild(Node child, int index)
Deprecated.void
Node. jjtAddChild(Node child, int index)
Deprecated.This is JJTree-specific and will be removed from this interfacevoid
AbstractNode. jjtSetParent(Node parent)
Deprecated.void
Node. jjtSetParent(Node parent)
Deprecated.This is JJTree-specific and will be removed from this interface -
Uses of Node in net.sourceforge.pmd.lang.ast.impl.javacc
Classes in net.sourceforge.pmd.lang.ast.impl.javacc with type parameters of type Node Modifier and Type Class Description class
AbstractJjtreeNode<N extends Node>
Base class for node produced by JJTree.Classes in net.sourceforge.pmd.lang.ast.impl.javacc that implement Node Modifier and Type Class Description class
AbstractJjtreeNode<N extends Node>
Base class for node produced by JJTree. -
Uses of Node in net.sourceforge.pmd.lang.ast.xpath
Methods in net.sourceforge.pmd.lang.ast.xpath that return Node Modifier and Type Method Description protected Node
NodeIterator. getFirstChild(Node contextNode)
Deprecated.protected abstract Node
NodeIterator. getFirstNode(Node contextNode)
Deprecated.protected Node
NodeIterator. getLastChild(Node contextNode)
Deprecated.protected abstract Node
NodeIterator. getNextNode(Node contextNode)
Deprecated.protected Node
NodeIterator. getNextSibling(Node contextNode)
Deprecated.Node
Attribute. getParent()
protected Node
NodeIterator. getPreviousSibling(Node contextNode)
Deprecated.Node
NodeIterator. next()
Deprecated.Methods in net.sourceforge.pmd.lang.ast.xpath that return types with arguments of type Node Modifier and Type Method Description Iterator<Node>
DocumentNavigator. getChildAxisIterator(Object contextNode)
Deprecated.Get an iterator over all of this node's children.Iterator<Node>
DocumentNavigator. getFollowingAxisIterator(Object contextNode)
Deprecated.Get an iterator over all following nodes, depth-first.Iterator<Node>
DocumentNavigator. getFollowingSiblingAxisIterator(Object contextNode)
Deprecated.Get an iterator over all following siblings.Iterator<Node>
DocumentNavigator. getParentAxisIterator(Object contextNode)
Deprecated.Get a (single-member) iterator over this node's parent.Iterator<Node>
DocumentNavigator. getPrecedingAxisIterator(Object contextNode)
Deprecated.Get an iterator over all preceding nodes, depth-first.Iterator<Node>
DocumentNavigator. getPrecedingSiblingAxisIterator(Object contextNode)
Deprecated.Get an iterator over all preceding siblings.Methods in net.sourceforge.pmd.lang.ast.xpath with parameters of type Node Modifier and Type Method Description protected Node
NodeIterator. getFirstChild(Node contextNode)
Deprecated.protected abstract Node
NodeIterator. getFirstNode(Node contextNode)
Deprecated.protected Node
NodeIterator. getLastChild(Node contextNode)
Deprecated.protected abstract Node
NodeIterator. getNextNode(Node contextNode)
Deprecated.protected Node
NodeIterator. getNextSibling(Node contextNode)
Deprecated.protected Node
NodeIterator. getPreviousSibling(Node contextNode)
Deprecated.Constructors in net.sourceforge.pmd.lang.ast.xpath with parameters of type Node Constructor Description Attribute(Node parent, String name, Method m)
Creates a new attribute belonging to the given node using its accessor.Attribute(Node parent, String name, String value)
Creates a new attribute belonging to the given node using its string value.AttributeAxisIterator(Node contextNode)
Deprecated.Creates a new iterator that enumerates the attributes of the given node.NodeIterator(Node contextNode)
Deprecated. -
Uses of Node in net.sourceforge.pmd.lang.ast.xpath.saxon
Fields in net.sourceforge.pmd.lang.ast.xpath.saxon declared as Node Modifier and Type Field Description protected Node
ElementNode. node
Deprecated.Fields in net.sourceforge.pmd.lang.ast.xpath.saxon with type parameters of type Node Modifier and Type Field Description Map<Node,ElementNode>
DocumentNode. nodeToElementNode
Deprecated.Mapping from AST Node to corresponding ElementNode.Methods in net.sourceforge.pmd.lang.ast.xpath.saxon that return Node Modifier and Type Method Description Node
DocumentNode. getUnderlyingNode()
Deprecated.Node
ElementNode. getUnderlyingNode()
Deprecated.Constructors in net.sourceforge.pmd.lang.ast.xpath.saxon with parameters of type Node Constructor Description DocumentNode(Node node)
Deprecated.DocumentNode(Node node, net.sf.saxon.om.NamePool namePool)
Deprecated.Construct a DocumentNode, with the given AST Node serving as the root ElementNode.ElementNode(DocumentNode document, IdGenerator idGenerator, ElementNode parent, Node node, int siblingPosition)
Deprecated.ElementNode(DocumentNode document, IdGenerator idGenerator, ElementNode parent, Node node, int siblingPosition, net.sf.saxon.om.NamePool namePool)
Deprecated. -
Uses of Node in net.sourceforge.pmd.lang.dfa
Subinterfaces of Node in net.sourceforge.pmd.lang.dfa Modifier and Type Interface Description interface
DFAGraphMethod
Deprecated.Only used by the deprecated designerFields in net.sourceforge.pmd.lang.dfa declared as Node Modifier and Type Field Description protected Node
AbstractDataFlowNode. node
Deprecated.Methods in net.sourceforge.pmd.lang.dfa that return Node Modifier and Type Method Description Node
AbstractDataFlowNode. getNode()
Deprecated.Node
DataFlowNode. getNode()
Deprecated.Methods in net.sourceforge.pmd.lang.dfa with parameters of type Node Modifier and Type Method Description DataFlowNode
Structure. createNewNode(Node node)
Deprecated.This class encapsulates the access to the DataFlowNode class.Constructors in net.sourceforge.pmd.lang.dfa with parameters of type Node Constructor Description AbstractDataFlowNode(List<DataFlowNode> dataFlow, Node node)
Deprecated. -
Uses of Node in net.sourceforge.pmd.lang.metrics
Classes in net.sourceforge.pmd.lang.metrics with type parameters of type Node Modifier and Type Class Description class
AbstractMetric<N extends Node>
Abstract class for all metrics.class
BasicMetricMemoizer<N extends Node>
Deprecated.See package descriptioninterface
Metric<N extends Node>
Object computing a metric on a node.interface
MetricKey<N extends Node>
Key identifying a metric.interface
MetricMemoizer<N extends Node>
Deprecated.See package descriptionclass
ParameterizedMetricKey<N extends Node>
Deprecated.Is internal APIMethods in net.sourceforge.pmd.lang.metrics with type parameters of type Node Modifier and Type Method Description static <O extends Node>
doubleMetricsUtil. computeAggregate(MetricKey<? super O> key, Iterable<? extends O> ops, MetricOptions options, ResultOption resultOption)
Computes an aggregate result for a metric, identified with aResultOption
.static <O extends Node>
doubleMetricsUtil. computeAggregate(MetricKey<? super O> key, Iterable<? extends O> ops, ResultOption resultOption)
static <N extends Node>
doubleMetricsUtil. computeMetric(MetricKey<? super N> key, N node)
Computes a metric identified by its code on a node, with the default options.static <N extends Node>
doubleMetricsUtil. computeMetric(MetricKey<? super N> key, N node, MetricOptions options)
Computes a metric identified by its code on a node, possibly selecting a variant with theoptions
parameter.static <N extends Node>
doubleMetricsUtil. computeMetric(MetricKey<? super N> key, N node, MetricOptions options, boolean forceRecompute)
Computes a metric identified by its code on a node, possibly selecting a variant with theoptions
parameter.static <N extends Node>
doubleMetricsUtil. computeMetricOrNaN(MetricKey<? super N> key, N node, MetricOptions options)
Deprecated.This is provided for compatibility with pre 6.21.0 behavior.static <N extends Node>
ParameterizedMetricKey<N>ParameterizedMetricKey. getInstance(MetricKey<N> key, MetricOptions options)
Deprecated.Builds a parameterized metric key.static <T extends Node>
MetricKey<T>MetricKeyUtil. of(String name, Metric<T> metric)
Creates a new metric key from its metric and name.static <N extends Node>
booleanMetricsUtil. supportsAll(N node, MetricKey<N>... metrics)
Methods in net.sourceforge.pmd.lang.metrics with parameters of type Node Modifier and Type Method Description O
LanguageMetricsProvider. asOperationNode(Node anyNode)
Returns the given node casted toLanguageMetricsProvider
if it's of the correct type, otherwise returns null.T
LanguageMetricsProvider. asTypeNode(Node anyNode)
Returns the given node casted toLanguageMetricsProvider
if it's of the correct type, otherwise returns null.Map<MetricKey<?>,Double>
LanguageMetricsProvider. computeAllMetricsFor(Node node)
Computes all metrics available on the given node. -
Uses of Node in net.sourceforge.pmd.lang.rule
Classes in net.sourceforge.pmd.lang.rule with type parameters of type Node Modifier and Type Class Description class
ParametricRuleViolation<T extends Node>
Deprecated.This is internal.Fields in net.sourceforge.pmd.lang.rule with type parameters of type Node Modifier and Type Field Description protected Map<String,List<Node>>
AbstractRuleChainVisitor. nodeNameToNodes
Deprecated.This is a mapping from node names to nodes instances for the current AST.Methods in net.sourceforge.pmd.lang.rule that return Node Modifier and Type Method Description Node
ImportWrapper. getNode()
Deprecated.Methods in net.sourceforge.pmd.lang.rule with parameters of type Node Modifier and Type Method Description void
AbstractRule. addViolation(Object data, Node node)
Deprecated.Replace withasCtx(data).addViolation(node)
.void
AbstractRule. addViolation(Object data, Node node, Object... args)
Deprecated.Replace withasCtx(data).addViolation(node, arg1, arg2)
.void
AbstractRule. addViolation(Object data, Node node, String arg)
Deprecated.Replace withasCtx(data).addViolation(node, arg)
.void
AbstractRuleViolationFactory. addViolation(RuleContext ruleContext, Rule rule, Node node, String message, int beginLine, int endLine, Object[] args)
void
AbstractRuleViolationFactory. addViolation(RuleContext ruleContext, Rule rule, Node node, String message, Object[] args)
void
RuleViolationFactory. addViolation(RuleContext ruleContext, Rule rule, Node node, String message, int beginLine, int endLine, Object[] args)
void
RuleViolationFactory. addViolation(RuleContext ruleContext, Rule rule, Node node, String message, Object[] args)
Adds a violation to the report.void
AbstractRule. addViolationWithMessage(Object data, Node node, String message)
Deprecated.Replace withasCtx(data).addViolationWithMessage(node, message)
.void
AbstractRule. addViolationWithMessage(Object data, Node node, String message, int beginLine, int endLine)
Deprecated.Replace withasCtx(data).addViolationWithPosition(node, beginLine, endLine, message)
.void
AbstractRule. addViolationWithMessage(Object data, Node node, String message, Object[] args)
Deprecated.Replace withasCtx(data).addViolationWithMessage(node, message, args)
.protected abstract RuleViolation
AbstractRuleViolationFactory. createRuleViolation(Rule rule, RuleContext ruleContext, Node node, String message)
protected abstract RuleViolation
AbstractRuleViolationFactory. createRuleViolation(Rule rule, RuleContext ruleContext, Node node, String message, int beginLine, int endLine)
void
XPathRule. evaluate(Node node, RuleContext data)
Deprecated.protected void
AbstractRuleChainVisitor. indexNode(Node node)
Deprecated.Index a single node for visitation by rules.protected abstract void
AbstractRuleChainVisitor. visit(Rule rule, Node node, RuleContext ctx)
Deprecated.Visit the given rule to the given node.Method parameters in net.sourceforge.pmd.lang.rule with type arguments of type Node Modifier and Type Method Description void
AbstractDelegateRule. addRuleChainVisit(Class<? extends Node> nodeClass)
Deprecated.void
AbstractRule. addRuleChainVisit(Class<? extends Node> nodeClass)
void
AbstractDelegateRule. apply(List<? extends Node> nodes, RuleContext ctx)
Deprecated.void
MockRule. apply(List<? extends Node> nodes, RuleContext ctx)
Deprecated.void
XPathRule. apply(List<? extends Node> nodes, RuleContext ctx)
protected abstract void
AbstractRuleChainVisitor. indexNodes(List<Node> nodes, RuleContext ctx)
Deprecated.Index all nodes for visitation by rules.void
AbstractRuleChainVisitor. visitAll(List<Node> nodes, RuleContext ctx)
Deprecated.void
RuleChainVisitor. visitAll(List<Node> nodes, RuleContext ctx)
Deprecated.Visit all the given Nodes provided using the given RuleContext.Constructors in net.sourceforge.pmd.lang.rule with parameters of type Node Constructor Description ImportWrapper(String fullname, String name, Node node)
Deprecated.ImportWrapper(String fullname, String name, Node node, boolean isStaticDemand)
Deprecated.ImportWrapper(String fullname, String name, Node node, Class<?> type, boolean isStaticDemand)
Deprecated. -
Uses of Node in net.sourceforge.pmd.lang.rule.xpath
Methods in net.sourceforge.pmd.lang.rule.xpath that return types with arguments of type Node Modifier and Type Method Description abstract List<Node>
AbstractXPathRuleQuery. evaluate(Node node, RuleContext data)
Deprecated.List<Node>
JaxenXPathRuleQuery. evaluate(Node node, RuleContext data)
Deprecated.List<Node>
SaxonXPathRuleQuery. evaluate(Node node, RuleContext data)
Deprecated.List<Node>
XPathRuleQuery. evaluate(Node node, RuleContext data)
Deprecated.Evaluate the XPath query against the given Node.Methods in net.sourceforge.pmd.lang.rule.xpath with parameters of type Node Modifier and Type Method Description abstract List<Node>
AbstractXPathRuleQuery. evaluate(Node node, RuleContext data)
Deprecated.List<Node>
JaxenXPathRuleQuery. evaluate(Node node, RuleContext data)
Deprecated.List<Node>
SaxonXPathRuleQuery. evaluate(Node node, RuleContext data)
Deprecated.List<Node>
XPathRuleQuery. evaluate(Node node, RuleContext data)
Deprecated.Evaluate the XPath query against the given Node. -
Uses of Node in net.sourceforge.pmd.lang.symboltable
Subinterfaces of Node in net.sourceforge.pmd.lang.symboltable Modifier and Type Interface Description interface
ScopedNode
ANode
which knows about the scope within it has been declared. -
Uses of Node in net.sourceforge.pmd.stat
Methods in net.sourceforge.pmd.stat that return Node Modifier and Type Method Description Node
DataPoint. getNode()
Deprecated.Methods in net.sourceforge.pmd.stat with parameters of type Node Modifier and Type Method Description void
DataPoint. setNode(Node node)
Deprecated. -
Uses of Node in net.sourceforge.pmd.util.designer
Methods in net.sourceforge.pmd.util.designer with parameters of type Node Modifier and Type Method Description void
CodeEditorTextPane. select(Node node)
Deprecated.void
DFAPanel.DFACanvas. setMethod(Node node)
-
Uses of Node in net.sourceforge.pmd.util.designerbindings
Methods in net.sourceforge.pmd.util.designerbindings that return types with arguments of type Node Modifier and Type Method Description List<Node>
RelatedNodesSelector. getHighlightedNodesWhenSelecting(Node node)
Returns a list of nodes that should be highlighted when selecting the given node.Methods in net.sourceforge.pmd.util.designerbindings with parameters of type Node Modifier and Type Method Description Collection<DesignerBindings.AdditionalInfo>
DesignerBindings.DefaultDesignerBindings. getAdditionalInfo(Node node)
Collection<DesignerBindings.AdditionalInfo>
DesignerBindings. getAdditionalInfo(Node node)
Returns a collection of "additional information" entries pertaining to the given node.List<Node>
RelatedNodesSelector. getHighlightedNodesWhenSelecting(Node node)
Returns a list of nodes that should be highlighted when selecting the given node.DesignerBindings.TreeIconId
DesignerBindings.DefaultDesignerBindings. getIcon(Node node)
DesignerBindings.TreeIconId
DesignerBindings. getIcon(Node node)
Returns a constant describing an icon that the node should bear in the treeview and other relevant places.Attribute
DesignerBindings.DefaultDesignerBindings. getMainAttribute(Node node)
Attribute
DesignerBindings. getMainAttribute(Node node)
Returns the "main" attribute of the given node.boolean
DesignerBindings.DefaultDesignerBindings. isExpandedByDefaultInTree(Node node)
boolean
DesignerBindings. isExpandedByDefaultInTree(Node node)
Returns true if the children of this node should be displayed in the treeview by default. -
Uses of Node in net.sourceforge.pmd.util.treeexport
Methods in net.sourceforge.pmd.util.treeexport with parameters of type Node Modifier and Type Method Description protected void
TextTreeRenderer. appendBoundaryForNodeLn(Node node, Appendable out, String indentStr)
protected void
TextTreeRenderer. appendNodeInfoLn(Appendable out, Node node)
Append info about the node.void
TextTreeRenderer. renderSubtree(Node node, Appendable out)
void
TreeRenderer. renderSubtree(Node node, Appendable out)
Appends the subtree rooted at the given node on the provided output writer.void
XmlTreeRenderer. renderSubtree(Node node, Appendable out)
Appends the subtree rooted at the given node on the provided output writer.protected boolean
XmlTreeRenderer.XmlRenderingConfig. takeAttribute(Node node, Attribute attribute)
Returns true if the attribute should be included in the element corresponding to the given node. -
Uses of Node in net.sourceforge.pmd.util.viewer.gui.menu
Constructors in net.sourceforge.pmd.util.viewer.gui.menu with parameters of type Node Constructor Description ASTNodePopupMenu(ViewerModel model, Node node)
Deprecated.AttributesSubMenu(ViewerModel model, Node node)
Deprecated.SimpleNodeSubMenu(ViewerModel model, Node node)
Deprecated.constructs the submenu -
Uses of Node in net.sourceforge.pmd.util.viewer.model
Methods in net.sourceforge.pmd.util.viewer.model that return Node Modifier and Type Method Description Node
ViewerModel. getRootNode()
Deprecated.Node
SimpleNodeTreeNodeAdapter. getSimpleNode()
Deprecated.retrieves the underlying nodeMethods in net.sourceforge.pmd.util.viewer.model that return types with arguments of type Node Modifier and Type Method Description List<Node>
ViewerModel. getLastEvaluationResults()
Deprecated.Retrieves the results of last evaluation.Methods in net.sourceforge.pmd.util.viewer.model with parameters of type Node Modifier and Type Method Description void
ViewerModel. selectNode(Node node, Object selector)
Deprecated.Selects the given node in the AST.Constructors in net.sourceforge.pmd.util.viewer.model with parameters of type Node Constructor Description ASTModel(Node root)
Deprecated.creates the tree modelSimpleNodeTreeNodeAdapter(SimpleNodeTreeNodeAdapter parent, Node node)
Deprecated.constructs the node
-