xjavadoc

Class XTagFactory


public final class XTagFactory
extends java.lang.Object

Creates XTag instances.
Author:
Aslak Helles?y

Field Summary

private boolean
_isValidating
private Map
_tagClasses
Maps tag name to XTag class.

Constructor Summary

XTagFactory()

Method Summary

XTag
createTag(String tagName, String text, XDoc doc, int lineNumber)
Creates a new XTag.
boolean
isValidating()
void
registerTagClass(String tagName, Class tagClass)
void
setIgnoredTags(String tags)
Set the name of the tags that shouldn't be validated against.
void
setValidating(boolean isValidating)

Field Details

_isValidating

private boolean _isValidating

_tagClasses

private final Map _tagClasses
Maps tag name to XTag class.

Constructor Details

XTagFactory

public XTagFactory()

Method Details

createTag

public XTag createTag(String tagName,
                      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

isValidating

public boolean isValidating()

registerTagClass

public void registerTagClass(String tagName,
                             Class tagClass)

setIgnoredTags

public void setIgnoredTags(String tags)
Set the name of the tags that shouldn't be validated against.
Parameters:
tags -

setValidating

public void setValidating(boolean isValidating)