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

Quick Search    Search Deep

Source code: jsource/codegenerator/JavaTypes.java


1   package jsource.codegenerator;
2   
3   
4   /**
5    * JavaTypes.java 03/17/03
6    *
7    * This program is free software; you can redistribute it and/or modify
8    * it under the terms of the GNU Library General Public License as published
9    * by the Free Software Foundation; either version 2 of the License, or
10   * (at your option) any later version.
11   *
12   * This program is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   * GNU Library General Public License for more details.
16   */
17  
18  public class JavaTypes extends LanguageTypes {
19  
20      public TypeDef[] getTypes() {
21          TypeDef result[] = new TypeDef[10];
22  
23          result[0] = new TypeDef(4, "byte", "Sighed 8-bit value");
24          result[1] = new TypeDef(1, "boolean", "A true/false value");
25          result[2] = new TypeDef(2, "char", "A 16-bit Unicode character");
26          result[3] = new TypeDef(3, "short", "Signed 16-bit value");
27          result[4] = new TypeDef(5, "int", "Signed 32-bit value");
28          result[5] = new TypeDef(6, "long", "Signed 64-bit value");
29          result[6] = new TypeDef(7, "float", "IEEE 32-bit float");
30          result[7] = new TypeDef(8, "double", "IEEE 64-bit float");
31          result[8] = new TypeDef(9, "Object", "Object type");
32          result[9] = new TypeDef(10, "String", "String type");
33          return result;
34      }
35  
36      public static final int BOOLEAN = 1;
37      public static final int CHAR = 2;
38      public static final int SHORT = 3;
39      public static final int BYTE = 4;
40      public static final int INT = 5;
41      public static final int LONG = 6;
42      public static final int FLOAT = 7;
43      public static final int DOUBLE = 8;
44      public static final int OBJECT = 9;
45      public static final int STRING = 10;
46  }