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

dk.rode.thesis.singleton
Class SingletonError

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Error
          extended by dk.rode.thesis.singleton.SingletonError
All Implemented Interfaces:
Serializable

public class SingletonError
extends Error

A singleton error is thrown because of illegal access to a singleton constructor.

Implementation notes:
Declared as an error because illegal access to a singleton constructor is most definitely a programmer error.

Author:
Gunni Rode / rode.dk
See Also:
SimpsonsFamilySequence.SimpsonsFamilySequence(String...), SimpsonsFamilySequence.SimpsonsFamilySequence(SimpsonsFamilySequence), Serialized Form

Field Summary
(package private) static long serialVersionUID
          Serial version id.
 
Constructor Summary
SingletonError()
          No-arg constructor.
SingletonError(CallerClass caller)
          Constructor.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
Serial version id.

See Also:
Constant Field Values
Constructor Detail

SingletonError

public SingletonError()
No-arg constructor.


SingletonError

public SingletonError(CallerClass caller)
Constructor.

Parameters:
caller - The illegal caller; can be 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.