TagRule
BlockExtractingRule
, BodyTagRule
, DivExtractingPageParser.TopLevelDivExtractingRule
, FramesetRule
, HtmlAttributesRule
, MetaTagRule
, ParameterExtractingRule
, StateTransitionRule
, TagReplaceRule
public abstract class BasicRule extends Object implements TagRule
Modifier and Type | Field | Description |
---|---|---|
private String[] |
acceptableTagNames |
|
protected HTMLProcessorContext |
context |
Modifier | Constructor | Description |
---|---|---|
protected |
BasicRule() |
|
protected |
BasicRule(String acceptableTagName) |
|
protected |
BasicRule(String[] acceptableTagNames) |
Modifier and Type | Method | Description |
---|---|---|
protected CharArray |
currentBuffer() |
|
abstract void |
process(Tag tag) |
|
void |
setContext(HTMLProcessorContext context) |
|
boolean |
shouldProcess(String name) |
Called by the HTMLProcessor to determine if a rule should be called for a given tag.
|
private final String[] acceptableTagNames
protected HTMLProcessorContext context
protected BasicRule(String[] acceptableTagNames)
protected BasicRule(String acceptableTagName)
protected BasicRule()
public void setContext(HTMLProcessorContext context)
setContext
in interface TagRule
public boolean shouldProcess(String name)
TagRule
shouldProcess
in interface TagRule
protected CharArray currentBuffer()