diff options
author | Rawi01 <Rawi01@users.noreply.github.com> | 2021-08-18 19:36:50 +0200 |
---|---|---|
committer | Rawi01 <Rawi01@users.noreply.github.com> | 2021-08-18 20:20:57 +0200 |
commit | f516dd8ab3186121c4a880444302e2f980f393f8 (patch) | |
tree | 2e3647caf9dc825b86c7b56bbfd7cd99b885ec1c /src/delombok | |
parent | aab88086565355f2740b287cf6a8c28d3329150e (diff) | |
download | lombok-f516dd8ab3186121c4a880444302e2f980f393f8.tar.gz lombok-f516dd8ab3186121c4a880444302e2f980f393f8.tar.bz2 lombok-f516dd8ab3186121c4a880444302e2f980f393f8.zip |
[jdk17] Add support for sealed classes
Diffstat (limited to 'src/delombok')
-rw-r--r-- | src/delombok/lombok/delombok/PrettyPrinter.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/delombok/lombok/delombok/PrettyPrinter.java b/src/delombok/lombok/delombok/PrettyPrinter.java index 2efe05c2..605b9391 100644 --- a/src/delombok/lombok/delombok/PrettyPrinter.java +++ b/src/delombok/lombok/delombok/PrettyPrinter.java @@ -545,6 +545,12 @@ public class PrettyPrinter extends JCTree.Visitor { print(tree.implementing, ", "); } + List<JCExpression> permitting = readObject(tree, "permitting", List.<JCExpression>nil()); + if (permitting.nonEmpty()) { + print(" permits "); + print(permitting, ", "); + } + println(" {"); indent++; printClassMembers(tree.defs, isEnum, isInterface); @@ -1016,6 +1022,8 @@ public class PrettyPrinter extends JCTree.Visitor { if ((v & TRANSIENT) != 0) print("transient "); if ((v & NATIVE) != 0) print("native "); if ((v & ABSTRACT) != 0) print("abstract "); + if ((v & SEALED) != 0) print("sealed "); + if ((v & NON_SEALED) != 0) print("non-sealed "); if ((v & STRICTFP) != 0) print("strictfp "); if ((v & DEFAULT) != 0 && (v & INTERFACE) == 0) print("default "); } |