|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jini.config.ConfigurationFile.Parser
private class ConfigurationFile.Parser
Parses the input from the specified Reader and options, storing information about imports and entries by side effect.
Field Summary | |
---|---|
private StreamTokenizer |
st
The tokenizer to use for parsing |
Constructor Summary | |
---|---|
ConfigurationFile.Parser(Reader reader,
String[] options)
Adds the imports and entries parsed from the specified input stream, as well as overrides parsed from the specified options, starting with the second element. |
Method Summary | |
---|---|
private void |
createTokenizer(Reader reader)
Creates and sets the tokenizer using the specified reader. |
private String |
describeCurrentToken()
Returns a String that describes the current token. |
private ConfigurationFile.Literal |
getNumber(String val)
Parses a numeric literal and returns the value as a Literal. |
private void |
oops(String what)
Throws a ConfigurationException for an error described by the what argument. |
private ConfigurationFile.ParseNode[] |
parseArgs(ConfigurationFile.Entry inEntry,
char close)
Parses an ExprList and the trailing token specified by close. |
private void |
parseComponent(String component)
Parses a Component. |
private void |
parseEntry(String component,
String name)
Parses an Entry. |
(package private) ConfigurationFile.ParseNode |
parseExpr(ConfigurationFile.Entry inEntry)
Parses a string concatenation |
private void |
parseImport()
Parses an Import, updating classImports and onDemandImports. |
private ConfigurationFile.MethodCall |
parseMethodCall(ConfigurationFile.Entry inEntry,
String name)
Resolves a static method call and returns a MethodCall instance that describes the method and arguments for the call. |
private ConfigurationFile.ParseNode |
parseNewInstance(ConfigurationFile.Entry inEntry)
Parses a NewExpr except for the leading "new", and returns the constructed object. |
private void |
parseOverride()
Parses an Override . |
private void |
parseSource()
Parses imports and components from the source, and stores the results. |
(package private) ConfigurationFile.ParseNode |
parseSubExpr(ConfigurationFile.Entry inEntry)
Parses an Expr. |
private void |
syntax(String what)
Throws a ConfigurationException for a syntax error described by the what argument. |
private void |
token(char c)
Parses the next token from the stream, and generates a syntax error if the token does not equal the specified character. |
private String |
token(String what)
Parses the next token from the stream, and generates a syntax error if the token is not a TT_WORD. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private StreamTokenizer st
Constructor Detail |
---|
ConfigurationFile.Parser(Reader reader, String[] options) throws ConfigurationException
ConfigurationException
Method Detail |
---|
private void createTokenizer(Reader reader)
private void parseSource() throws ConfigurationException, IOException
ConfigurationException
IOException
private void parseImport() throws ConfigurationException, IOException
ConfigurationException
IOException
private void parseComponent(String component) throws ConfigurationException, IOException
ConfigurationException
IOException
private void parseEntry(String component, String name) throws ConfigurationException, IOException
ConfigurationException
IOException
private void parseOverride() throws ConfigurationException, IOException
ConfigurationException
IOException
private ConfigurationFile.ParseNode[] parseArgs(ConfigurationFile.Entry inEntry, char close) throws ConfigurationException, IOException
ConfigurationException
IOException
ConfigurationFile.ParseNode parseExpr(ConfigurationFile.Entry inEntry) throws ConfigurationException, IOException
ConfigurationException
IOException
ConfigurationFile.ParseNode parseSubExpr(ConfigurationFile.Entry inEntry) throws ConfigurationException, IOException
ConfigurationException
IOException
private ConfigurationFile.Literal getNumber(String val) throws ConfigurationException, IOException
ConfigurationException
IOException
private ConfigurationFile.ParseNode parseNewInstance(ConfigurationFile.Entry inEntry) throws ConfigurationException, IOException
ConfigurationException
IOException
private ConfigurationFile.MethodCall parseMethodCall(ConfigurationFile.Entry inEntry, String name) throws ConfigurationException, IOException
ConfigurationException
IOException
private void token(char c) throws ConfigurationException, IOException
ConfigurationException
IOException
private String token(String what) throws ConfigurationException, IOException
ConfigurationException
IOException
private void syntax(String what) throws ConfigurationException
ConfigurationException
private String describeCurrentToken()
private void oops(String what) throws ConfigurationException
ConfigurationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |