T - a context objectR - a member to be constructed, modified and/or validatedpublic interface Tag<T,R>
A Tag may have child tags of type <? super R, ?>.
| Modifier and Type | Method and Description |
|---|---|
void |
close(Object o,
String text)
Called by TagHandler.endElement to consume text.
|
default Tag<? super R,?>[] |
getChildren()
Provide no children by default.
|
default java.util.function.BiConsumer<R,String> |
getCloser()
Override to implement closing behaviour.
|
R |
getItem(T t)
Obtains a member R from a context object T.
|
default java.util.function.BiConsumer<R,Attributes> |
getOpener()
Override to implement opening behaviour.
|
Tag<T,R> |
getSelf()
Enforce implementation of a self member.
|
String |
getTag() |
default TagModel<? super R> |
getTagModel()
Obtain a new TagModel on the children or return
null
if there are no children. |
default java.util.function.BiConsumer<Tag<T,R>,R> |
getValidator()
Override to implement validation behaviour.
|
default boolean |
isChoice()
True this Tag's children are choices (otherwise they're a sequence).
|
default boolean |
isMultiple()
True if this Tag is can be repeated.
|
default boolean |
isOptional()
True if this Tag is optional, and can be skipped if encountered unmatched.
|
void |
open(Object o,
Attributes attributes)
Called by TagHandler.startElement to consume attributes.
|
String getTag()
R getItem(T t)
t - a context objectTag<T,R> getSelf()
void open(Object o, Attributes attributes)
default TagModel<? super R> getTagModel()
null
if there are no children.default boolean isChoice()
default boolean isOptional()
default boolean isMultiple()
default java.util.function.BiConsumer<R,Attributes> getOpener()
default java.util.function.BiConsumer<R,String> getCloser()
default java.util.function.BiConsumer<Tag<T,R>,R> getValidator()
Copyright © 2021. All rights reserved.