Package org.codehaus.cargo.module
Class DescriptorTag
- java.lang.Object
-
- org.codehaus.cargo.module.DescriptorTag
-
- Direct Known Subclasses:
ApplicationXmlTag
,EjbJarXmlTag
,JBossWebXmlTag
,JBossXmlTag
,ResinWebXmlTag
,TomcatContextXmlTag
,WeblogicEjbJarXmlTag
,WeblogicXmlTag
,WebXmlTag
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(DescriptorType descriptorType, String tagName, boolean isMultipleAllowed)
Constructor.DescriptorTag(DescriptorType descriptorType, String tagName, org.jdom2.Namespace namespace, boolean isMultipleAllowed, Identifier identifier, Class clazz)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DescriptorElement
create()
boolean
equals(Object other)
DescriptorType
getDescriptorType()
Return the descriptor type that this tag is defined in.Identifier
getIdentifier()
Class
getImplementationClass()
String
getTagName()
Get tag name.org.jdom2.Namespace
getTagNamespace()
Get tag namespace.int
hashCode()
boolean
isMultipleAllowed()
Is this tag allowed multiple times?String
toString()
-
-
-
Constructor Detail
-
DescriptorTag
public DescriptorTag(DescriptorType descriptorType, String tagName, org.jdom2.Namespace namespace, boolean isMultipleAllowed, Identifier identifier, Class clazz)
Constructor.- Parameters:
descriptorType
- the type of this tagtagName
- The tag name of the elementisMultipleAllowed
- Whether the element may occur multiple times in the descriptoridentifier
- optional tag identifiernamespace
- The namespace to useclazz
- implementation class for this tag
-
DescriptorTag
public DescriptorTag(DescriptorType descriptorType, String tagName, boolean isMultipleAllowed)
Constructor.- Parameters:
descriptorType
- the type of this tagtagName
- The tag name of the elementisMultipleAllowed
- Whether the element may occur multiple times in the descriptor
-
-
Method Detail
-
getTagName
public String getTagName()
Get tag name.- Returns:
- the name of the tag.
-
getTagNamespace
public org.jdom2.Namespace getTagNamespace()
Get tag namespace.- Returns:
- the namespace this tag is in.
-
isMultipleAllowed
public boolean isMultipleAllowed()
Is this tag allowed multiple times?- Returns:
- whether the tag is allowed multiple times.
-
getIdentifier
public Identifier getIdentifier()
- Returns:
- the identifier
-
getImplementationClass
public Class getImplementationClass()
- Returns:
- the webXmlElementClass
-
getDescriptorType
public DescriptorType getDescriptorType()
Return the descriptor type that this tag is defined in.- Returns:
- descriptor type The descriptor type
-
create
public DescriptorElement create() throws CargoException
- Returns:
- instantiated descriptor element, or null if no implementation class.
- Throws:
CargoException
- if any configuration problem
-
-