KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > ast > IntLit


1 package polyglot.ast;
2
3 import polyglot.util.Enum;
4
5 /**
6  * An <code>IntLit</code> represents a literal in Java of an integer
7  * type.
8  */

9 public interface IntLit extends NumLit
10 {
11     /** Integer literal kinds: int (e.g., 0) or long (e.g., 0L). */
12     public static class Kind extends Enum JavaDoc {
13         public Kind(String JavaDoc name) { super(name); }
14     }
15
16     public static final Kind INT = new Kind("int");
17     public static final Kind LONG = new Kind("long");
18
19     /** Get the literal's value. */
20     long value();
21
22     /** Set the literal's value. */
23     IntLit value(long value);
24
25     /** Get the kind of the literal: INT or LONG. */
26     Kind kind();
27
28     /** Set the kind of the literal: INT or LONG. */
29     IntLit kind(Kind kind);
30
31     /** Is this a boundary case, i.e., max int or max long + 1? */
32     boolean boundary();
33
34     /** Print the string as a positive number. */
35     String JavaDoc positiveToString();
36 }
37
Popular Tags