Package org.eclipse.sisu.plexus
Class PlexusXmlMetadata
java.lang.Object
org.eclipse.sisu.plexus.PlexusXmlMetadata
- All Implemented Interfaces:
PlexusBeanMetadata
Consumable
PlexusBeanMetadata
that uses BeanProperty
names as keys.-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
ConstructorsConstructorDescriptionPlexusXmlMetadata
(Map<String, org.codehaus.plexus.component.annotations.Configuration> configurationMap, Map<String, org.codehaus.plexus.component.annotations.Requirement> requirementMap) -
Method Summary
Modifier and TypeMethodDescriptionprivate 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
getConfiguration
(BeanProperty<?> property) Returns @Configuration
metadata for the given property of the Plexus bean.org.codehaus.plexus.component.annotations.Requirement
getRequirement
(BeanProperty<?> property) Returns @Requirement
metadata for the given property of the Plexus bean.boolean
isEmpty()
(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.
-
Field Details
-
configurationMap
-
requirementMap
-
-
Constructor Details
-
PlexusXmlMetadata
-
-
Method Details
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfacePlexusBeanMetadata
- Returns:
true
if there is no more metadata; otherwisefalse
-
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 interfacePlexusBeanMetadata
- 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 interfacePlexusBeanMetadata
- 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 configurationextraRequirements
- The extra requirements
-
addIfMissing
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
-