Class Article
java.lang.Object
com.lucaskjaerozhang.wikitext_parser.ast.base.WikiTextNode
com.lucaskjaerozhang.wikitext_parser.ast.base.WikiTextParentNode
com.lucaskjaerozhang.wikitext_parser.ast.root.Article
- All Implemented Interfaces:
WikiTextElement
The root of the AST, containing all content below.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Optional<T>
accept
(WikiTextASTVisitor<T> visitor) Hook for an AST visitor.static Article
from
(List<WikiTextNode> content, CategoryList categories) Creates an article with the given categories.Methods inherited from class com.lucaskjaerozhang.wikitext_parser.ast.base.WikiTextParentNode
getCategories, getFieldValuesFromChildren, rebuildWithContext
Methods inherited from class com.lucaskjaerozhang.wikitext_parser.ast.base.WikiTextNode
getAttributes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.lucaskjaerozhang.wikitext_parser.ast.base.WikiTextElement
getCategories
-
Constructor Details
-
Article
Creates a tree from the given content.- Parameters:
content
- The child nodes contained in the article.
-
-
Method Details
-
from
Creates an article with the given categories. Intended to be called from the visitor.- Parameters:
content
- The child nodes contained in the article.categories
- What categories the article falls under.- Returns:
- The fully constructed article.
-
accept
Description copied from class:WikiTextNode
Hook for an AST visitor.- Specified by:
accept
in classWikiTextNode
- Type Parameters:
T
- Whatever the visitor produces.- Parameters:
visitor
- The visitor doing the visitor.- Returns:
- Whatever the visitor produced.
-