Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: de/hunsicker/jalopy/VersionMismatchException.java


1   /*
2    * Copyright (c) 2001-2002, Marco Hunsicker. All rights reserved.
3    *
4    * This software is distributable under the BSD license. See the terms of the
5    * BSD license in the documentation provided with this software.
6    */
7   package de.hunsicker.jalopy;
8   
9   import de.hunsicker.util.Version;
10  
11  
12  /**
13   * Indicates a version mismatch between the specification versions of the Jalopy Plug-in
14   * API and a concrete Plug-in implementation.
15   *
16   * @author <a href="http://jalopy.sf.net/contact.html">Marco Hunsicker</a>
17   * @version $Revision: 1.3 $
18   *
19   * @since 1.0b8
20   */
21  public final class VersionMismatchException
22      extends Exception
23  {
24      //~ Instance variables ---------------------------------------------------------------
25  
26      /** The expected version. */
27      private Version _expected;
28  
29      /** The found version. */
30      private Version _found;
31  
32      //~ Constructors ---------------------------------------------------------------------
33  
34      /**
35       * Creates a new VersionMismatchException object.
36       *
37       * @param expected the expected vesion.
38       * @param found the found vesion.
39       */
40      public VersionMismatchException(
41          Version expected,
42          Version found)
43      {
44          super("expected version was " + expected + ", found " + found);
45          _expected = expected;
46          _found = found;
47      }
48  
49      //~ Methods --------------------------------------------------------------------------
50  
51      /**
52       * Returns the expected version.
53       *
54       * @return The expected version.
55       */
56      public Version getExpected()
57      {
58          return _expected;
59      }
60  
61  
62      /**
63       * Returns the found version.
64       *
65       * @return The found version.
66       */
67      public Version getFound()
68      {
69          return _found;
70      }
71  }