KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > types > PrimitiveType


1 package polyglot.types;
2
3 import polyglot.util.Enum;
4
5 /**
6  * A <code>PrimitiveType</code> represents a type which may not be directly
7  * coerced to java.lang.Object (under the standard Java type system).
8  * <p>
9  * This class should never be instantiated directly. Instead, you should
10  * use the <code>TypeSystem.get*</code> methods.
11  */

12 public interface PrimitiveType extends Type, Named
13 {
14     /** The kind of the primitive type. */
15     public class Kind extends Enum JavaDoc {
16     public Kind(String JavaDoc name) { super(name); }
17     }
18
19     public static final Kind VOID = new Kind("void");
20     public static final Kind BOOLEAN = new Kind("boolean");
21     public static final Kind BYTE = new Kind("byte");
22     public static final Kind CHAR = new Kind("char");
23     public static final Kind SHORT = new Kind("short");
24     public static final Kind INT = new Kind("int");
25     public static final Kind LONG = new Kind("long");
26     public static final Kind FLOAT = new Kind("float");
27     public static final Kind DOUBLE = new Kind("double");
28
29     /**
30      * The kind of primitive.
31      */

32     Kind kind();
33
34     /**
35      * A string representing the type used to box this primitive.
36      */

37     String JavaDoc wrapperTypeString(TypeSystem ts);
38 }
39
Popular Tags