Package org.teiid.query.sql.symbol
Class ExpressionSymbol
- java.lang.Object
-
- org.teiid.query.sql.symbol.Symbol
-
- org.teiid.query.sql.symbol.ExpressionSymbol
-
- All Implemented Interfaces:
Cloneable,LanguageObject,DerivedExpression,Expression
public class ExpressionSymbol extends Symbol implements DerivedExpression
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.teiid.query.sql.LanguageObject
LanguageObject.Util
-
-
Field Summary
-
Fields inherited from class org.teiid.query.sql.symbol.Symbol
outputName, SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description ExpressionSymbol(String name, Expression expression)Construct an ExpressionSymbol with name and expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptVisitor(LanguageVisitor visitor)Method for accepting a visitor.Objectclone()Return a deep copy of this objectbooleanequals(Object obj)ExpressionSymbol matching is not based upon the nameExpressiongetExpression()Get the expression for this symbolClassgetType()Get the type of the symbolinthashCode()Return a hash code for this symbol.voidsetExpression(Expression expression)Set the expression represented by this symbol.-
Methods inherited from class org.teiid.query.sql.symbol.Symbol
getName, getName, getOutputName, getOutputName, getShortName, getShortName, getShortName, setName, setOutputName, setShortName, toString
-
-
-
-
Constructor Detail
-
ExpressionSymbol
public ExpressionSymbol(String name, Expression expression)
Construct an ExpressionSymbol with name and expression.
-
-
Method Detail
-
getExpression
public Expression getExpression()
Get the expression for this symbol- Returns:
- Expression for this symbol
-
setExpression
public void setExpression(Expression expression)
Set the expression represented by this symbol.- Parameters:
expression- Expression for this expression symbol
-
getType
public Class getType()
Get the type of the symbol- Specified by:
getTypein interfaceExpression- Returns:
- Type of the symbol, may be null before resolution
-
acceptVisitor
public void acceptVisitor(LanguageVisitor visitor)
Description copied from interface:LanguageObjectMethod for accepting a visitor. It is the responsibility of the language object to call back on the visitor.- Specified by:
acceptVisitorin interfaceLanguageObject- Parameters:
visitor- Visitor being used
-
clone
public Object clone()
Return a deep copy of this object- Specified by:
clonein interfaceLanguageObject- Specified by:
clonein classSymbol- Returns:
- Deep copy of this object
-
hashCode
public int hashCode()
Description copied from class:SymbolReturn a hash code for this symbol.- Overrides:
hashCodein classSymbol- Returns:
- Hash code
- See Also:
Symbol.hashCode()
-
equals
public boolean equals(Object obj)
ExpressionSymbol matching is not based upon the name- Overrides:
equalsin classSymbol- Parameters:
obj- Other object- Returns:
- True if other obj is a Symbol (or subclass) and name is equal
- See Also:
Symbol.equals(java.lang.Object)
-
-