Package mondrian.calc.impl
Class BetterExpCompiler
- java.lang.Object
-
- mondrian.calc.impl.AbstractExpCompiler
-
- mondrian.calc.impl.BetterExpCompiler
-
- All Implemented Interfaces:
ExpCompiler
public class BetterExpCompiler extends AbstractExpCompiler
Enhanced expression compiler. It can generate code to convert between scalar types.- Since:
- Sep 29, 2005
- Author:
- jhyde
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface mondrian.calc.ExpCompiler
ExpCompiler.Factory
-
-
Constructor Summary
Constructors Constructor Description BetterExpCompiler(Evaluator evaluator, Validator validator)
BetterExpCompiler(Evaluator evaluator, Validator validator, List<ResultStyle> resultStyles)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListCalc
compileList(Exp exp, boolean mutable)
Compiles an expression which yieldsTupleList
result.TupleCalc
compileTuple(Exp exp)
Compiles an expression which yields a tuple result.-
Methods inherited from class mondrian.calc.impl.AbstractExpCompiler
compile, compileAs, compileBoolean, compileDateTime, compileDimension, compileDouble, compileHierarchy, compileInteger, compileIter, compileLevel, compileList, compileMember, compileScalar, compileString, getAcceptableResultStyles, getEvaluator, getValidator, registerParameter, toList
-
-
-
-
Method Detail
-
compileTuple
public TupleCalc compileTuple(Exp exp)
Description copied from interface:ExpCompiler
Compiles an expression which yields a tuple result.- Specified by:
compileTuple
in interfaceExpCompiler
- Overrides:
compileTuple
in classAbstractExpCompiler
- Parameters:
exp
- Expression- Returns:
- Calculator which yields a tuple
-
compileList
public ListCalc compileList(Exp exp, boolean mutable)
Description copied from interface:ExpCompiler
Compiles an expression which yieldsTupleList
result.Such an expression is generally a list of
Member
objects or a list of tuples (each represented by aMember
array).- Specified by:
compileList
in interfaceExpCompiler
- Overrides:
compileList
in classAbstractExpCompiler
- Parameters:
exp
- Expressionmutable
- Whether resulting list is mutable
-
-