org.hackystat.telemetry.analyzer.language.ast
Class TelemetryStreamsDefinition

java.lang.Object
  extended by org.hackystat.telemetry.analyzer.language.ast.TelemetryDefinition
      extended by org.hackystat.telemetry.analyzer.language.ast.TelemetryStreamsDefinition

public class TelemetryStreamsDefinition
extends TelemetryDefinition

Definition for telemetry "streams" object. A streams object consists of one or more telemetry streams.

Version:
$Id$
Author:
(Cedric) Qin Zhang

Constructor Summary
TelemetryStreamsDefinition(java.lang.String name, Expression expression, Variable[] variables, TextPosition textPosition)
          Constucts this instance.
 
Method Summary
 java.lang.String getDescription()
          Gets the description of this telemetry "streams" object.
 Expression getExpression()
          Gets the expression that defines this telemetry "streams" object.
 Variable[] getVariables()
          Gets an array of variables used in the definition.
 void setDescription(java.lang.String description)
          Sets the description.
 
Methods inherited from class org.hackystat.telemetry.analyzer.language.ast.TelemetryDefinition
getDefinitionString, getName, getTextPosition, setDefinitionString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TelemetryStreamsDefinition

public TelemetryStreamsDefinition(java.lang.String name,
                                  Expression expression,
                                  Variable[] variables,
                                  TextPosition textPosition)
                           throws TelemetryLanguageException
Constucts this instance.

Parameters:
name - The name of this definition.
expression - The expression that defines this telemetry "streams" object.
variables - The variables used in the expression. Variables are essentially holding places so that real value can be swapped in when the expression is evaluated. Null is valid if there is no variable used in this definition.
textPosition - The text position of the definition string in the input.
Throws:
TelemetryLanguageException - If the variable array contains duplicated variable declaration or does not declare all variables needed by the expression.
Method Detail

getExpression

public Expression getExpression()
Gets the expression that defines this telemetry "streams" object.

Returns:
The expression.

getVariables

public Variable[] getVariables()
Gets an array of variables used in the definition.

Returns:
An array of Varaible objects. If there is no variable used, then an empty array is returned.

getDescription

public java.lang.String getDescription()
Gets the description of this telemetry "streams" object.

Returns:
The description.

setDescription

public void setDescription(java.lang.String description)
Sets the description.

Parameters:
description - The description.