Class DescriptorTag
- java.lang.Object
-
- org.codehaus.plexus.metadata.merge.support.DescriptorTag
-
- Direct Known Subclasses:
PlexusXmlTag
public class DescriptorTag extends Object
Represents the various top-level tags in a deployment descriptor as a typesafe enumeration.
-
-
Constructor Summary
Constructors Constructor Description DescriptorTag(String tagName)Constructor.DescriptorTag(String tagName, boolean isMultipleAllowed)Deprecated.UseDescriptorTag(String,boolean,Class)insteadDescriptorTag(String tagName, boolean isMultipleAllowed, Class mergeableClass)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MergeablecreateMergeable(org.jdom2.Element element)Creates anMergeableinstance from the registered class for this tag instance.booleanequals(Object other)StringgetTagName()inthashCode()booleanisMergeable()Determines if a particular Tag is mergeable or not.booleanisMultipleAllowed()Returns whether the tag may occur multiple times in the descriptor.StringtoString()
-
-
-
Constructor Detail
-
DescriptorTag
public DescriptorTag(String tagName)
Constructor.- Parameters:
tagName- The tag name of the element
-
DescriptorTag
public DescriptorTag(String tagName, boolean isMultipleAllowed)
Deprecated.UseDescriptorTag(String,boolean,Class)insteadConstructor.- Parameters:
tagName- The tag name of the elementisMultipleAllowed- Whether the element may occur multiple times in the descriptor
-
DescriptorTag
public DescriptorTag(String tagName, boolean isMultipleAllowed, Class mergeableClass)
Constructor.- Parameters:
tagName- The tag name of the elementisMultipleAllowed- Whether the element may occur multiple times in the descriptormergeableClass- Concrete implementation ofMergeablethat is bound this tag.
-
-
Method Detail
-
getTagName
public String getTagName()
-
isMultipleAllowed
public boolean isMultipleAllowed()
Returns whether the tag may occur multiple times in the descriptor.- Returns:
- Whether multiple occurrences are allowed
-
isMergeable
public boolean isMergeable()
Determines if a particular Tag is mergeable or not.Basically means if we have a
Mergeableclass registered for a tag instance.- Returns:
trueif this tag is mergeable.
-
-