KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > triactive > jdo > state > IllegalStateTransitionException


1 /*
2  * Copyright 2003 (C) TJDO.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the TJDO License version 1.0.
6  * See the terms of the TJDO License in the documentation provided with this software.
7  *
8  * $Id: IllegalStateTransitionException.java,v 1.1 2003/05/12 06:46:05 jackknifebarber Exp $
9  */

10
11 package com.triactive.jdo.state;
12
13 import javax.jdo.JDOFatalInternalException;
14
15
16 /**
17  * A <tt>IllegalStateTransitionException</tt> is thrown if a life-cycle
18  * state attempts a transition that is illegal. This indicates a coding
19  * bug in TJDO.
20  *
21  * @author <a HREF="mailto:mmartin5@austin.rr.com">Mike Martin</a>
22  * @version $Revision: 1.1 $
23  */

24
25 public class IllegalStateTransitionException extends JDOFatalInternalException
26 {
27     /**
28      * Constructs an illegal state transition exception.
29      *
30      * @param state The object's current life-cycle state.
31      * @param transition A string describing the type of transition.
32      * @param sm The StateManagerImpl of the object.
33      */

34
35     public IllegalStateTransitionException(LifeCycleState state, String JavaDoc transition, StateManagerImpl sm)
36     {
37         super("An illegal " + transition + " transition was attempted from the " + state + " state, sm = " + sm);
38     }
39 }
40
Popular Tags