koala.dynamicjava.interpreter.throwable
Class ReturnException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Error
          extended bykoala.dynamicjava.interpreter.error.ExecutionError
              extended bykoala.dynamicjava.interpreter.throwable.ReturnException
All Implemented Interfaces:
java.io.Serializable

public class ReturnException
extends ExecutionError

This error is thrown by an interpreted throw statement

See Also:
Serialized Form

Field Summary
 
Fields inherited from class koala.dynamicjava.interpreter.error.ExecutionError
SHOW_CAUSE_PROPERTY, SHOW_TRACE_PROPERTY, thrown
 
Constructor Summary
ReturnException(java.lang.String s, Node n)
          Constructs an ReturnException with a value
ReturnException(java.lang.String s, java.lang.Object o, Node n)
          Constructs an ReturnExceptionError with the specified detail message, filename, line, column and exception.
 
Method Summary
 java.lang.Object getValue()
          Returns the value returned
 boolean hasValue()
          Whether or not the return statement had a value
 
Methods inherited from class koala.dynamicjava.interpreter.error.ExecutionError
getMessage, getNode, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReturnException

public ReturnException(java.lang.String s,
                       Node n)
Constructs an ReturnException with a value


ReturnException

public ReturnException(java.lang.String s,
                       java.lang.Object o,
                       Node n)
Constructs an ReturnExceptionError with the specified detail message, filename, line, column and exception.

Parameters:
n - the node in the syntax tree where the error occurs
Method Detail

getValue

public java.lang.Object getValue()
Returns the value returned


hasValue

public boolean hasValue()
Whether or not the return statement had a value



Copyright © 2001 Stephane Hillion. All Rights Reserved.