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 void
acceptVisitor(LanguageObjectVisitor visitor)
Class<?>
getType()
Determine the type returned by this expression.Object
getValue()
boolean
isBindEligible()
Set by the optimizer if the literal was created by the evaluation of another expression.void
setBindEligible(boolean isBindEligible)
void
setType(Class<?> type)
void
setValue(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:
acceptVisitor
in interfaceLanguageObject
-
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
-
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)
-
-