1 /* 2 * ASWhileStatement.java 3 * 4 * Copyright (c) 2007-2008 David Holroyd 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 package uk.co.badgersinfoil.metaas.dom; 20 21 22 /** 23 * A while-loop, such as <code>while (test()) { }</code>. 24 * 25 * <p>e.g. The Java code...</p> 26 * <pre class="eg">ASWhileStatement whileStmt = method.newWhile("test()"); 27 *whileStmt.addStmt("trace('hello')");</pre> 28 * 29 * <p>...will produce the ActionScript code...</p> 30 * <pre class="eg">while (test()) { 31 * trace('hello'); 32 *}</pre> 33 * 34 * @see StatementContainer#newWhile(Expression) 35 */ 36 public interface ASWhileStatement extends Statement, StatementContainer { 37 38 public String getConditionString(); 39 public Expression getCondition(); 40 public void setCondition(String expr); 41 public void setCondition(Expression expr); 42 public Statement getBody(); 43 }