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:
anna
2012-07-05 13:01:19 +02:00
parent 7678df1cbb
commit d18b86df35
3 changed files with 55 additions and 5 deletions

View File

@@ -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>
}
}

View File

@@ -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));
}
}