Package org.eclipse.sisu.plexus
Class PlexusXmlMetadata
- java.lang.Object
-
- org.eclipse.sisu.plexus.PlexusXmlMetadata
-
- All Implemented Interfaces:
PlexusBeanMetadata
final class PlexusXmlMetadata extends java.lang.Object implements PlexusBeanMetadata
ConsumablePlexusBeanMetadatathat usesBeanPropertynames as keys.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,org.codehaus.plexus.component.annotations.Configuration>configurationMapprivate java.util.Map<java.lang.String,org.codehaus.plexus.component.annotations.Requirement>requirementMap
-
Constructor Summary
Constructors Constructor Description PlexusXmlMetadata(java.util.Map<java.lang.String,org.codehaus.plexus.component.annotations.Configuration> configurationMap, java.util.Map<java.lang.String,org.codehaus.plexus.component.annotations.Requirement> requirementMap)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static <K,V>
java.util.Map<K,V>addIfMissing(java.util.Map<K,V> primary, java.util.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.ConfigurationgetConfiguration(BeanProperty<?> property)Returns @Configurationmetadata for the given property of the Plexus bean.org.codehaus.plexus.component.annotations.RequirementgetRequirement(BeanProperty<?> property)Returns @Requirementmetadata for the given property of the Plexus bean.booleanisEmpty()(package private) voidmerge(java.util.Map<java.lang.String,org.codehaus.plexus.component.annotations.Configuration> extraConfiguration, java.util.Map<java.lang.String,org.codehaus.plexus.component.annotations.Requirement> extraRequirements)Merges the given configuration and requirements with the current metadata, without overwriting existing entries.
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacePlexusBeanMetadata- Returns:
trueif there is no more metadata; otherwisefalse
-
getConfiguration
public org.codehaus.plexus.component.annotations.Configuration getConfiguration(BeanProperty<?> property)
Description copied from interface:PlexusBeanMetadataReturns @Configurationmetadata for the given property of the Plexus bean.- Specified by:
getConfigurationin interfacePlexusBeanMetadata- Parameters:
property- The bean property- Returns:
- Configuration metadata;
nullif no such metadata is available
-
getRequirement
public org.codehaus.plexus.component.annotations.Requirement getRequirement(BeanProperty<?> property)
Description copied from interface:PlexusBeanMetadataReturns @Requirementmetadata for the given property of the Plexus bean.- Specified by:
getRequirementin interfacePlexusBeanMetadata- Parameters:
property- The bean property- Returns:
- Requirement metadata;
nullif no such metadata is available
-
merge
void merge(java.util.Map<java.lang.String,org.codehaus.plexus.component.annotations.Configuration> extraConfiguration, java.util.Map<java.lang.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 configurationextraRequirements- The extra requirements
-
addIfMissing
private static <K,V> java.util.Map<K,V> addIfMissing(java.util.Map<K,V> primary, java.util.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 mapsecondary- The secondary map
-
-