Modifier and Type | Method and Description |
---|---|
void |
Rule.addRuleChainVisit(Class<? extends Node> nodeClass)
Adds an AST node by class to be visited by the Rule on the RuleChain.
|
void |
RuleSet.apply(List<? extends Node> acuList,
RuleContext ctx)
Executes the rules in this ruleset against each of the given nodes.
|
void |
Rule.apply(List<? extends Node> nodes,
RuleContext ctx)
Apply this rule to the given collection of nodes, using the given
context.
|
void |
RuleSets.apply(List<Node> acuList,
RuleContext ctx,
Language language)
Apply all applicable rules to the compilation units.
|
void |
RuleChain.apply(List<Node> nodes,
RuleContext ctx,
Language language)
Apply the RuleChain to the given Nodes using the given
RuleContext, for those rules using the given Language.
|
Modifier and Type | Method and Description |
---|---|
Node |
Parser.parse(String fileName,
Reader source)
Parse source code and return the root node of the AST.
|
Modifier and Type | Method and Description |
---|---|
Class<? extends Node> |
DataFlowHandler.getLabelStatementNodeClass() |
Modifier and Type | Method and Description |
---|---|
DataFlowNode |
DataFlowHandler.createDataFlowNode(List<DataFlowNode> dataFlow,
Node node) |
void |
VisitorStarter.start(Node rootNode)
Start the visitor, given the root-node of the AST.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractNode |
Modifier and Type | Field and Description |
---|---|
protected Node[] |
AbstractNode.children |
protected Node |
AbstractNode.parent |
Modifier and Type | Method and Description |
---|---|
Node |
Node.getNthParent(int n) |
Node |
AbstractNode.getNthParent(int n)
Returns the n-th parent or null if there are not
n ancestors |
Node |
Node.jjtGetChild(int index)
This method returns a child node.
|
Node |
AbstractNode.jjtGetChild(int index) |
Node |
Node.jjtGetParent() |
Node |
AbstractNode.jjtGetParent() |
Modifier and Type | Method and Description |
---|---|
List<? extends Node> |
Node.findChildNodesWithXPath(String xpathString)
Returns all the nodes matching the xpath expression.
|
List<Node> |
AbstractNode.findChildNodesWithXPath(String xpathString)
Returns all the nodes matching the xpath expression.
|
Modifier and Type | Method and Description |
---|---|
void |
Node.jjtAddChild(Node child,
int index)
This method tells the node to add its argument to the node's
list of children.
|
void |
AbstractNode.jjtAddChild(Node child,
int index) |
void |
Node.jjtSetParent(Node parent)
This pair of methods are used to inform the node of its
parent.
|
void |
AbstractNode.jjtSetParent(Node parent) |
Modifier and Type | Method and Description |
---|---|
protected Node |
NodeIterator.getFirstChild(Node contextNode) |
protected abstract Node |
NodeIterator.getFirstNode(Node contextNode) |
protected Node |
NodeIterator.getLastChild(Node contextNode) |
protected abstract Node |
NodeIterator.getNextNode(Node contextNode) |
protected Node |
NodeIterator.getNextSibling(Node contextNode) |
Node |
Attribute.getParent() |
protected Node |
NodeIterator.getPreviousSibling(Node contextNode) |
Node |
NodeIterator.next() |
Modifier and Type | Method and Description |
---|---|
Iterator<Node> |
DocumentNavigator.getChildAxisIterator(Object contextNode)
Get an iterator over all of this node's children.
|
Iterator<Node> |
DocumentNavigator.getFollowingAxisIterator(Object contextNode)
Get an iterator over all following nodes, depth-first.
|
Iterator<Node> |
DocumentNavigator.getFollowingSiblingAxisIterator(Object contextNode)
Get an iterator over all following siblings.
|
Iterator<Node> |
DocumentNavigator.getParentAxisIterator(Object contextNode)
Get a (single-member) iterator over this node's parent.
|
Iterator<Node> |
DocumentNavigator.getPrecedingAxisIterator(Object contextNode)
Get an iterator over all preceding nodes, depth-first.
|
Iterator<Node> |
DocumentNavigator.getPrecedingSiblingAxisIterator(Object contextNode)
Get an iterator over all preceding siblings.
|
Modifier and Type | Method and Description |
---|---|
protected Node |
NodeIterator.getFirstChild(Node contextNode) |
protected abstract Node |
NodeIterator.getFirstNode(Node contextNode) |
protected Node |
NodeIterator.getLastChild(Node contextNode) |
protected abstract Node |
NodeIterator.getNextNode(Node contextNode) |
protected Node |
NodeIterator.getNextSibling(Node contextNode) |
protected Node |
NodeIterator.getPreviousSibling(Node contextNode) |
Constructor and Description |
---|
Attribute(Node parent,
String name,
Method m) |
Attribute(Node parent,
String name,
String value) |
AttributeAxisIterator(Node contextNode) |
NodeIterator(Node contextNode) |
Modifier and Type | Field and Description |
---|---|
protected Node |
ElementNode.node |
Modifier and Type | Field and Description |
---|---|
Map<Node,ElementNode> |
DocumentNode.nodeToElementNode
Mapping from AST Node to corresponding ElementNode.
|
Constructor and Description |
---|
DocumentNode(Node node)
Construct a DocumentNode, with the given AST Node serving as the root
ElementNode.
|
ElementNode(DocumentNode document,
IdGenerator idGenerator,
ElementNode parent,
Node node,
int siblingPosition) |
Modifier and Type | Interface and Description |
---|---|
interface |
DFAGraphMethod |
Modifier and Type | Field and Description |
---|---|
protected Node |
AbstractDataFlowNode.node |
Modifier and Type | Method and Description |
---|---|
Node |
DataFlowNode.getNode() |
Node |
AbstractDataFlowNode.getNode() |
Modifier and Type | Method and Description |
---|---|
DataFlowNode |
Structure.createNewNode(Node node)
This class encapsulates the access to the DataFlowNode class.
|
Constructor and Description |
---|
AbstractDataFlowNode(List<DataFlowNode> dataFlow,
Node node) |
Modifier and Type | Class and Description |
---|---|
class |
ParametricRuleViolation<T extends Node> |
Modifier and Type | Field and Description |
---|---|
protected Map<String,List<Node>> |
AbstractRuleChainVisitor.nodeNameToNodes
This is a mapping from node names to nodes instances for the current AST.
|
Modifier and Type | Method and Description |
---|---|
Node |
ImportWrapper.getNode() |
Modifier and Type | Method and Description |
---|---|
void |
AbstractRule.addViolation(Object data,
Node node) |
void |
AbstractRule.addViolation(Object data,
Node node,
Object[] args) |
void |
AbstractRule.addViolation(Object data,
Node node,
String arg) |
void |
RuleViolationFactory.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,
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 |
AbstractRuleViolationFactory.addViolation(RuleContext ruleContext,
Rule rule,
Node node,
String message,
Object[] args) |
void |
AbstractRule.addViolationWithMessage(Object data,
Node node,
String message) |
void |
AbstractRule.addViolationWithMessage(Object data,
Node node,
String message,
int beginLine,
int endLine) |
void |
AbstractRule.addViolationWithMessage(Object data,
Node node,
String message,
Object[] 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)
Evaluate the XPath query with the AST node.
|
protected void |
AbstractRuleChainVisitor.indexNode(Node node)
Index a single node for visitation by rules.
|
protected abstract void |
AbstractRuleChainVisitor.visit(Rule rule,
Node node,
RuleContext ctx)
Visit the given rule to the given node.
|
Modifier and Type | Method and Description |
---|---|
void |
AbstractRule.addRuleChainVisit(Class<? extends Node> nodeClass) |
void |
AbstractDelegateRule.addRuleChainVisit(Class<? extends Node> nodeClass) |
void |
XPathRule.apply(List<? extends Node> nodes,
RuleContext ctx)
Apply the rule to all nodes.
|
void |
MockRule.apply(List<? extends Node> nodes,
RuleContext ctx) |
void |
AbstractDelegateRule.apply(List<? extends Node> nodes,
RuleContext ctx) |
protected abstract void |
AbstractRuleChainVisitor.indexNodes(List<Node> nodes,
RuleContext ctx)
Index all nodes for visitation by rules.
|
void |
RuleChainVisitor.visitAll(List<Node> nodes,
RuleContext ctx)
Visit all the given Nodes provided using the given RuleContext.
|
void |
AbstractRuleChainVisitor.visitAll(List<Node> nodes,
RuleContext ctx) |
Constructor and Description |
---|
ImportWrapper(String fullname,
String name,
Node node) |
ImportWrapper(String fullname,
String name,
Node node,
boolean isStaticDemand) |
ImportWrapper(String fullname,
String name,
Node node,
Class<?> type,
boolean isStaticDemand) |
Modifier and Type | Method and Description |
---|---|
List<Node> |
XPathRuleQuery.evaluate(Node node,
RuleContext data)
Evaluate the XPath query against the given Node.
|
List<Node> |
SaxonXPathRuleQuery.evaluate(Node node,
RuleContext data)
Evaluate the XPath query against the given Node.
|
List<Node> |
JaxenXPathRuleQuery.evaluate(Node node,
RuleContext data)
Evaluate the XPath query against the given Node.
|
abstract List<Node> |
AbstractXPathRuleQuery.evaluate(Node node,
RuleContext data)
Evaluate the XPath query against the given Node.
|
Modifier and Type | Method and Description |
---|---|
List<Node> |
XPathRuleQuery.evaluate(Node node,
RuleContext data)
Evaluate the XPath query against the given Node.
|
List<Node> |
SaxonXPathRuleQuery.evaluate(Node node,
RuleContext data)
Evaluate the XPath query against the given Node.
|
List<Node> |
JaxenXPathRuleQuery.evaluate(Node node,
RuleContext data)
Evaluate the XPath query against the given Node.
|
abstract List<Node> |
AbstractXPathRuleQuery.evaluate(Node node,
RuleContext data)
Evaluate the XPath query against the given Node.
|
Modifier and Type | Interface and Description |
---|---|
interface |
ScopedNode
A
Node which knows about the scope within it has been declared. |
Modifier and Type | Method and Description |
---|---|
Node |
DataPoint.getNode() |
Modifier and Type | Method and Description |
---|---|
void |
DataPoint.setNode(Node node) |
Modifier and Type | Method and Description |
---|---|
void |
CodeEditorTextPane.select(Node node) |
void |
DFAPanel.DFACanvas.setMethod(Node node) |
Constructor and Description |
---|
ASTNodePopupMenu(ViewerModel model,
Node node) |
AttributesSubMenu(ViewerModel model,
Node node) |
SimpleNodeSubMenu(ViewerModel model,
Node node)
constructs the submenu
|
Modifier and Type | Method and Description |
---|---|
Node |
ViewerModel.getRootNode() |
Node |
SimpleNodeTreeNodeAdapter.getSimpleNode()
retrieves the underlying node
|
Modifier and Type | Method and Description |
---|---|
List<Node> |
ViewerModel.getLastEvaluationResults()
retrieves the results of last evaluation
|
Modifier and Type | Method and Description |
---|---|
void |
ViewerModel.selectNode(Node node,
Object selector)
selects the given node in the AST
|
Constructor and Description |
---|
ASTModel(Node root)
creates the tree model
|
SimpleNodeTreeNodeAdapter(SimpleNodeTreeNodeAdapter parent,
Node node)
constructs the node
|
Copyright © 2002–2017 PMD. All rights reserved.