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 voidacceptVisitor(LanguageObjectVisitor visitor)FunctionMethodgetMetadataObject()StringgetName()Get name of the functionList<Expression>getParameters()Get the parameters used in this function.Class<?>getType()Determine the type returned by this expression.voidsetMetadataObject(FunctionMethod metadataObject)voidsetName(String name)Set name of the functionvoidsetType(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:
getMetadataObjectin 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:
acceptVisitorin interfaceLanguageObject
-
setName
public void setName(String name)
Set name of the function- Parameters:
name- Function name
-
getType
public Class<?> getType()
Description copied from interface:ExpressionDetermine the type returned by this expression.- Specified by:
getTypein interfaceExpression- Returns:
- The type, as defined by a Java class
-
setType
public void setType(Class<?> type)
-
-