home *** CD-ROM | disk | FTP | other *** search
- package sun.tools.debug;
-
- import sun.tools.java.Type;
-
- public class RemoteStackVariable extends LocalVariable implements AgentConstants {
- RemoteStackFrame frame;
- RemoteValue value;
-
- RemoteStackVariable(RemoteStackFrame var1, int var2, String var3, String var4, boolean var5, RemoteValue var6) {
- this.frame = var1;
- super.slot = var2;
- super.name = var3;
- super.signature = var4;
- super.methodArgument = var5;
- this.value = var6;
- }
-
- public String getName() {
- return super.name;
- }
-
- public RemoteValue getValue() {
- return this.value;
- }
-
- void setValue(int var1) throws IllegalAccessException, Exception {
- int var2 = this.getType().getTypeCode();
- if (var2 == 5) {
- this.setValue((long)var1);
- } else if (var2 != 4 && var2 != 1 && var2 != 3) {
- throw new IllegalAccessException();
- } else {
- this.frame.setVariable(super.slot, var1);
- }
- }
-
- void setValue(boolean var1) throws IllegalAccessException, Exception {
- if (this.getType().getTypeCode() != 0) {
- throw new IllegalAccessException();
- } else {
- this.frame.setVariable(super.slot, var1);
- }
- }
-
- void setValue(char var1) throws IllegalAccessException, Exception {
- if (this.getType().getTypeCode() != 2) {
- throw new IllegalAccessException();
- } else {
- this.frame.setVariable(super.slot, var1);
- }
- }
-
- void setValue(long var1) throws IllegalAccessException, Exception {
- if (this.getType().getTypeCode() != 5) {
- throw new IllegalAccessException();
- } else {
- this.frame.setVariable(super.slot, var1);
- }
- }
-
- void setValue(float var1) throws IllegalAccessException, Exception {
- if (this.getType().getTypeCode() != 6) {
- throw new IllegalAccessException();
- } else {
- this.frame.setVariable(super.slot, var1);
- }
- }
-
- void setValue(double var1) throws IllegalAccessException, Exception {
- if (this.getType().getTypeCode() != 7) {
- throw new IllegalAccessException();
- } else {
- this.frame.setVariable(super.slot, var1);
- }
- }
-
- public boolean inScope() {
- return super.slot != -1;
- }
-
- public boolean methodArgument() {
- return super.methodArgument;
- }
-
- public Type getType() {
- return Type.tType(super.signature);
- }
- }
-