Package mondrian.olap.fun
Class FunTableImpl
- java.lang.Object
-
- mondrian.olap.fun.FunTableImpl
-
- All Implemented Interfaces:
FunTable
- Direct Known Subclasses:
BuiltinFunTable
,CustomizedFunctionTable
,GlobalFunTable
public abstract class FunTableImpl extends Object implements FunTable
Abstract implementation ofFunTable
.The derived class must implement
FunTable.defineFunctions(mondrian.olap.FunTable.Builder)
to define each function which will be recognized by this table. This method is called from the constructor, after which point, no further functions can be added.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface mondrian.olap.FunTable
FunTable.Builder
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FunTableImpl()
Creates a FunTableImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<FunInfo>
getFunInfoList()
Returns a list ofFunInfo
objects.List<String>
getReservedWords()
Returns a list of words (String
) which may not be used as identifiers.List<Resolver>
getResolvers()
Returns a list ofResolver
objects.List<Resolver>
getResolvers(String name, Syntax syntax)
Returns a list of resolvers for an operator with a given name and syntax.void
init()
Initializes the function table.boolean
isProperty(String s)
Returns whether a string is a property-style (postfix) operator.boolean
isReserved(String s)
Returns whether a string is a reserved word.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface mondrian.olap.FunTable
defineFunctions
-
-
-
-
Method Detail
-
init
public final void init()
Initializes the function table.
-
getReservedWords
public List<String> getReservedWords()
Description copied from interface:FunTable
Returns a list of words (String
) which may not be used as identifiers.- Specified by:
getReservedWords
in interfaceFunTable
-
isReserved
public boolean isReserved(String s)
Description copied from interface:FunTable
Returns whether a string is a reserved word.- Specified by:
isReserved
in interfaceFunTable
-
getResolvers
public List<Resolver> getResolvers()
Description copied from interface:FunTable
Returns a list ofResolver
objects.- Specified by:
getResolvers
in interfaceFunTable
-
isProperty
public boolean isProperty(String s)
Description copied from interface:FunTable
Returns whether a string is a property-style (postfix) operator. This is used during parsing to disambiguate functions from unquoted member names.- Specified by:
isProperty
in interfaceFunTable
-
getFunInfoList
public List<FunInfo> getFunInfoList()
Description copied from interface:FunTable
Returns a list ofFunInfo
objects.- Specified by:
getFunInfoList
in interfaceFunTable
-
getResolvers
public List<Resolver> getResolvers(String name, Syntax syntax)
Description copied from interface:FunTable
Returns a list of resolvers for an operator with a given name and syntax. Never returns null; if there are no resolvers, returns the empty list.- Specified by:
getResolvers
in interfaceFunTable
- Parameters:
name
- Operator namesyntax
- Operator syntax- Returns:
- List of resolvers for the operator
-
-