public class Tag extends Object
| Constructor and Description |
|---|
Tag(AttrBuilder attrs)
Creates a tag with the given attributes.
|
Tag(String name,
AttrBuilder attrs)
Creates a tag with the given name and attributes.
|
| Modifier and Type | Method and Description |
|---|---|
AttrBuilder |
getAttrs()
Returns the attributes of the tag.
|
String |
getName()
Returns the name of the tag (e.g.
|
Tag |
printlnEnd(Writer out)
Println the end tag of this tag (e.g.
|
Tag |
printlnStart(Writer out)
Println the start tag of this tag (e.g.
|
Tag |
setAttrs(AttrBuilder attrs)
Sets attributes of the tag.
|
Tag |
setName(String name)
Sets the name of the tag.
|
public Tag(@CheckForNull String name, @Nonnull AttrBuilder attrs)
name - the name of the tagattrs - the attributespublic Tag(@Nonnull AttrBuilder attrs)
null in this case.attrs - the attributes@CheckForNull public String getName()
@Nonnull public Tag setName(@CheckForNull String name)
name - the name@Nonnull public AttrBuilder getAttrs()
@Nonnull public Tag setAttrs(@Nonnull AttrBuilder attrs)
attrs - the attributes to set@Nonnull public Tag printlnStart(@Nonnull Writer out) throws IOException
"<div class='class1'>"). Note that no escaping/encoding of the name
is performed.out - the writerIOException - if there's a problem while printing to the writer@Nonnull public Tag printlnEnd(@Nonnull Writer out) throws IOException
out - the writerIOException - if there's a problem while printing to the writerCopyright © 2010 - 2020 Adobe. All Rights Reserved