|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.w3c.www.protocol.http.proxy.RuleParser
public class RuleParser
A simple Rule parser.
| Constructor Summary | |
|---|---|
RuleParser(java.io.InputStream in)
Create a rule parser to parse the given input stream. |
|
| Method Summary | |
|---|---|
protected void |
addRule(java.lang.String[] lhs,
Rule rule)
Add a mapping for the given rule in our rule node. |
RuleNode |
parse()
Parse the our input stream into a RuleNode instance. |
protected void |
parseRule(java.lang.String[] tokens,
int toklen)
Create a suitable rule mapping for the tokenized rule. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RuleParser(java.io.InputStream in)
| Method Detail |
|---|
protected void addRule(java.lang.String[] lhs,
Rule rule)
lhs - The rule left hand side, as a parsed String array.rule - The mapped rule instance.
protected void parseRule(java.lang.String[] tokens,
int toklen)
throws RuleParserException
tokens - The rule tokens, as a String array.toklen - Number of tokens in above array.
RuleParserException - if parsing failed.
public RuleNode parse()
throws RuleParserException,
java.io.IOException
java.io.IOException - If reading the rule input stream failed.
RuleParserException - If some invalid rule syntax was
detected.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||