Package org.teiid.language
Class Function
- java.lang.Object
-
- org.teiid.language.BaseLanguageObject
-
- org.teiid.language.Function
-
- All Implemented Interfaces:
Expression
,LanguageObject
,MetadataReference<FunctionMethod>
- Direct Known Subclasses:
AggregateFunction
public class Function extends BaseLanguageObject implements Expression, MetadataReference<FunctionMethod>
Represents a function. A function has a name and 0..n Expressions that are parameters.
-
-
Constructor Summary
Constructors Constructor Description Function(String name, List<? extends Expression> params, Class<?> type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptVisitor(LanguageObjectVisitor visitor)
FunctionMethod
getMetadataObject()
String
getName()
Get name of the functionList<Expression>
getParameters()
Get the parameters used in this function.Class<?>
getType()
Determine the type returned by this expression.void
setMetadataObject(FunctionMethod metadataObject)
void
setName(String name)
Set name of the functionvoid
setType(Class<?> type)
-
Methods inherited from class org.teiid.language.BaseLanguageObject
toString
-
-
-
-
Constructor Detail
-
Function
public Function(String name, List<? extends Expression> params, Class<?> type)
-
-
Method Detail
-
getMetadataObject
public FunctionMethod getMetadataObject()
- Specified by:
getMetadataObject
in interfaceMetadataReference<FunctionMethod>
-
setMetadataObject
public void setMetadataObject(FunctionMethod metadataObject)
-
getName
public String getName()
Get name of the function- Returns:
- Function name
-
getParameters
public List<Expression> getParameters()
Get the parameters used in this function.- Returns:
- List of Expression defining the parameters
-
acceptVisitor
public void acceptVisitor(LanguageObjectVisitor visitor)
- Specified by:
acceptVisitor
in interfaceLanguageObject
-
setName
public void setName(String name)
Set name of the function- Parameters:
name
- Function name
-
getType
public Class<?> getType()
Description copied from interface:Expression
Determine the type returned by this expression.- Specified by:
getType
in interfaceExpression
- Returns:
- The type, as defined by a Java class
-
setType
public void setType(Class<?> type)
-
-