KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jgap > xml > GeneCreationException


1 /*
2  * This file is part of JGAP.
3  *
4  * JGAP offers a dual license model containing the LGPL as well as the MPL.
5  *
6  * For licencing information please see the file license.txt included with JGAP
7  * or have a look at the top of class org.jgap.Chromosome which representatively
8  * includes the JGAP license policy applicable for any file delivered with JGAP.
9  */

10 package org.jgap.xml;
11
12 /**
13  * The GeneCreationException is a bit of a catch-all exception for
14  * representing problems encountered during the creation of a Gene
15  * object with a value (allele) representation found in an XML document.
16  * Typically, this exception will be thrown if the concrete class
17  * indicated in the XML file cannot be found or instantiated for
18  * some reason, or if the class does not support the methods related to
19  * XML persistence. Consult the error message for details on the specific
20  * reason for failure.
21  *
22  * @author Neil Rotstan
23  * @author Klaus Meffert
24  * @since 1.0
25  */

26 public class GeneCreationException
27     extends Exception JavaDoc {
28   /** String containing the CVS revision. Read out via reflection!*/
29   private final static String JavaDoc CVS_REVISION = "$Revision: 1.7 $";
30
31   /**
32    * Constructs a new GeneCreationException instance with the given error
33    * message.
34    *
35    * @param a_message an error message describing the reason this exception
36    * is being thrown
37    *
38    * @author Neil Rotstan
39    * @since 1.0
40    */

41   public GeneCreationException(final String JavaDoc a_message) {
42     super(a_message);
43   }
44
45   /**
46    * Constructs a new GeneCreationException instance with the given error
47    * message.
48    *
49    * @param a_message an error message describing the reason this exception
50    * is being thrown
51    * @param a_geneClass the class of the gene that should be instantiated
52    *
53    * @author Klaus Meffert
54    * @since 3.0
55    */

56   public GeneCreationException(final Class JavaDoc a_geneClass, Throwable JavaDoc cause) {
57     super(a_geneClass != null ?
58           "Gene class " + a_geneClass.getName() : "", cause);
59   }
60 }
61
Popular Tags