org.teiid.language
Class Function

java.lang.Object
  extended by org.teiid.language.BaseLanguageObject
      extended by org.teiid.language.Function
All Implemented Interfaces:
Expression, LanguageObject, MetadataReference<FunctionMethod>

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
Function(java.lang.String name, java.util.List<? extends Expression> params, java.lang.Class<?> type)
           
 
Method Summary
 void acceptVisitor(LanguageObjectVisitor visitor)
           
 FunctionMethod getMetadataObject()
           
 java.lang.String getName()
          Get name of the function
 java.util.List<Expression> getParameters()
          Get the parameters used in this function.
 java.lang.Class<?> getType()
          Determine the type returned by this expression.
 void setMetadataObject(FunctionMethod metadataObject)
           
 void setName(java.lang.String name)
          Set name of the function
 void setType(java.lang.Class<?> type)
           
 
Methods inherited from class org.teiid.language.BaseLanguageObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Function

public Function(java.lang.String name,
                java.util.List<? extends Expression> params,
                java.lang.Class<?> type)
Method Detail

getMetadataObject

public FunctionMethod getMetadataObject()
Specified by:
getMetadataObject in interface MetadataReference<FunctionMethod>

setMetadataObject

public void setMetadataObject(FunctionMethod metadataObject)

getName

public java.lang.String getName()
Get name of the function

Returns:
Function name

getParameters

public java.util.List<Expression> getParameters()
Get the parameters used in this function.

Returns:
Array of IExpressions defining the parameters

acceptVisitor

public void acceptVisitor(LanguageObjectVisitor visitor)
Specified by:
acceptVisitor in interface LanguageObject

setName

public void setName(java.lang.String name)
Set name of the function

Parameters:
name - Function name

getType

public java.lang.Class<?> getType()
Description copied from interface: Expression
Determine the type returned by this expression.

Specified by:
getType in interface Expression
Returns:
The type, as defined by a Java class

setType

public void setType(java.lang.Class<?> type)


Copyright © 2011. All Rights Reserved.