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 void
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.Object
clone()
Return a deep copy of this objectboolean
equals(Object obj)
ExpressionSymbol matching is not based upon the nameExpression
getExpression()
Get the expression for this symbolClass
getType()
Get the type of the symbolint
hashCode()
Return a hash code for this symbol.void
setExpression(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:
getType
in interfaceExpression
- Returns:
- Type of the symbol, may be null before resolution
-
acceptVisitor
public void acceptVisitor(LanguageVisitor visitor)
Description copied from interface:LanguageObject
Method for accepting a visitor. It is the responsibility of the language object to call back on the visitor.- Specified by:
acceptVisitor
in interfaceLanguageObject
- Parameters:
visitor
- Visitor being used
-
clone
public Object clone()
Return a deep copy of this object- Specified by:
clone
in interfaceLanguageObject
- Specified by:
clone
in classSymbol
- Returns:
- Deep copy of this object
-
hashCode
public int hashCode()
Description copied from class:Symbol
Return a hash code for this symbol.- Overrides:
hashCode
in classSymbol
- Returns:
- Hash code
- See Also:
Symbol.hashCode()
-
equals
public boolean equals(Object obj)
ExpressionSymbol matching is not based upon the name- Overrides:
equals
in 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)
-
-