public class Tag
extends java.lang.Object
Constructor and Description |
---|
Tag(AttrBuilder attrs)
Creates a tag with the given attributes.
|
Tag(java.lang.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.
|
java.lang.String |
getName()
Returns the name of the tag (e.g.
|
Tag |
printlnEnd(java.io.Writer out)
Println the end tag of this tag (e.g.
|
Tag |
printlnStart(java.io.Writer out)
Println the start tag of this tag (e.g.
|
Tag |
setAttrs(AttrBuilder attrs)
Sets attributes of the tag.
|
Tag |
setName(java.lang.String name)
Sets the name of the tag.
|
public Tag(@CheckForNull java.lang.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 java.lang.String getName()
@Nonnull public Tag setName(@CheckForNull java.lang.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 java.io.Writer out) throws java.io.IOException
"<div class='class1'>"
). Note that no escaping/encoding of the name
is performed.out
- the writerjava.io.IOException
- if there's a problem while printing to the writer@Nonnull public Tag printlnEnd(@Nonnull java.io.Writer out) throws java.io.IOException
out
- the writerjava.io.IOException
- if there's a problem while printing to the writerCopyright © 2010 - 2020 Adobe. All Rights Reserved