From: G?nther B. <br...@us...> - 2002-04-16 06:55:05
|
Update of /cvsroot/xpg-xml/edu/iicm/xpg/transitions In directory usw-pr-cvs1:/tmp/cvs-serv29299/transitions Modified Files: ClassLoaderTransition.java StoreDataTransition.java Log Message: another little example added Index: ClassLoaderTransition.java =================================================================== RCS file: /cvsroot/xpg-xml/edu/iicm/xpg/transitions/ClassLoaderTransition.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ClassLoaderTransition.java 8 Apr 2002 14:14:34 -0000 1.4 --- ClassLoaderTransition.java 16 Apr 2002 06:55:01 -0000 1.5 *************** *** 46,50 **** --- 46,56 ---- // FIXXME ?? public ClassLoaderTransition( Factory transition_factory, String classname ) + throws IllegalArgumentException { + if (transition_factory == null || classname == null) + { + throw (new IllegalArgumentException + ("Factory or classname in ClassLoaderTransition is null!")); + } classname_ = classname; transition_factory_ = transition_factory; Index: StoreDataTransition.java =================================================================== RCS file: /cvsroot/xpg-xml/edu/iicm/xpg/transitions/StoreDataTransition.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** StoreDataTransition.java 8 Apr 2002 14:13:16 -0000 1.9 --- StoreDataTransition.java 16 Apr 2002 06:55:01 -0000 1.10 *************** *** 50,56 **** private int data_type_; public StoreDataTransition(int type) { ! data_type_ = type; } --- 50,69 ---- private int data_type_; + //---------------------------------------------------------------------- + /** + * @param type the type of the data that should be stored + * @exception IllegalArgumentException is thrown if a unknown type + * ( < 1 or > 4 ) should be stored + */ public StoreDataTransition(int type) + throws IllegalArgumentException { ! if ( type < 1 || type > 4 ) ! { ! throw (new IllegalArgumentException ! ("illegal type of StoreDataTransition: " + type)); ! } ! ! data_type_ = type; } *************** *** 92,99 **** break; default: ! { ! if (Debug.DEBUG) ! Debug.println(Debug.WARNING_LEVEL,"StoreDataTransition: illegal datatype!"); ! } } --- 105,110 ---- break; default: ! if (Debug.DEBUG) ! Debug.println(Debug.WARNING_LEVEL,"StoreDataTransition: illegal datatype!"); } |