This commit is contained in:
Roman Shevchenko
2012-10-10 09:44:36 +02:00
parent aa3bf48a13
commit 37941c490f
9 changed files with 64 additions and 172 deletions
@@ -2,17 +2,17 @@ interface Int<T> {
void method(T x);
}
class Sub implements Int<Xint> {
public void method(Xint x) {
class Sub implements Int<XInt> {
public void method(XInt x) {
x.inInt();
}
}
interface Xint {
interface XInt {
void inInt();
}
class Xyz implements Xint {
class Xyz implements XInt {
public void inInt() {
}
@@ -8,11 +8,11 @@ class Sub implements Int<Xyz> {
}
}
interface Xint {
interface XInt {
void inInt();
}
class Xyz implements Xint {
class Xyz implements XInt {
public void inInt() {
}
@@ -14,11 +14,11 @@ class Sub implements Int<Xyz> {
}
}
interface Xint {
interface XInt {
void inInt();
}
class Xyz implements Xint {
class Xyz implements XInt {
public void inInt() {
}
@@ -14,11 +14,11 @@ class Sub implements Int<Xyz> {
}
}
interface Xint {
interface XInt {
void inInt();
}
class Xyz implements Xint {
class Xyz implements XInt {
public void inInt() {
}
@@ -1,20 +1,20 @@
interface Intf {
interface IntF {
}
interface Factory<E extends Intf> {
interface Factory<E extends IntF> {
E create();
void save(E obj);
static class helper {
static Factory<Intf> get2() {
return (Factory)new Factory<Intf>() {
public Intf create() { return null; }
public void save(Intf obj) { }
static Factory<IntF> get2() {
return (Factory)new Factory<IntF>() {
public IntF create() { return null; }
public void save(IntF obj) { }
};
}
}
}
public class Clazz implements Intf {
public class Clazz implements IntF {
}
@@ -1,12 +1,12 @@
interface Intf {
interface IntF {
}
interface Factory<E extends Intf> {
interface Factory<E extends IntF> {
E create();
void save(E obj);
static class helper {
static Factory<Intf> get2() {
static Factory<IntF> get2() {
return (Factory)new Factory<Clazz>() {
public Clazz create() { return null; }
public void save(Clazz obj) { }
@@ -16,5 +16,5 @@ interface Factory<E extends Intf> {
}
public class Clazz implements Intf {
public class Clazz implements IntF {
}
@@ -1,22 +1,21 @@
interface Intf {
interface IntF {
}
interface Factory<E extends Intf> {
interface Factory<E extends IntF> {
E create();
void save(E obj);
static class helper {
static Factory<Intf> get() {
static Factory<IntF> get() {
return null;
}
}
}
public class Clazz implements Intf {
public class Clazz implements IntF {
void bar() {
Intf y = Factory.helper.get().create();
IntF y = Factory.helper.get().create();
Factory.helper.get().save(y);
}
}
@@ -1,20 +1,19 @@
interface Intf {
interface IntF {
}
interface Factory<E extends Intf> {
interface Factory<E extends IntF> {
E create();
void save(E obj);
static class helper {
static Factory<Intf> get() {
static Factory<IntF> get() {
return null;
}
}
}
public class Clazz implements Intf {
public class Clazz implements IntF {
void bar() {
Clazz y = Factory.helper.get().create();
Factory.helper.get().save(y);