Package org.teiid.language
Class Literal
- java.lang.Object
-
- org.teiid.language.BaseLanguageObject
-
- org.teiid.language.Literal
-
- All Implemented Interfaces:
Expression,LanguageObject
public class Literal extends BaseLanguageObject implements Expression
Represents a literal value that is used in an expression. The value can be obtained and should match the type specified bygetType()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptVisitor(LanguageObjectVisitor visitor)Class<?>getType()Determine the type returned by this expression.ObjectgetValue()booleanisBindEligible()Set by the optimizer if the literal was created by the evaluation of another expression.voidsetBindEligible(boolean isBindEligible)voidsetType(Class<?> type)voidsetValue(Object value)-
Methods inherited from class org.teiid.language.BaseLanguageObject
toString
-
-
-
-
Method Detail
-
getValue
public Object getValue()
-
acceptVisitor
public void acceptVisitor(LanguageObjectVisitor visitor)
- Specified by:
acceptVisitorin interfaceLanguageObject
-
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
-
setValue
public void setValue(Object value)
-
setType
public void setType(Class<?> type)
-
isBindEligible
public boolean isBindEligible()
Set by the optimizer if the literal was created by the evaluation of another expression. Setting to true will not always result in the value being handled as a bind value.- Returns:
-
setBindEligible
public void setBindEligible(boolean isBindEligible)
-
-