mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 10:15:19 +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
@@ -23,4 +23,26 @@ class UtilityInner {
|
||||
}
|
||||
}
|
||||
}
|
||||
enum UtilityInsideEnum {
|
||||
FOO,
|
||||
BAR;
|
||||
static final class InsideEnum {
|
||||
static int member;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
@javax.annotation.Generated("lombok")
|
||||
private InsideEnum() {
|
||||
throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated");
|
||||
}
|
||||
}
|
||||
}
|
||||
interface UtilityInsideInterface {
|
||||
final class InsideInterface {
|
||||
static int member;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
@javax.annotation.Generated("lombok")
|
||||
private InsideInterface() {
|
||||
throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user