Skip to content

Commit 39e2920

Browse files
author
dlsmith
committed
DynamicJava: Cleaning up dead code. Removed some unused classes. Removed property listener support from the AST, which doesn't get used anywhere, clutters up the code, and makes introducing or modifying AST classes more intimidating.
git-svn-id: file:///tmp/test-svn/trunk@5109 fe72c1cf-3628-48e9-8b72-1c46755d3cff
1 parent 270c6e5 commit 39e2920

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+135
-1004
lines changed

dynamicjava/src/koala/dynamicjava/tree/AmbiguousName.java

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,6 @@
3939
*/
4040

4141
public class AmbiguousName extends PrimaryExpression implements LeftHandSide {
42-
/**
43-
* The identifiers property name
44-
*/
45-
public final static String IDENTIFIERS = "identifiers";
46-
47-
/**
48-
* The representation property name
49-
*/
50-
public final static String REPRESENTATION = "representation";
5142

5243
/**
5344
* The identifiers (tokens) that compose this name
@@ -117,11 +108,8 @@ public List<IdentifierToken> getIdentifiers() {
117108
*/
118109
public void setIdentifier(List<IdentifierToken> l) {
119110
if (l == null) throw new IllegalArgumentException("l == null");
120-
121-
firePropertyChange(IDENTIFIERS, identifiers, identifiers = l);
122-
firePropertyChange(REPRESENTATION,
123-
representation,
124-
representation = TreeUtilities.listToName(l));
111+
identifiers = l;
112+
representation = TreeUtilities.listToName(l);
125113
}
126114

127115
/**

dynamicjava/src/koala/dynamicjava/tree/AnonymousAllocation.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ public List<Node> getMembers() {
8989
*/
9090
public void setMembers(List<Node> l) {
9191
if (l == null) throw new IllegalArgumentException("l == null");
92-
93-
firePropertyChange(MEMBERS, members, members = l);
92+
members = l;
9493
}
9594

9695
/**

dynamicjava/src/koala/dynamicjava/tree/AnonymousInnerAllocation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public AnonymousInnerAllocation(Expression exp, String cn, List<? extends TypeNa
9292
*/
9393
public void setMembers(List<Node> l) {
9494
if (l == null) throw new IllegalArgumentException("l == null");
95-
firePropertyChange(MEMBERS, members, members = l);
95+
members = l;
9696
}
9797

9898
/**

dynamicjava/src/koala/dynamicjava/tree/ArrayAccess.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,6 @@
3939

4040
public class ArrayAccess extends PrimaryExpression implements LeftHandSide,
4141
ExpressionContainer {
42-
/**
43-
* The expression property name
44-
*/
45-
public final static String EXPRESSION = "expression";
46-
47-
/**
48-
* The cellNumber property name
49-
*/
50-
public final static String CELL_NUMBER = "cellNumber";
5142

5243
/**
5344
* The expression on which this array access applies
@@ -99,8 +90,7 @@ public Expression getExpression() {
9990
*/
10091
public void setExpression(Expression e) {
10192
if (e == null) throw new IllegalArgumentException("e == null");
102-
103-
firePropertyChange(EXPRESSION, expression, expression = e);
93+
expression = e;
10494
}
10595

10696
/**
@@ -116,8 +106,7 @@ public Expression getCellNumber() {
116106
*/
117107
public void setCellNumber(Expression e) {
118108
if (e == null) throw new IllegalArgumentException("e == null");
119-
120-
firePropertyChange(CELL_NUMBER, cellNumber, cellNumber = e);
109+
cellNumber = e;
121110
}
122111

123112
/**

dynamicjava/src/koala/dynamicjava/tree/ArrayAllocation.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@
3838
*/
3939

4040
public class ArrayAllocation extends PrimaryExpression {
41-
42-
/** The creationType property name */
43-
public final static String ELEMENT_TYPE = "creationType";
44-
4541
/** The creationType */
4642
private TypeName elementType;
4743

@@ -86,8 +82,7 @@ public TypeName getElementType() {
8682
*/
8783
public void setElementType(TypeName t) {
8884
if (t == null) throw new IllegalArgumentException("t == null");
89-
90-
firePropertyChange(ELEMENT_TYPE, elementType, elementType = t);
85+
elementType = t;
9186
}
9287

9388
/**

dynamicjava/src/koala/dynamicjava/tree/ArrayInitializer.java

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,6 @@
4040
*/
4141

4242
public class ArrayInitializer extends Expression {
43-
/**
44-
* The cells property name
45-
*/
46-
public final static String CELLS = "cells";
47-
48-
/**
49-
* The element type property name
50-
*/
51-
public final static String ELEMENT_TYPE = "elementType";
52-
5343
/**
5444
* The list of initialized cells
5545
*/
@@ -96,8 +86,7 @@ public List<Expression> getCells() {
9686
*/
9787
public void setCells(List<? extends Expression> l) {
9888
if (l == null) throw new IllegalArgumentException("l == null");
99-
100-
firePropertyChange(CELLS, cells, cells = new ArrayList<Expression>(l));
89+
cells = new ArrayList<Expression>(l);
10190
}
10291

10392
/**
@@ -114,8 +103,7 @@ public TypeName getElementType() {
114103
*/
115104
public void setElementType(TypeName t) {
116105
if (t == null) throw new IllegalArgumentException("t == null");
117-
118-
firePropertyChange(ELEMENT_TYPE, elementType, elementType = t);
106+
elementType = t;
119107
if (t instanceof ArrayTypeName) {
120108
ArrayTypeName at = (ArrayTypeName)t;
121109
for (Expression init : cells) {

dynamicjava/src/koala/dynamicjava/tree/ArrayTypeName.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@
3838
*/
3939

4040
public class ArrayTypeName extends TypeName {
41-
/**
42-
* The elementType property name
43-
*/
44-
public final static String ELEMENT_TYPE = "elementType";
45-
4641
/**
4742
* The type of the elements of the arrays represented by this type
4843
*/
@@ -89,8 +84,7 @@ public TypeName getElementType() {
8984
*/
9085
public void setElementType(TypeName t) {
9186
if (t == null) throw new IllegalArgumentException("t == null");
92-
93-
firePropertyChange(ELEMENT_TYPE, elementType, elementType = t);
87+
elementType = t;
9488
}
9589

9690
public boolean isVararg() { return vararg; }

dynamicjava/src/koala/dynamicjava/tree/AssertStatement.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,6 @@
4444
*/
4545

4646
public class AssertStatement extends Statement {
47-
/**
48-
* The condition property name
49-
*/
50-
public final static String CONDITION = "condition";
51-
52-
/**
53-
* The Failed String property name
54-
*/
55-
public final static String FAILED = "failed";
56-
5747
/**
5848
* The condition and the failure string
5949
*/
@@ -100,15 +90,14 @@ public Expression getFailString() {
10090
*/
10191
public void setCondition(Expression e) {
10292
if (e == null) throw new IllegalArgumentException("e == null");
103-
104-
firePropertyChange(CONDITION, condition, condition = e);
93+
condition = e;
10594
}
10695

10796
/**
10897
* Sets the string to display on failure
10998
*/
11099
public void setFailString(Expression e) {
111-
firePropertyChange(FAILED, failedString, failedString = e);
100+
failedString = e;
112101
}
113102

114103
/**

dynamicjava/src/koala/dynamicjava/tree/BinaryExpression.java

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,6 @@
3636
*/
3737

3838
public abstract class BinaryExpression extends Expression {
39-
/**
40-
* The leftExpression property name
41-
*/
42-
public final static String LEFT_EXPRESSION = "leftExpression";
43-
44-
/**
45-
* The rightExpression property name
46-
*/
47-
public final static String RIGHT_EXPRESSION = "rightExpression";
48-
4939
/**
5040
* The LHS expression
5141
*/
@@ -86,8 +76,7 @@ public Expression getLeftExpression() {
8676
*/
8777
public void setLeftExpression(Expression exp) {
8878
if (exp == null) throw new IllegalArgumentException("exp == null");
89-
90-
firePropertyChange(LEFT_EXPRESSION, leftExpression, leftExpression = exp);
79+
leftExpression = exp;
9180
}
9281

9382
/**
@@ -103,8 +92,7 @@ public Expression getRightExpression() {
10392
*/
10493
public void setRightExpression(Expression exp) {
10594
if (exp == null) throw new IllegalArgumentException("exp == null");
106-
107-
firePropertyChange(RIGHT_EXPRESSION, rightExpression, rightExpression = exp);
95+
rightExpression = exp;
10896
}
10997
/**
11098
* Implementation of toString for use in unit testing

dynamicjava/src/koala/dynamicjava/tree/BlockStatement.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@
4040
*/
4141

4242
public class BlockStatement extends Statement {
43-
/**
44-
* The creationType property name
45-
*/
46-
public final static String STATEMENTS = "statements";
47-
4843
/**
4944
* The list of the statements contained in this block
5045
*/
@@ -84,8 +79,7 @@ public List<Node> getStatements() {
8479
*/
8580
public void setStatements(List<Node> l) {
8681
if (l == null) throw new IllegalArgumentException("l == null");
87-
88-
firePropertyChange(STATEMENTS, statements, statements = l);
82+
statements = l;
8983
}
9084

9185
/**

0 commit comments

Comments
 (0)