uk.co.badgersinfoil.metaas.dom
Interface ASReturnStatement

All Superinterfaces:
Statement

public interface ASReturnStatement
extends Statement

A statement that exits the current ActionScript method or function, optionally returning a value to the caller.

Instances can be created using StatementContainer.newReturn(String):

ASExpressionStatement stmt = method.newReturn(null);

Will result in ActionScript code like,

return;

or, with an expression,this Java code,

ASExpressionStatement stmt = method.newReturn("doIt()");

will result in ActionScript code like,

return doIt();


Method Summary
 java.lang.String getExpressionString()
          Returns a string representation of the expression who's value this statement would return when executed, or null if there is no such expression.
 void setExpression(java.lang.String expr)
          Changes the expression that this statement would return when executed.
 

Method Detail

getExpressionString

java.lang.String getExpressionString()
Returns a string representation of the expression who's value this statement would return when executed, or null if there is no such expression.


setExpression

void setExpression(java.lang.String expr)
Changes the expression that this statement would return when executed. If null is given, any expression will be removed.

Throws:
SyntaxException - if the given string is not null and is not a valid ActionScript expression.


Copyright © 2006-2007 David Holroyd. All Rights Reserved.