Class DefaultPluginXmlFactory

java.lang.Object
org.apache.maven.impl.DefaultPluginXmlFactory
All Implemented Interfaces:
org.apache.maven.api.Service, org.apache.maven.api.services.xml.PluginXmlFactory, org.apache.maven.api.services.xml.XmlFactory<org.apache.maven.api.plugin.descriptor.PluginDescriptor>

@Named @Singleton public class DefaultPluginXmlFactory extends Object implements org.apache.maven.api.services.xml.PluginXmlFactory
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.maven.api.plugin.descriptor.PluginDescriptor
    Simply parse the given xml string.
    org.apache.maven.api.plugin.descriptor.PluginDescriptor
    read(org.apache.maven.api.services.xml.XmlReaderRequest request)
     
    static String
    toXml(org.apache.maven.api.plugin.descriptor.PluginDescriptor content)
    Simply converts the given content to an XML string.
    void
    write(org.apache.maven.api.services.xml.XmlWriterRequest<org.apache.maven.api.plugin.descriptor.PluginDescriptor> request)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.maven.api.services.xml.XmlFactory

    fromXmlString, read, read, read, read, read, read, toXmlString, write, write, write
  • Constructor Details

    • DefaultPluginXmlFactory

      public DefaultPluginXmlFactory()
  • Method Details

    • read

      public org.apache.maven.api.plugin.descriptor.PluginDescriptor read(@Nonnull org.apache.maven.api.services.xml.XmlReaderRequest request) throws org.apache.maven.api.services.xml.XmlReaderException
      Specified by:
      read in interface org.apache.maven.api.services.xml.XmlFactory<org.apache.maven.api.plugin.descriptor.PluginDescriptor>
      Throws:
      org.apache.maven.api.services.xml.XmlReaderException
    • write

      public void write(org.apache.maven.api.services.xml.XmlWriterRequest<org.apache.maven.api.plugin.descriptor.PluginDescriptor> request) throws org.apache.maven.api.services.xml.XmlWriterException
      Specified by:
      write in interface org.apache.maven.api.services.xml.XmlFactory<org.apache.maven.api.plugin.descriptor.PluginDescriptor>
      Throws:
      org.apache.maven.api.services.xml.XmlWriterException
    • fromXml

      public static org.apache.maven.api.plugin.descriptor.PluginDescriptor fromXml(@Nonnull String xml) throws org.apache.maven.api.services.xml.XmlReaderException
      Simply parse the given xml string.
      Parameters:
      xml - the input XML string
      Returns:
      the parsed object
      Throws:
      org.apache.maven.api.services.xml.XmlReaderException - if an error occurs during the parsing
      See Also:
      • XmlFactory.toXmlString(Object)
    • toXml

      public static String toXml(@Nonnull org.apache.maven.api.plugin.descriptor.PluginDescriptor content) throws org.apache.maven.api.services.xml.XmlWriterException
      Simply converts the given content to an XML string.
      Parameters:
      content - the object to convert
      Returns:
      the XML string representation
      Throws:
      org.apache.maven.api.services.xml.XmlWriterException - if an error occurs during the transformation
      See Also:
      • XmlFactory.fromXmlString(String)