Package mondrian.mdx
Class ResolvedFunCall
- java.lang.Object
-
- mondrian.olap.QueryPart
-
- mondrian.olap.ExpBase
-
- mondrian.mdx.ResolvedFunCall
-
public final class ResolvedFunCall extends ExpBase implements FunCall
AResolvedFunCall
is a function applied to a list of operands, which has been validated and resolved to afunction definition
.- Since:
- Jan 6, 2006
- Author:
- jhyde
-
-
Constructor Summary
Constructors Constructor Description ResolvedFunCall(FunDef funDef, Exp[] args, Type returnType)
Creates a function call.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Calc
accept(ExpCompiler compiler)
Converts this expression into an a tree of expressions which can be efficiently evaluated.Object
accept(MdxVisitor visitor)
Accepts a visitor to this Exp.Exp
accept(Validator validator)
Validates this expression.ResolvedFunCall
clone()
Exp
getArg(int index)
Returns the Exp argument at the specified index.int
getArgCount()
Returns the number of arguments.Exp[]
getArgs()
Returns the internal array of Exp arguments.int
getCategory()
Returns theCategory
of the expression.Object[]
getChildren()
FunDef
getFunDef()
Returns the definition of the function which is being called.String
getFunName()
Returns the name of the function.Syntax
getSyntax()
Returns the syntax of the call.Type
getType()
Returns the type of this expression.String
toString()
void
unparse(PrintWriter pw)
Writes a string representation of this parse tree node to the given writer.-
Methods inherited from class mondrian.olap.ExpBase
cloneArray, getTypes, unparseList
-
-
-
-
Method Detail
-
clone
public ResolvedFunCall clone()
-
getArg
public Exp getArg(int index)
Returns the Exp argument at the specified index.
-
getArgs
public Exp[] getArgs()
Returns the internal array of Exp arguments.Note: this does NOT do a copy.
-
getArgCount
public final int getArgCount()
Returns the number of arguments.- Specified by:
getArgCount
in interfaceFunCall
- Returns:
- number of arguments.
- See Also:
getArgs()
-
getFunName
public String getFunName()
Description copied from interface:FunCall
Returns the name of the function.- Specified by:
getFunName
in interfaceFunCall
-
getSyntax
public Syntax getSyntax()
Description copied from interface:FunCall
Returns the syntax of the call.
-
getChildren
public Object[] getChildren()
- Overrides:
getChildren
in classQueryPart
-
getFunDef
public FunDef getFunDef()
Returns the definition of the function which is being called.- Returns:
- function definition
-
getCategory
public final int getCategory()
Description copied from interface:Exp
Returns theCategory
of the expression.- Specified by:
getCategory
in interfaceExp
-
getType
public final Type getType()
Description copied from interface:Exp
Returns the type of this expression. Never null.
-
accept
public Exp accept(Validator validator)
Description copied from interface:Exp
Validates this expression. The validator acts in the role of 'visitor' (see Gang of Four 'visitor pattern'), and an expression in the role of 'visitee'.
-
unparse
public void unparse(PrintWriter pw)
Description copied from class:QueryPart
Writes a string representation of this parse tree node to the given writer.
-
accept
public Calc accept(ExpCompiler compiler)
Description copied from interface:Exp
Converts this expression into an a tree of expressions which can be efficiently evaluated.
-
accept
public Object accept(MdxVisitor visitor)
Description copied from interface:Exp
Accepts a visitor to this Exp. The implementation should generally dispatches to theMdxVisitor.visit(mondrian.olap.Query)
method appropriate to the type of expression.
-
-