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(String name, AttrBuilder attrs)
name
- the name of the tagattrs
- the attributespublic Tag(AttrBuilder attrs)
null
in this case.attrs
- the attributespublic String getName()
public Tag setName(String name)
name
- the namepublic AttrBuilder getAttrs()
public Tag setAttrs(AttrBuilder attrs)
attrs
- the attributes to setpublic Tag printlnStart(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 writerpublic Tag printlnEnd(Writer out) throws IOException
out
- the writerIOException
- if there's a problem while printing to the writer"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"