|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bc.jexp.impl.ParserImpl
public final class ParserImpl
A default implementation for the com.bc.jexp.Parser interface.
| Constructor Summary | |
|---|---|
ParserImpl()
Constructs a new parser instance which uses a DefaultNamespace and type-checking enabled. |
|
ParserImpl(boolean typeChecking)
Constructs a new parser instance which uses a DefaultNamespace and the given type-checking setting. |
|
ParserImpl(Namespace namespace)
Constructs a new parser instance which uses the given namespace and type-checking enabled. |
|
ParserImpl(Namespace namespace,
boolean typeChecking)
Constructs a new parser instance which uses the given namespace and the given type-checking setting. |
|
| Method Summary | |
|---|---|
Namespace |
getDefaultNamespace()
Gets this parser's default namespace. |
boolean |
isTypeChecking()
Gets whether or not this parser performs type checking on expressions. |
Term |
parse(String code)
Parses the expression given in the code string. |
Term |
parse(String code,
Namespace namespace)
Parses the expression given in the code string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ParserImpl()
DefaultNamespace and type-checking enabled.
public ParserImpl(boolean typeChecking)
DefaultNamespace and the given type-checking setting.
typeChecking - if true, the parser performs strong type-checking on expressionspublic ParserImpl(Namespace namespace)
namespace - the environment used to resolve names.
public ParserImpl(Namespace namespace,
boolean typeChecking)
namespace - the environment used to resolve names.typeChecking - if true, the parser performs type checking on expressions| Method Detail |
|---|
public final Namespace getDefaultNamespace()
getDefaultNamespace in interface Parserpublic boolean isTypeChecking()
public final Term parse(String code)
throws ParseException
parse in interface Parsercode - the code string, for the syntax of valid expressions refer
to the class description
ParseException - if a parse reportError occurs
public final Term parse(String code,
Namespace namespace)
throws ParseException
parse in interface Parsercode - the code string, for the syntax of valid expressions refer
to the class descriptionnamespace - the environment which is used to resolve names
ParseException - if a parse error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||