Class PlexusXmlMetadata

java.lang.Object
org.eclipse.sisu.plexus.PlexusXmlMetadata
All Implemented Interfaces:
PlexusBeanMetadata

final class PlexusXmlMetadata extends Object implements PlexusBeanMetadata
Consumable PlexusBeanMetadata that uses BeanProperty names as keys.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Map<String,org.codehaus.plexus.component.annotations.Configuration>
     
    private Map<String,org.codehaus.plexus.component.annotations.Requirement>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlexusXmlMetadata(Map<String,org.codehaus.plexus.component.annotations.Configuration> configurationMap, Map<String,org.codehaus.plexus.component.annotations.Requirement> requirementMap)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static <K, V> Map<K,V>
    addIfMissing(Map<K,V> primary, Map<K,V> secondary)
    Looks for keys that exist in the secondary map, but not the primary, and adds their mappings to the primary map.
    org.codehaus.plexus.component.annotations.Configuration
    Returns @Configuration metadata for the given property of the Plexus bean.
    org.codehaus.plexus.component.annotations.Requirement
    Returns @Requirement metadata for the given property of the Plexus bean.
    boolean
     
    (package private) void
    merge(Map<String,org.codehaus.plexus.component.annotations.Configuration> extraConfiguration, Map<String,org.codehaus.plexus.component.annotations.Requirement> extraRequirements)
    Merges the given configuration and requirements with the current metadata, without overwriting existing entries.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • configurationMap

      private Map<String,org.codehaus.plexus.component.annotations.Configuration> configurationMap
    • requirementMap

      private Map<String,org.codehaus.plexus.component.annotations.Requirement> requirementMap
  • Constructor Details

    • PlexusXmlMetadata

      PlexusXmlMetadata(Map<String,org.codehaus.plexus.component.annotations.Configuration> configurationMap, Map<String,org.codehaus.plexus.component.annotations.Requirement> requirementMap)
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface PlexusBeanMetadata
      Returns:
      true if there is no more metadata; otherwise false
    • getConfiguration

      public org.codehaus.plexus.component.annotations.Configuration getConfiguration(BeanProperty<?> property)
      Description copied from interface: PlexusBeanMetadata
      Returns @Configuration metadata for the given property of the Plexus bean.
      Specified by:
      getConfiguration in interface PlexusBeanMetadata
      Parameters:
      property - The bean property
      Returns:
      Configuration metadata; null if no such metadata is available
    • getRequirement

      public org.codehaus.plexus.component.annotations.Requirement getRequirement(BeanProperty<?> property)
      Description copied from interface: PlexusBeanMetadata
      Returns @Requirement metadata for the given property of the Plexus bean.
      Specified by:
      getRequirement in interface PlexusBeanMetadata
      Parameters:
      property - The bean property
      Returns:
      Requirement metadata; null if no such metadata is available
    • merge

      void merge(Map<String,org.codehaus.plexus.component.annotations.Configuration> extraConfiguration, Map<String,org.codehaus.plexus.component.annotations.Requirement> extraRequirements)
      Merges the given configuration and requirements with the current metadata, without overwriting existing entries.
      Parameters:
      extraConfiguration - The extra configuration
      extraRequirements - The extra requirements
    • addIfMissing

      private static <K, V> Map<K,V> addIfMissing(Map<K,V> primary, Map<K,V> secondary)
      Looks for keys that exist in the secondary map, but not the primary, and adds their mappings to the primary map.
      Parameters:
      primary - The primary map
      secondary - The secondary map