aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/compiler/ast/ASTList.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/javassist/compiler/ast/ASTList.java')
-rw-r--r--src/main/javassist/compiler/ast/ASTList.java20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/main/javassist/compiler/ast/ASTList.java b/src/main/javassist/compiler/ast/ASTList.java
index cf398966..67fbd97a 100644
--- a/src/main/javassist/compiler/ast/ASTList.java
+++ b/src/main/javassist/compiler/ast/ASTList.java
@@ -23,6 +23,8 @@ import javassist.compiler.CompileError;
* The right subtree must be an ASTList object or null.
*/
public class ASTList extends ASTree {
+ /** default serialVersionUID */
+ private static final long serialVersionUID = 1L;
private ASTree left;
private ASTList right;
@@ -40,12 +42,16 @@ public class ASTList extends ASTree {
return new ASTList(e1, new ASTList(e2, new ASTList(e3)));
}
+ @Override
public ASTree getLeft() { return left; }
+ @Override
public ASTree getRight() { return right; }
+ @Override
public void setLeft(ASTree _left) { left = _left; }
+ @Override
public void setRight(ASTree _right) {
right = (ASTList)_right;
}
@@ -68,8 +74,10 @@ public class ASTList extends ASTree {
right = _tail;
}
+ @Override
public void accept(Visitor v) throws CompileError { v.atASTList(this); }
+ @Override
public String toString() {
StringBuffer sbuf = new StringBuffer();
sbuf.append("(<");
@@ -148,13 +156,11 @@ public class ASTList extends ASTree {
public static ASTList concat(ASTList a, ASTList b) {
if (a == null)
return b;
- else {
- ASTList list = a;
- while (list.right != null)
- list = list.right;
+ ASTList list = a;
+ while (list.right != null)
+ list = list.right;
- list.right = b;
- return a;
- }
+ list.right = b;
+ return a;
}
}