Class Result


  • public class Result
    extends Object
    The Result class stores result of execution some operation and command for VM which operation must be next.
    • Constructor Detail

      • Result

        public Result​(ReturnType returnType)
        Create an instance of Result for 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 of Result for operation which returned value. Initialized with order to compiler what to do after current operation.
        Parameters:
        returnType - Order to compiler
        returnValue - 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