xjavadoc
Class XTagFactory

java.lang.Object
  extended byxjavadoc.XTagFactory

public final class XTagFactory
extends java.lang.Object

Creates XTag instances.

Author:
Aslak Helles�y

Field Summary
private  boolean _isValidating
           
private  java.util.Map _tagClasses
          Maps tag name to XTag class.
 
Constructor Summary
XTagFactory()
           
 
Method Summary
 XTag createTag(java.lang.String tagName, java.lang.String text, XDoc doc, int lineNumber)
          Creates a new XTag.
 boolean isValidating()
           
 void registerTagClass(java.lang.String tagName, java.lang.Class tagClass)
           
 void setIgnoredTags(java.lang.String tags)
          Set the name of the tags that shouldn't be validated against.
 void setValidating(boolean isValidating)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_tagClasses

private final java.util.Map _tagClasses
Maps tag name to XTag class.


_isValidating

private boolean _isValidating
Constructor Detail

XTagFactory

public XTagFactory()
Method Detail

isValidating

public boolean isValidating()

setValidating

public void setValidating(boolean isValidating)

setIgnoredTags

public void setIgnoredTags(java.lang.String tags)
Set the name of the tags that shouldn't be validated against.

Parameters:
tags -

createTag

public XTag createTag(java.lang.String tagName,
                      java.lang.String text,
                      XDoc doc,
                      int lineNumber)
               throws UnknownTagException
Creates a new XTag. If a special tag class has been previously registeres, an instance of the corresponding class will be returned. This allows for special tag implementations.

Parameters:
tagName - name of the tag, without the '@'
text - content of the tag. Will be parsed into attributes.
doc -
lineNumber -
Returns:
an instance of XTag
Throws:
UnknownTagException
TagValidationException - if validation is activated and an unknown tag was encountered.

registerTagClass

public void registerTagClass(java.lang.String tagName,
                             java.lang.Class tagClass)