Evaluating Software Design Patterns
— the "Gang of Four" patterns implemented in Java 6

dk.rode.thesis.interpreter
Class BreakExpression.BreakException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by dk.rode.thesis.interpreter.ExpressionException
              extended by dk.rode.thesis.interpreter.BreakExpression.BreakException
All Implemented Interfaces:
Serializable
Enclosing class:
BreakExpression<E>

public static final class BreakExpression.BreakException
extends ExpressionException

A break exception is thrown when an break expression is evaluated.

If the exception stores an expression, the interpreter will transfer control to that expression, or exit with a null result if the exception does not store an expression.

Author:
Gunni Rode / rode.dk
See Also:
Serialized Form

Field Summary
 TypedExpression<?> expression
          The target expression to be evaluated next.
(package private) static long serialVersionUID
          Serial version uid.
 
Constructor Summary
BreakExpression.BreakException()
          No-arg constructor, which creates this break exception to cause the interpreter to exit.
BreakExpression.BreakException(TypedExpression<?> expression)
          Constructor, which creates this break exception to cause the interpreter to transfer control to expression, or exit if it is null.
 
Method Summary
 String toString()
          Return the string representation of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

expression

public final TypedExpression<?> expression
The target expression to be evaluated next.

Can be null.


serialVersionUID

static final long serialVersionUID
Serial version uid.

See Also:
Constant Field Values
Constructor Detail

BreakExpression.BreakException

BreakExpression.BreakException()
No-arg constructor, which creates this break exception to cause the interpreter to exit.


BreakExpression.BreakException

BreakExpression.BreakException(TypedExpression<?> expression)
Constructor, which creates this break exception to cause the interpreter to transfer control to expression, or exit if it is null.

Parameters:
expression - The target expression; can be null.
Method Detail

toString

public String toString()
Return the string representation of this exception.

Overrides:
toString in class Throwable
Returns:
The string representation; never null.

Gunni Rode / rode.dk

Feel free to use and/or modify the Java 6 source code developed for this thesis AT YOUR OWN RISK, but note that the source code comes WITHOUT ANY — and I do mean WITHOUT ANY — form of warranty WHAT SO EVER!

The original thesis and source code are available at rode.dk/thesis.