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 Mergeable
createMergeable(org.jdom2.Element element)
Creates anMergeable
instance from the registered class for this tag instance.boolean
equals(Object other)
String
getTagName()
int
hashCode()
boolean
isMergeable()
Determines if a particular Tag is mergeable or not.boolean
isMultipleAllowed()
Returns whether the tag may occur multiple times in the descriptor.String
toString()
-
-
-
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 ofMergeable
that 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
Mergeable
class registered for a tag instance.- Returns:
true
if this tag is mergeable.
-
-