mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 10:20:15 +07:00
create method from usage: create type params for static methods created in generics classes as class type params won't be accessible (IDEA-87688)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
// "Create Method 'makeOp'" "true"
|
||||
class Base<T> {
|
||||
Base(Factory<T> factory, Operator<T> operator) {
|
||||
}
|
||||
}
|
||||
|
||||
interface MetaOperator<T> {
|
||||
}
|
||||
|
||||
interface Operator<T> {
|
||||
}
|
||||
|
||||
interface Factory<T> {
|
||||
}
|
||||
|
||||
class Sup<T> extends Base<T> {
|
||||
Sup(MetaOperator<T> mop) {
|
||||
super(null, makeOp(mop));
|
||||
}
|
||||
|
||||
private static <T> Operator<T> makeOp(MetaOperator<T> mop) {
|
||||
<selection>return null; //To change body of created methods use File | Settings | File Templates.</selection>
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// "Create Method 'makeOp'" "true"
|
||||
class Base<T> {
|
||||
Base(Factory<T> factory, Operator<T> operator) {
|
||||
}
|
||||
}
|
||||
|
||||
interface MetaOperator<T> {
|
||||
}
|
||||
|
||||
interface Operator<T> {
|
||||
}
|
||||
|
||||
interface Factory<T> {
|
||||
}
|
||||
|
||||
class Sup<T> extends Base<T> {
|
||||
Sup(MetaOperator<T> mop) {
|
||||
super(null, mak<caret>eOp(mop));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user