public final class HTMLNamedEntitiesParser extends Object
Because it is stateless, it delegates the state handling to the user in the sense of how many characters one saw and when to stop doing things.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
HTMLNamedEntitiesParser.RootState
This is our initial state and has a special optimization applied.
|
static class |
HTMLNamedEntitiesParser.State
Our "level" in the treeish structure that keeps its static state and the next level
underneath.
|
| Modifier and Type | Method and Description |
|---|---|
static HTMLNamedEntitiesParser |
get()
Returns the singleton.
|
HTMLNamedEntitiesParser.State |
lookup(int character,
HTMLNamedEntitiesParser.State state)
Pseudo parses and entity character by character.
|
HTMLNamedEntitiesParser.State |
lookup(String entityName)
Utility method, mostly for testing, that allows us to look up and entity from a string
instead from single characters.
|
String |
lookupEntityRefFor(String key) |
public static HTMLNamedEntitiesParser get()
public HTMLNamedEntitiesParser.State lookup(String entityName)
entityName - the entity to look uppublic HTMLNamedEntitiesParser.State lookup(int character, HTMLNamedEntitiesParser.State state)
character - the next character, should not be the ampersand everstate - the last known state or null in case we start to parseHTMLNamedEntitiesParser.StateCopyright © 2024 HtmlUnit. All rights reserved.