home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VPage / Java.bin / CLASSES.ZIP / sun / tools / tree / LongExpression.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-07-08  |  1.4 KB  |  36 lines

  1. package sun.tools.tree;
  2.  
  3. import java.io.PrintStream;
  4. import sun.tools.asm.Assembler;
  5. import sun.tools.java.Environment;
  6. import sun.tools.java.Type;
  7.  
  8. public class LongExpression extends ConstantExpression {
  9.    long value;
  10.  
  11.    public LongExpression(int var1, long var2) {
  12.       super(66, var1, Type.tLong);
  13.       this.value = var2;
  14.    }
  15.  
  16.    public Object getValue() {
  17.       return new Long(this.value);
  18.    }
  19.  
  20.    public boolean equals(int var1) {
  21.       return this.value == (long)var1;
  22.    }
  23.  
  24.    public boolean equalsDefault() {
  25.       return this.value == 0L;
  26.    }
  27.  
  28.    public void codeValue(Environment var1, Context var2, Assembler var3) {
  29.       var3.add(super.where, 20, new Long(this.value));
  30.    }
  31.  
  32.    public void print(PrintStream var1) {
  33.       var1.print(this.value + "L");
  34.    }
  35. }
  36.