org.codehaus.plexus.metadata.merge.support

## Class ComponentsElement

- java.lang.Object
- - org.codehaus.plexus.metadata.merge.support.AbstractMergeableSupport
  - - org.codehaus.plexus.metadata.merge.support.AbstractMergeableElement
    - - org.codehaus.plexus.metadata.merge.support.AbstractMergeableElementList
      - - org.codehaus.plexus.metadata.merge.support.ComponentsElement

All Implemented Interfaces:
  Mergeable

    public class ComponentsElement
    extends AbstractMergeableElementList

Version:
  $Id: ComponentsElement.java 7689 2008-08-23 16:09:20Z jvanzyl $
Author:
  Rahul Thakur

### Field Summary

### Fields inherited from class org.codehaus.plexus.metadata.merge.support.AbstractMergeableSupport

`element`

### Constructor Summary

Constructors
Constructor and Description
`ComponentsElement(org.jdom.Element element)`

### Method Summary

Methods
`DescriptorTag[]` `getAllowedTags()` Returns an array of tags/elements that are allowed under the current element.
`protected java.util.List` `getElementNamesForConflictChecks(java.util.List defaultList)`
`protected java.util.List` `getElementNamesForConflictResolution(java.util.List defaultList)` Sub classes should override if they wish to provide a different combination of composite keys for determining conflicts.
`protected java.lang.String` `getTagNameForRecurringMergeable()` Allows the sub classes to provided a tag name that they expect to recurr within them.
`protected boolean` `isExpectedElementType(Mergeable me)` Determines if the passed in `Mergeable` was of same type as this class.

### Methods inherited from class org.codehaus.plexus.metadata.merge.support.AbstractMergeableElementList

`merge, merge, parseRecurringMergeables`

### Methods inherited from class org.codehaus.plexus.metadata.merge.support.AbstractMergeableElement

`isRecessiveElementInConflict, isRecessiveElementInConflict, merge, mergeableElementComesFromRecessive`

### Methods inherited from class org.codehaus.plexus.metadata.merge.support.AbstractMergeableSupport

`addContent, addContent, addContent, addContent, addContent, addNamespaceDeclaration, clone, cloneContent, detach, equals, getAdditionalNamespaces, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValue, getChild, getChild, getChildren, getChildren, getChildren, getChildText, getChildText, getChildTextNormalize, getChildTextNormalize, getChildTextTrim, getChildTextTrim, getContent, getContent, getContent, getContentSize, getDefaultMergeStrategy, getDescendants, getDescendants, getDocument, getElement, getName, getNamespace, getNamespace, getNamespacePrefix, getNamespaceURI, getParent, getParentElement, getQualifiedName, getText, getTextNormalize, getTextTrim, getValue, hashCode, indexOf, isAncestor, isRootElement, removeAttribute, removeAttribute, removeAttribute, removeChild, removeChild, removeChildren, removeChildren, removeContent, removeContent, removeContent, removeContent, removeNamespaceDeclaration, setAttribute, setAttribute, setAttribute, setAttributes, setContent, setContent, setContent, setContent, setName, setNamespace, setText, toString`

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ComponentsElement

    public ComponentsElement(org.jdom.Element element)

### Method Detail

#### getAllowedTags

    public DescriptorTag[] getAllowedTags()

Description copied from interface: `Mergeable`
Returns an array of tags/elements that are allowed under the current element.

Returns:
  the allowedTags

#### isExpectedElementType

    protected boolean isExpectedElementType(Mergeable me)

Description copied from class: `AbstractMergeableSupport`
Determines if the passed in `Mergeable` was of same type as this class.

Specified by:
  `isExpectedElementType` in class `AbstractMergeableSupport`
Parameters:
  `me` - `Mergeable` instance to test.
Returns:
  `true` if the passed in Mergeable can be merged with the current Mergeable.

#### getElementNamesForConflictChecks

    protected java.util.List getElementNamesForConflictChecks(java.util.List defaultList)

#### getTagNameForRecurringMergeable

    protected java.lang.String getTagNameForRecurringMergeable()

Description copied from class: `AbstractMergeableElementList`
Allows the sub classes to provided a tag name that they expect to recurr within them.

For instance:

- <components> expects <component> to recurr within itself.
- <requirements> expects <requirement> to recurr within itself.

Specified by:
  `getTagNameForRecurringMergeable` in class `AbstractMergeableElementList`
Returns:
  tag name of the `Mergeable` element that occurs multiple times.

#### getElementNamesForConflictResolution

    protected java.util.List getElementNamesForConflictResolution(java.util.List defaultList)

Description copied from class: `AbstractMergeableSupport`
Sub classes should override if they wish to provide a different combination of composite keys for determining conflicts.

Specified by:
  `getElementNamesForConflictResolution` in class `AbstractMergeableElementList`