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 / debug / RemoteStackVariable.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-07-08  |  2.1 KB  |  89 lines

  1. package sun.tools.debug;
  2.  
  3. import sun.tools.java.Type;
  4.  
  5. public class RemoteStackVariable extends LocalVariable implements AgentConstants {
  6.    RemoteStackFrame frame;
  7.    RemoteValue value;
  8.  
  9.    RemoteStackVariable(RemoteStackFrame var1, int var2, String var3, String var4, boolean var5, RemoteValue var6) {
  10.       this.frame = var1;
  11.       super.slot = var2;
  12.       super.name = var3;
  13.       super.signature = var4;
  14.       super.methodArgument = var5;
  15.       this.value = var6;
  16.    }
  17.  
  18.    public String getName() {
  19.       return super.name;
  20.    }
  21.  
  22.    public RemoteValue getValue() {
  23.       return this.value;
  24.    }
  25.  
  26.    void setValue(int var1) throws IllegalAccessException, Exception {
  27.       int var2 = this.getType().getTypeCode();
  28.       if (var2 == 5) {
  29.          this.setValue((long)var1);
  30.       } else if (var2 != 4 && var2 != 1 && var2 != 3) {
  31.          throw new IllegalAccessException();
  32.       } else {
  33.          this.frame.setVariable(super.slot, var1);
  34.       }
  35.    }
  36.  
  37.    void setValue(boolean var1) throws IllegalAccessException, Exception {
  38.       if (this.getType().getTypeCode() != 0) {
  39.          throw new IllegalAccessException();
  40.       } else {
  41.          this.frame.setVariable(super.slot, var1);
  42.       }
  43.    }
  44.  
  45.    void setValue(char var1) throws IllegalAccessException, Exception {
  46.       if (this.getType().getTypeCode() != 2) {
  47.          throw new IllegalAccessException();
  48.       } else {
  49.          this.frame.setVariable(super.slot, var1);
  50.       }
  51.    }
  52.  
  53.    void setValue(long var1) throws IllegalAccessException, Exception {
  54.       if (this.getType().getTypeCode() != 5) {
  55.          throw new IllegalAccessException();
  56.       } else {
  57.          this.frame.setVariable(super.slot, var1);
  58.       }
  59.    }
  60.  
  61.    void setValue(float var1) throws IllegalAccessException, Exception {
  62.       if (this.getType().getTypeCode() != 6) {
  63.          throw new IllegalAccessException();
  64.       } else {
  65.          this.frame.setVariable(super.slot, var1);
  66.       }
  67.    }
  68.  
  69.    void setValue(double var1) throws IllegalAccessException, Exception {
  70.       if (this.getType().getTypeCode() != 7) {
  71.          throw new IllegalAccessException();
  72.       } else {
  73.          this.frame.setVariable(super.slot, var1);
  74.       }
  75.    }
  76.  
  77.    public boolean inScope() {
  78.       return super.slot != -1;
  79.    }
  80.  
  81.    public boolean methodArgument() {
  82.       return super.methodArgument;
  83.    }
  84.  
  85.    public Type getType() {
  86.       return Type.tType(super.signature);
  87.    }
  88. }
  89.