|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface StatementKind
Represents a kind of statement that can be part of a sequence, for example, a method call, constructor call, or primitive value declaration.
An implementing class C should additionally provide the following:
| Modifier and Type | Method and Description |
|---|---|
void |
appendCode(Variable newVar,
List<Variable> inputVars,
StringBuilder b)
Produces a Java source code representation of this statement and append it to the given StringBuilder. |
ExecutionOutcome |
execute(Object[] statementInput,
PrintStream out)
Executes this statement, given the inputs to the statement. |
List<Class<?>> |
getInputTypes()
Returns the (ordered) list of input types for this statement kind. |
Class<?> |
getOutputType()
Returns the type of this statement kind's output. |
String |
toParseableString()
Returns a string representation of this StatementKind, which can subsequently be used in this class's parse method. |
| Method Detail |
|---|
List<Class<?>> getInputTypes()
Class<?> getOutputType()
ExecutionOutcome execute(Object[] statementInput,
PrintStream out)
statementInput - array containing appropriate inputs to statementout - stream to output results of execution;
can be null if you don't want to print.
void appendCode(Variable newVar,
List<Variable> inputVars,
StringBuilder b)
String toParseableString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||