001 package org.hackystat.telemetry.analyzer.language.ast; 002 003 /** 004 * Draw command to render telemetry charts or reports. 005 * 006 * @author (Cedric) Qin ZHANG 007 * @version $Id$ 008 */ 009 public class DrawCommand extends TelemetryDefinition { 010 011 private String telemetryDefinitionName; 012 private Constant[] parameters; 013 014 /** 015 * Constructs this instance. 016 * 017 * @param telemetryDefinitionName The name of the telemetry object definition. 018 * @param parameters An array of <code>Constant</code> objects that need to pass to the 019 * telemetry definition to render it. Null is a valid if there is no parameter needed. 020 * @param textPosition The text position of the definition string in the input. 021 */ 022 public DrawCommand(String telemetryDefinitionName, Constant[] parameters, 023 TextPosition textPosition) { 024 super(null, textPosition); 025 this.telemetryDefinitionName = telemetryDefinitionName; 026 this.parameters = parameters == null ? new Constant[0] : parameters; 027 } 028 029 /** 030 * Gets the name of the telemetry object definition. 031 * 032 * @return The name. 033 */ 034 public String getTelemetryDefinitionName() { 035 return this.telemetryDefinitionName; 036 } 037 038 /** 039 * Gets the parameters. 040 * 041 * @return The parameters that need to pass to the referenced telemetry object. 042 */ 043 public Constant[] getParameters() { 044 return this.parameters; 045 } 046 }