Class LifecycleStaxWriter
java.lang.Object
org.apache.maven.plugin.lifecycle.io.LifecycleStaxWriter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interface
(package private) static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setFileComment
(String fileComment) Method setFileComment.void
setNamespace
(String namespace) Method setNamespace.void
setSchemaLocation
(String schemaLocation) Method setSchemaLocation.void
write
(OutputStream stream, LifecycleConfiguration lifecycleConfiguration) Method write.void
write
(Writer writer, LifecycleConfiguration lifecycleConfiguration) Method write.private void
writeAttr
(String attrName, String value, XMLStreamWriter serializer) private void
writeDom
(XmlNode dom, XMLStreamWriter serializer) private void
writeExecution
(String tagName, Execution execution, XMLStreamWriter serializer) private void
writeLifecycle
(String tagName, Lifecycle lifecycle, XMLStreamWriter serializer) private void
writeLifecycleConfiguration
(String tagName, LifecycleConfiguration lifecycleConfiguration, XMLStreamWriter serializer) private <T> void
writeList
(String tagName, boolean flat, List<T> list, XMLStreamWriter serializer, LifecycleStaxWriter.ElementWriter<T> writer) private <T> void
writeList
(String tagName, List<T> list, XMLStreamWriter serializer, LifecycleStaxWriter.ElementWriter<T> writer) private void
writePhase
(String tagName, Phase phase, XMLStreamWriter serializer) private <T> void
writeProperties
(String tagName, Map<String, String> props, XMLStreamWriter serializer) private void
writeTag
(String tagName, String defaultValue, String value, XMLStreamWriter serializer)
-
Field Details
-
NAMESPACE
Default namespace.- See Also:
-
SCHEMA_LOCATION
Default schemaLocation.- See Also:
-
namespace
Field namespace. -
schemaLocation
Field schemaLocation. -
fileComment
Field fileComment.
-
-
Constructor Details
-
LifecycleStaxWriter
public LifecycleStaxWriter()
-
-
Method Details
-
setNamespace
Method setNamespace.- Parameters:
namespace
- the namespace to use.
-
setSchemaLocation
Method setSchemaLocation.- Parameters:
schemaLocation
- the schema location to use.
-
setFileComment
Method setFileComment.- Parameters:
fileComment
- a fileComment object.
-
write
public void write(Writer writer, LifecycleConfiguration lifecycleConfiguration) throws IOException, XMLStreamException Method write.- Parameters:
writer
- a writer objectlifecycleConfiguration
- a LifecycleConfiguration object- Throws:
IOException
- IOException if anyXMLStreamException
-
write
public void write(OutputStream stream, LifecycleConfiguration lifecycleConfiguration) throws IOException, XMLStreamException Method write.- Parameters:
stream
- a stream objectlifecycleConfiguration
- a LifecycleConfiguration object- Throws:
IOException
- IOException if anyXMLStreamException
-
writeLifecycleConfiguration
private void writeLifecycleConfiguration(String tagName, LifecycleConfiguration lifecycleConfiguration, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeLifecycle
private void writeLifecycle(String tagName, Lifecycle lifecycle, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writePhase
private void writePhase(String tagName, Phase phase, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeExecution
private void writeExecution(String tagName, Execution execution, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeList
private <T> void writeList(String tagName, List<T> list, XMLStreamWriter serializer, LifecycleStaxWriter.ElementWriter<T> writer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeList
private <T> void writeList(String tagName, boolean flat, List<T> list, XMLStreamWriter serializer, LifecycleStaxWriter.ElementWriter<T> writer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeProperties
private <T> void writeProperties(String tagName, Map<String, String> props, XMLStreamWriter serializer) throws IOException, XMLStreamException- Throws:
IOException
XMLStreamException
-
writeDom
private void writeDom(XmlNode dom, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeTag
private void writeTag(String tagName, String defaultValue, String value, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-
writeAttr
private void writeAttr(String attrName, String value, XMLStreamWriter serializer) throws IOException, XMLStreamException - Throws:
IOException
XMLStreamException
-