Package org.jsoup.parser
Class Token
- java.lang.Object
-
- org.jsoup.parser.Token
-
- Direct Known Subclasses:
Token.Character
,Token.Comment
,Token.Doctype
,Token.EOF
,Token.Tag
abstract class Token extends java.lang.Object
Parse tokens for the Tokeniser.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Token.CData
(package private) static class
Token.Character
(package private) static class
Token.Comment
(package private) static class
Token.Doctype
(package private) static class
Token.EndTag
(package private) static class
Token.EOF
(package private) static class
Token.StartTag
(package private) static class
Token.Tag
static class
Token.TokenType
-
Field Summary
Fields Modifier and Type Field Description (package private) Token.TokenType
type
-
Constructor Summary
Constructors Modifier Constructor Description private
Token()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) Token.Character
asCharacter()
(package private) Token.Comment
asComment()
(package private) Token.Doctype
asDoctype()
(package private) Token.EndTag
asEndTag()
(package private) Token.StartTag
asStartTag()
(package private) boolean
isCData()
(package private) boolean
isCharacter()
(package private) boolean
isComment()
(package private) boolean
isDoctype()
(package private) boolean
isEndTag()
(package private) boolean
isEOF()
(package private) boolean
isStartTag()
(package private) abstract Token
reset()
Reset the data represent by this token, for reuse.(package private) static void
reset(java.lang.StringBuilder sb)
(package private) java.lang.String
tokenType()
-
-
-
Field Detail
-
type
Token.TokenType type
-
-
Method Detail
-
tokenType
java.lang.String tokenType()
-
reset
abstract Token reset()
Reset the data represent by this token, for reuse. Prevents the need to create transfer objects for every piece of data, which immediately get GCed.
-
reset
static void reset(java.lang.StringBuilder sb)
-
isDoctype
final boolean isDoctype()
-
asDoctype
final Token.Doctype asDoctype()
-
isStartTag
final boolean isStartTag()
-
asStartTag
final Token.StartTag asStartTag()
-
isEndTag
final boolean isEndTag()
-
asEndTag
final Token.EndTag asEndTag()
-
isComment
final boolean isComment()
-
asComment
final Token.Comment asComment()
-
isCharacter
final boolean isCharacter()
-
isCData
final boolean isCData()
-
asCharacter
final Token.Character asCharacter()
-
isEOF
final boolean isEOF()
-
-