Package org.teiid.language
Class Argument
- java.lang.Object
-
- org.teiid.language.BaseLanguageObject
-
- org.teiid.language.Argument
-
- All Implemented Interfaces:
LanguageObject
,MetadataReference<ProcedureParameter>
public class Argument extends BaseLanguageObject implements MetadataReference<ProcedureParameter>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Argument.Direction
-
Constructor Summary
Constructors Constructor Description Argument(Argument.Direction direction, Class<?> type, ProcedureParameter metadataObject)
Typical constructor for an out/return parameterArgument(Argument.Direction direction, Expression value, Class<?> type, ProcedureParameter metadataObject)
Argument(Argument.Direction direction, Literal value, ProcedureParameter metadataObject)
Typical constructor for an in/in out parameter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptVisitor(LanguageObjectVisitor visitor)
Literal
getArgumentValue()
Get the argument as aLiteral
value.Argument.Direction
getDirection()
Expression
getExpression()
ProcedureParameter
getMetadataObject()
Class<?>
getType()
void
setArgumentValue(Literal value)
void
setDirection(Argument.Direction direction)
void
setExpression(Expression ex)
void
setMetadataObject(ProcedureParameter metadataObject)
void
setType(Class<?> type)
-
Methods inherited from class org.teiid.language.BaseLanguageObject
toString
-
-
-
-
Constructor Detail
-
Argument
public Argument(Argument.Direction direction, Expression value, Class<?> type, ProcedureParameter metadataObject)
-
Argument
public Argument(Argument.Direction direction, Class<?> type, ProcedureParameter metadataObject)
Typical constructor for an out/return parameter- Parameters:
direction
-type
-metadataObject
-
-
Argument
public Argument(Argument.Direction direction, Literal value, ProcedureParameter metadataObject)
Typical constructor for an in/in out parameter- Parameters:
direction
-value
-metadataObject
-
-
-
Method Detail
-
getDirection
public Argument.Direction getDirection()
-
getArgumentValue
public Literal getArgumentValue()
Get the argument as aLiteral
value. Will throw aClassCastException
if theExpression
is not aLiteral
.- Returns:
- the value or null if this is an non-in parameter
-
getType
public Class<?> getType()
-
setType
public void setType(Class<?> type)
-
acceptVisitor
public void acceptVisitor(LanguageObjectVisitor visitor)
- Specified by:
acceptVisitor
in interfaceLanguageObject
-
setDirection
public void setDirection(Argument.Direction direction)
-
setArgumentValue
public void setArgumentValue(Literal value)
-
getMetadataObject
public ProcedureParameter getMetadataObject()
- Specified by:
getMetadataObject
in interfaceMetadataReference<ProcedureParameter>
-
setMetadataObject
public void setMetadataObject(ProcedureParameter metadataObject)
-
getExpression
public Expression getExpression()
-
setExpression
public void setExpression(Expression ex)
-
-