Package org.openl.rules.tbasic.runtime
Class Result
- java.lang.Object
-
- org.openl.rules.tbasic.runtime.Result
-
public class Result extends Object
TheResultclass stores result of execution some operation and command for VM which operation must be next.
-
-
Constructor Summary
Constructors Constructor Description Result(ReturnType returnType)Create an instance ofResultfor operation which didn't return any value.Result(ReturnType returnType, Object returnValue)Create an instance ofResultfor operation which returned value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReturnTypegetReturnType()ObjectgetValue()voidsetReturnType(ReturnType returnType)
-
-
-
Constructor Detail
-
Result
public Result(ReturnType returnType)
Create an instance ofResultfor operation which didn't return any value. Initialized with order to compiler what to do after current operation.- Parameters:
returnType- Order to compiler
-
Result
public Result(ReturnType returnType, Object returnValue)
Create an instance ofResultfor operation which returned value. Initialized with order to compiler what to do after current operation.- Parameters:
returnType- Order to compilerreturnValue- Result of execution of operation.
-
-
Method Detail
-
getReturnType
public ReturnType getReturnType()
- Returns:
- the returnType
-
getValue
public Object getValue()
- Returns:
- Result of execution of operation.
-
setReturnType
public void setReturnType(ReturnType returnType)
- Parameters:
returnType- the returnType to set
-
-