|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.plotnix.jex.Compiler | +--com.plotnix.jex.MultilingualCompiler
A MultilingualCompiler determines the language for each expression and then compiles it using that language's compiler.
If the expression string passed to this compiler starts with
"language:"
, the compiler strips the prefix off and
passes the remainder of the expression to the compiler for
the corresponding language.
The prefix is required if the MultilingualCompiler's default language is null.
If the default language is not null and the expression is missing a prefix, or the prefix does not match an existing compiler, the multilingual compiler passes the expression unchanged to the default language compiler.
Method Summary | |
Expression |
compileExpression(java.lang.String expression)
Compiles an expression intended for evaluation using the appropriate compiler. |
IterationExpression |
compileIterationExpression(java.lang.String expression)
Compiles an expression that describes an iteration. |
VariableExpression |
compileVariableExpression(java.lang.String expression)
Compiles an expression intended to serve as the left hand side of an assignment. |
static Compiler |
getMultilingualCompiler(java.lang.String defaultLanguage)
Returns a MultilingualCompiler with the specified default language. |
Methods inherited from class com.plotnix.jex.Compiler |
getCompiler, getCompilerImplementation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static final Compiler getMultilingualCompiler(java.lang.String defaultLanguage)
defaultLanguage
- is the default language or nullpublic Expression compileExpression(java.lang.String expression)
compileExpression
in class Compiler
expression
- is the expression to be compiled with
an optional "lang:" prefixpublic IterationExpression compileIterationExpression(java.lang.String expression)
compileIterationExpression
in class Compiler
compileExpression(String)
public VariableExpression compileVariableExpression(java.lang.String expression)
compileVariableExpression
in class Compiler
compileExpression(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |