mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-03 07:13:15 +00:00
[fixes #2382] Handle generic supertypes
This commit is contained in:
1 parent
77ab1cf867
commit
7d08af7d85
4 files changed
+75
-4
No files matched your search
@@ -0,0 +1,32 @@
|
||||
public class DelegateGenerics<T> {
|
||||
I1<T> target;
|
||||
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public java.lang.Integer t(final java.lang.Integer t) {
|
||||
return this.target.t(t);
|
||||
}
|
||||
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public java.lang.String i(final java.lang.String a) {
|
||||
return this.target.i(a);
|
||||
}
|
||||
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public T a(final T a) {
|
||||
return this.target.a(a);
|
||||
}
|
||||
}
|
||||
|
||||
interface I1<T> extends I2<T, Integer, String> {
|
||||
}
|
||||
|
||||
interface I2<A, T, I> extends I3<Integer, I, A> {
|
||||
}
|
||||
|
||||
interface I3<T, I, A> {
|
||||
T t(T t);
|
||||
|
||||
I i(I a);
|
||||
|
||||
A a(A a);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
public class DelegateGenerics<T> {
|
||||
@lombok.experimental.Delegate I1<T> target;
|
||||
public DelegateGenerics() {
|
||||
super();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") T a(final T a) {
|
||||
return this.target.a(a);
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") java.lang.String i(final java.lang.String a) {
|
||||
return this.target.i(a);
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") java.lang.Integer t(final java.lang.Integer t) {
|
||||
return this.target.t(t);
|
||||
}
|
||||
}
|
||||
interface I1<T> extends I2<T, Integer, String> {
|
||||
}
|
||||
interface I2<A, T, I> extends I3<Integer, I, A> {
|
||||
}
|
||||
interface I3<T, I, A> {
|
||||
public T t(T t);
|
||||
public I i(I a);
|
||||
public A a(A a);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
public class DelegateGenerics<T> {
|
||||
@lombok.experimental.Delegate
|
||||
I1<T> target;
|
||||
}
|
||||
|
||||
interface I1<T> extends I2<T, Integer, String> {
|
||||
}
|
||||
interface I2<A, T, I> extends I3<Integer, I, A> {
|
||||
}
|
||||
interface I3<T, I, A> {
|
||||
public T t(T t);
|
||||
public I i(I a);
|
||||
public A a(A a);
|
||||
}
|
||||
Reference in new issue
Block a user