Package org.sonar.java.xml
Class XmlCheckContextImpl
- java.lang.Object
-
- org.sonar.java.xml.XmlCheckContextImpl
-
- All Implemented Interfaces:
XmlCheckContext
- Direct Known Subclasses:
PomCheckContextImpl
public class XmlCheckContextImpl extends Object implements XmlCheckContext
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.sonar.java.xml.XmlCheckContext
XmlCheckContext.XmlDocumentLocation
-
-
Constructor Summary
Constructors Constructor Description XmlCheckContextImpl(Document document, File file, XPath xPath, SonarComponents sonarComponents)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnalyzerMessage
buildAnalyzerMessage(JavaCheck check, String message, Integer line, Iterable<XmlCheckContext.XmlDocumentLocation> secondary, Integer cost, File file)
XPathExpression
compile(String expression)
Iterable<Node>
evaluate(XPathExpression expression, Node node)
Iterable<Node>
evaluateOnDocument(XPathExpression expression)
File
getFile()
SonarComponents
getSonarComponents()
void
reportIssue(JavaCheck check, int line, String message)
void
reportIssue(JavaCheck check, Node node, String message)
void
reportIssue(JavaCheck check, Node node, String message, Iterable<XmlCheckContext.XmlDocumentLocation> secondary)
void
reportIssue(JavaCheck check, Node node, String message, Iterable<XmlCheckContext.XmlDocumentLocation> secondary, Integer cost)
void
reportIssueOnFile(JavaCheck check, String message)
-
-
-
Constructor Detail
-
XmlCheckContextImpl
public XmlCheckContextImpl(Document document, File file, XPath xPath, SonarComponents sonarComponents)
-
-
Method Detail
-
getFile
public File getFile()
- Specified by:
getFile
in interfaceXmlCheckContext
-
compile
public XPathExpression compile(String expression)
- Specified by:
compile
in interfaceXmlCheckContext
-
evaluateOnDocument
public Iterable<Node> evaluateOnDocument(XPathExpression expression)
- Specified by:
evaluateOnDocument
in interfaceXmlCheckContext
-
evaluate
public Iterable<Node> evaluate(XPathExpression expression, Node node)
- Specified by:
evaluate
in interfaceXmlCheckContext
-
reportIssueOnFile
public void reportIssueOnFile(JavaCheck check, String message)
- Specified by:
reportIssueOnFile
in interfaceXmlCheckContext
-
reportIssue
public void reportIssue(JavaCheck check, int line, String message)
- Specified by:
reportIssue
in interfaceXmlCheckContext
-
reportIssue
public void reportIssue(JavaCheck check, Node node, String message)
- Specified by:
reportIssue
in interfaceXmlCheckContext
-
reportIssue
public void reportIssue(JavaCheck check, Node node, String message, Iterable<XmlCheckContext.XmlDocumentLocation> secondary)
- Specified by:
reportIssue
in interfaceXmlCheckContext
-
reportIssue
public void reportIssue(JavaCheck check, Node node, String message, Iterable<XmlCheckContext.XmlDocumentLocation> secondary, @Nullable Integer cost)
- Specified by:
reportIssue
in interfaceXmlCheckContext
-
buildAnalyzerMessage
public AnalyzerMessage buildAnalyzerMessage(JavaCheck check, String message, Integer line, Iterable<XmlCheckContext.XmlDocumentLocation> secondary, @Nullable Integer cost, File file)
-
getSonarComponents
public SonarComponents getSonarComponents()
-
-