home *** CD-ROM | disk | FTP | other *** search
/ Macwelt 1 / Macwelt DVD 1.toast / Software für Mac-OS X / Entwickler-Tools / netbeans / modules / ext / djava.jar / koala / dynamicjava / tree / IfThenStatement.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-03-14  |  1.7 KB  |  55 lines

  1. package koala.dynamicjava.tree;
  2.  
  3. import koala.dynamicjava.tree.visitor.Visitor;
  4.  
  5. public class IfThenStatement extends Statement {
  6.    public static final String CONDITION = "condition";
  7.    public static final String THEN_STATEMENT = "thenStatement";
  8.    private Expression condition;
  9.    private Node thenStatement;
  10.  
  11.    public Expression getCondition() {
  12.       return this.condition;
  13.    }
  14.  
  15.    public void setCondition(Expression var1) {
  16.       if (var1 == null) {
  17.          throw new IllegalArgumentException("e == null");
  18.       } else {
  19.          ((Node)this).firePropertyChange("condition", this.condition, this.condition = var1);
  20.       }
  21.    }
  22.  
  23.    public Node getThenStatement() {
  24.       return this.thenStatement;
  25.    }
  26.  
  27.    public void setThenStatement(Node var1) {
  28.       if (var1 == null) {
  29.          throw new IllegalArgumentException("node == null");
  30.       } else {
  31.          ((Node)this).firePropertyChange("thenStatement", this.thenStatement, this.thenStatement = var1);
  32.       }
  33.    }
  34.  
  35.    public Object acceptVisitor(Visitor var1) {
  36.       return var1.visit(this);
  37.    }
  38.  
  39.    public IfThenStatement(Expression var1, Node var2) {
  40.       this(var1, var2, (String)null, 0, 0, 0, 0);
  41.    }
  42.  
  43.    public IfThenStatement(Expression var1, Node var2, String var3, int var4, int var5, int var6, int var7) {
  44.       super(var3, var4, var5, var6, var7);
  45.       if (var1 == null) {
  46.          throw new IllegalArgumentException("cond == null");
  47.       } else if (var2 == null) {
  48.          throw new IllegalArgumentException("tstmt == null");
  49.       } else {
  50.          this.condition = var1;
  51.          this.thenStatement = var2;
  52.       }
  53.    }
  54. }
  55.