mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 16:15:16 +00:00
@UtilityClass handlers now more intelligent about inner types of implicitly static contexts (enums, interfaces, and annotation declarations). Also added tests to test for these.
This commit is contained in:
1 parent
74b38cd7d6
commit
58a7914027
11 files changed
+126
-25
No files matched your search
@@ -27,6 +27,31 @@ class UtilityInner {
|
||||
super();
|
||||
}
|
||||
}
|
||||
enum UtilityInsideEnum {
|
||||
static final @lombok.experimental.UtilityClass class InsideEnum {
|
||||
static int member;
|
||||
private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") InsideEnum() {
|
||||
super();
|
||||
throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated");
|
||||
}
|
||||
}
|
||||
FOO(),
|
||||
BAR(),
|
||||
<clinit>() {
|
||||
}
|
||||
UtilityInsideEnum() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
interface UtilityInsideInterface {
|
||||
final @lombok.experimental.UtilityClass class InsideInterface {
|
||||
static int member;
|
||||
private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") InsideInterface() {
|
||||
super();
|
||||
throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated");
|
||||
}
|
||||
}
|
||||
}
|
||||
UtilityInner() {
|
||||
super();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user