Class TagRegistry
java.lang.Object
com.webfirmframework.wffweb.tag.html.core.TagRegistry
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Integer
getIndexByTagName
(String tagName) static AbstractHtml
getNewTagInstance
(String tagName) static AbstractHtml
getNewTagInstance
(String tagName, AbstractHtml parent, AbstractAttribute... attributes) static AbstractHtml
getNewTagInstanceOrNullIfFailed
(int tagNameIndex, AbstractHtml parent, AbstractAttribute... attributes) static AbstractHtml
getNewTagInstanceOrNullIfFailed
(String tagName, AbstractHtml parent, AbstractAttribute... attributes) static void
Loads all tag classes.static void
-
Constructor Details
-
TagRegistry
public TagRegistry()
-
-
Method Details
-
getTagNames
- Returns:
- the list of tag names sorted in the ascending order of its length
- Since:
- 1.1.3
-
getIndexByTagName
- Parameters:
tagName
-- Returns:
- the index of tag name
- Since:
- 3.0.3
-
register
- Parameters:
tagNamesToRegister
- the tag names to register , eg:- register("new-tag1", "new-tag2")- Since:
- 1.1.3
-
getTagClassNameByTagName
- Returns:
- a map containing tag name as key and value as tag class name without package name
- Since:
- 1.1.3
-
getTagClassByTagName
- Returns:
- Since:
- 3.0.2
-
loadAllTagClasses
public static void loadAllTagClasses()Loads all tag classes.- Since:
- 2.1.13
-
getNewTagInstance
- Parameters:
tagName
- name of tag in lower case- Returns:
- the new instance of given tag name without any parent tag and attributes
- Throws:
InvalidValueException
- Since:
- 3.0.2
-
getNewTagInstance
public static AbstractHtml getNewTagInstance(String tagName, AbstractHtml parent, AbstractAttribute... attributes) - Parameters:
tagName
- name of tag in lower caseparent
-attributes
-- Returns:
- Throws:
InvalidValueException
- Since:
- 3.0.2
-
getNewTagInstanceOrNullIfFailed
public static AbstractHtml getNewTagInstanceOrNullIfFailed(String tagName, AbstractHtml parent, AbstractAttribute... attributes) - Parameters:
tagName
- name of tag in lower caseparent
-attributes
-- Returns:
- new instance or null if failed
- Since:
- 3.0.2
-
getNewTagInstanceOrNullIfFailed
public static AbstractHtml getNewTagInstanceOrNullIfFailed(int tagNameIndex, AbstractHtml parent, AbstractAttribute... attributes) - Parameters:
tagNameIndex
- index of tag nameparent
-attributes
-- Returns:
- new instance or null if failed
- Since:
- 3.0.3
-