aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok/javac/handlers')
-rw-r--r--src/core/lombok/javac/handlers/JavacHandlerUtil.java8
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).
*