Class XmlPlexusConfiguration

java.lang.Object
org.apache.maven.internal.xml.XmlPlexusConfiguration
All Implemented Interfaces:
org.codehaus.plexus.configuration.PlexusConfiguration

public class XmlPlexusConfiguration extends Object implements org.codehaus.plexus.configuration.PlexusConfiguration
A PlexusConfiguration implementation that wraps an XmlNode instead of copying its entire hierarchy. This provides better performance by avoiding deep copying of the XML structure.

This implementation supports both read and write operations. When write operations are performed, new XmlNode instances are created to maintain immutability, and internal caches are cleared.

  • Constructor Details

    • XmlPlexusConfiguration

      public XmlPlexusConfiguration(XmlNode xmlNode)
  • Method Details

    • toPlexusConfiguration

      public static org.codehaus.plexus.configuration.PlexusConfiguration toPlexusConfiguration(XmlNode node)
    • getName

      public String getName()
      Specified by:
      getName in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • setName

      public void setName(String name)
    • getValue

      public String getValue()
      Specified by:
      getValue in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • getValue

      public String getValue(String defaultValue)
      Specified by:
      getValue in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • setValue

      public void setValue(String value)
      Specified by:
      setValue in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • setValueAndGetSelf

      public org.codehaus.plexus.configuration.PlexusConfiguration setValueAndGetSelf(String value)
    • setAttribute

      public void setAttribute(String name, String value)
      Specified by:
      setAttribute in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • getAttributeNames

      public String[] getAttributeNames()
      Specified by:
      getAttributeNames in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • getAttribute

      public String getAttribute(String paramName)
      Specified by:
      getAttribute in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • getAttribute

      public String getAttribute(String name, String defaultValue)
      Specified by:
      getAttribute in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • getChild

      public org.codehaus.plexus.configuration.PlexusConfiguration getChild(String child)
      Specified by:
      getChild in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • getChild

      public org.codehaus.plexus.configuration.PlexusConfiguration getChild(int i)
      Specified by:
      getChild in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • getChild

      public org.codehaus.plexus.configuration.PlexusConfiguration getChild(String child, boolean createChild)
      Specified by:
      getChild in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • getChildren

      public org.codehaus.plexus.configuration.PlexusConfiguration[] getChildren()
      Specified by:
      getChildren in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • getChildren

      public org.codehaus.plexus.configuration.PlexusConfiguration[] getChildren(String name)
      Specified by:
      getChildren in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • addChild

      public void addChild(org.codehaus.plexus.configuration.PlexusConfiguration configuration)
      Specified by:
      addChild in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • addChild

      public org.codehaus.plexus.configuration.PlexusConfiguration addChild(String name)
    • addChild

      public org.codehaus.plexus.configuration.PlexusConfiguration addChild(String name, String value)
      Specified by:
      addChild in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • getChildCount

      public int getChildCount()
      Specified by:
      getChildCount in interface org.codehaus.plexus.configuration.PlexusConfiguration
    • toString

      public String toString()
      Overrides:
      toString in class Object