Package org.htmlcleaner
Class DefaultTagProvider
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<java.lang.String,TagInfo>
-
- org.htmlcleaner.DefaultTagProvider
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map<java.lang.String,TagInfo>
,ITagInfoProvider
public class DefaultTagProvider extends java.util.HashMap<java.lang.String,TagInfo> implements ITagInfoProvider
This class is automatically created from ConfigFileTagProvider which reads default XML configuration file with tag descriptions. It is used as default tag info provider. Class is created for performance purposes - parsing XML file requires some processing time.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static DefaultTagProvider
_instance
-
Constructor Summary
Constructors Constructor Description DefaultTagProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTagInfo(TagInfo tagInfo)
Sets new tag info.static DefaultTagProvider
getInstance()
TagInfo
getTagInfo(java.lang.String tagName)
void
removeTagInfo(java.lang.String tagName)
Removes tag info with specified name.-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Field Detail
-
_instance
private static DefaultTagProvider _instance
-
-
Method Detail
-
getInstance
public static DefaultTagProvider getInstance()
- Returns:
- Singleton instance of this class.
-
getTagInfo
public TagInfo getTagInfo(java.lang.String tagName)
- Specified by:
getTagInfo
in interfaceITagInfoProvider
-
removeTagInfo
public void removeTagInfo(java.lang.String tagName)
Removes tag info with specified name.- Parameters:
tagName
- Name of the tag to be removed from the tag provider.
-
addTagInfo
public void addTagInfo(TagInfo tagInfo)
Sets new tag info.- Parameters:
tagInfo
- tag info to be added to the provider.
-
-