diff options
author | Jan Rieke <rieke@subshell.com> | 2018-09-12 09:30:40 +0200 |
---|---|---|
committer | Jan Rieke <rieke@subshell.com> | 2018-09-12 09:30:40 +0200 |
commit | da0020cd48bfd321ec68adc99af7ec46e1551231 (patch) | |
tree | c85ff3b3a2bf2ed391bdeda50c349b8831d13e13 /src/core/lombok/javac/handlers/JavacHandlerUtil.java | |
parent | ddd42acb599d45c432a200313a0f403a8a2a3928 (diff) | |
parent | 2027ffc49f194da2892938e0cd5868cd286a06f6 (diff) | |
download | lombok-da0020cd48bfd321ec68adc99af7ec46e1551231.tar.gz lombok-da0020cd48bfd321ec68adc99af7ec46e1551231.tar.bz2 lombok-da0020cd48bfd321ec68adc99af7ec46e1551231.zip |
Merge remote-tracking branch 'upstream/master' into superToBuilder
Diffstat (limited to 'src/core/lombok/javac/handlers/JavacHandlerUtil.java')
-rw-r--r-- | src/core/lombok/javac/handlers/JavacHandlerUtil.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java index 570d1a7e..92c642d4 100644 --- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java +++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java @@ -1583,6 +1583,14 @@ public class JavacHandlerUtil { return node; } + public static List<JCExpression> cloneTypes(JavacTreeMaker maker, List<JCExpression> in, JCTree source, Context context) { + if (in.isEmpty()) return List.nil(); + if (in.size() == 1) return List.of(cloneType(maker, in.get(0), source, context)); + ListBuffer<JCExpression> lb = new ListBuffer<JCExpression>(); + for (JCExpression expr : in) lb.append(cloneType(maker, expr, source, context)); + return lb.toList(); + } + /** * Creates a full clone of a given javac AST type node. Every part is cloned (every identifier, every select, every wildcard, every type apply). * |