diff options
author | Christian Melchior <christian@ilios.dk> | 2017-11-12 15:37:15 +0100 |
---|---|---|
committer | Christian Melchior <christian@ilios.dk> | 2017-11-12 15:37:15 +0100 |
commit | 215a61f3a0a1d2794df51611218068ab09a90d56 (patch) | |
tree | 7309f91e448e346a26d7f339fbd84464402d9406 /src/main/javassist/compiler/ast/ASTList.java | |
parent | f4769c7ad702fa529a790106ea5c318a7af5c7b7 (diff) | |
parent | e1f0bba5de4dc03a9debfab333683f07cfbcb594 (diff) | |
download | javassist-215a61f3a0a1d2794df51611218068ab09a90d56.tar.gz javassist-215a61f3a0a1d2794df51611218068ab09a90d56.zip |
Merge branch 'master' into cm/bug/classpath-close
# Conflicts:
# pom.xml
# src/main/javassist/ByteArrayClassPath.java
# src/main/javassist/ClassClassPath.java
# src/main/javassist/ClassPoolTail.java
# src/main/javassist/LoaderClassPath.java
# src/main/javassist/URLClassPath.java
Diffstat (limited to 'src/main/javassist/compiler/ast/ASTList.java')
-rw-r--r-- | src/main/javassist/compiler/ast/ASTList.java | 20 |
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; } } |