@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:
Reinier Zwitserloot committed 2015-02-04 00:08:48 +01:00
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();
}