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

Quick Search    Search Deep

Source code: mlsub/typing/KindingEx.java


1   /**************************************************************************/
2   /*                           B O S S A                                    */
3   /*        A simple imperative object-oriented research language           */
4   /*                   (c)  Daniel Bonniot 1999                             */
5   /*                                                                        */
6   /*  This program is free software; you can redistribute it and/or modify  */
7   /*  it under the terms of the GNU General Public License as published by  */
8   /*  the Free Software Foundation; either version 2 of the License, or     */
9   /*  (at your option) any later version.                                   */
10  /*                                                                        */
11  /**************************************************************************/
12  
13  // File    : KindingEx.java
14  // Created : Thu Jul 22 19:33:34 1999 by bonniot
15  //$Modified: Sat Jun 03 12:43:53 2000 by Daniel Bonniot $
16  
17  package mlsub.typing;
18  
19  /**
20   * Reports that two types that have to be compared 
21   * do not have the same kind
22   * 
23   * @author bonniot
24   */
25  
26  public class KindingEx extends TypingEx
27  {
28    KindingEx(Polytype t1, Polytype t2)
29    {
30      super(t1+" and "+t2+" do not have the same kind : "+
31      t1.getClass()+" and "+t2.getClass());
32    }
33  
34    KindingEx(Monotype t1, Monotype t2)
35    {
36      super(t1+" and "+t2+" do not have the same kind : "+
37      t1.getClass()+" and "+t2.getClass());
38    }
39  
40    KindingEx(TypeConstructor t1, TypeConstructor t2)
41    {
42      super(t1+" and "+t2+" do not have the same kind : "+
43      t1.getKind()+" and "+t2.getKind());
44      this.t1=t1;
45      this.t2=t2;
46    }
47  
48    KindingEx(TypeConstructor t, Interface i)
49    {
50      super(t + " cannot implement " + i);
51      this.t1=t;
52      this.t2=i;
53    }
54  
55    KindingEx(Interface t1, Interface t2)
56    {
57      super(t1+" cannot extend "+t2);
58      this.t1 = t1;
59      this.t2 = t2;
60    }
61    
62    public Object t1, t2;
63  }