Package io.quarkus.maven.utilities
Class PomTransformer.TransformationContext
- java.lang.Object
-
- io.quarkus.maven.utilities.PomTransformer.TransformationContext
-
- Enclosing class:
- PomTransformer
public static class PomTransformer.TransformationContext extends Object
A context of a set ofPomTransformer.Transformations.
-
-
Constructor Summary
Constructors Constructor Description TransformationContext(Path pomXmlPath, Document document, String indentationString, XPath xPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetIndentationString()PathgetPomXmlPath()XPathgetXPath()Nodeindent(int indentCount)NodetextElement(String elementName, String value)
-
-
-
Method Detail
-
getPomXmlPath
public Path getPomXmlPath()
- Returns:
- the path to the
pom.xmlfile that is being transformed
-
getXPath
public XPath getXPath()
- Returns:
- an
XPathinstance that can be used for querying the DOM of the transformedpom.xmlfile
-
getIndentationString
public String getIndentationString()
- Returns:
- an indentation string (without newline characters) as it was autodetected using
PomTransformer.detectIndentation(Node, XPath)
-
indent
public Node indent(int indentCount)
- Parameters:
indentCount-- Returns:
- a new indentation node containing a newline and
indentCounttimes concatenatedindentationString
-
-