introduce parameter object: downgrade accessibilty for inner classes (IDEADEV-35295)

This commit is contained in:
anna
2010-01-14 14:28:23 +03:00
parent eced11faaf
commit b326598366
9 changed files with 63 additions and 7 deletions

View File

@@ -5,10 +5,10 @@ class Test {
void bar(String s){}
public static class Param {
private static class Param {
private final String s;
public Param(String s) {
private Param(String s) {
this.s = s;
}

View File

@@ -1,10 +1,10 @@
public interface Test {
void foo(Param param);
public static class Param {
private static class Param {
private final String s;
public Param(String s) {
private Param(String s) {
this.s = s;
}
@@ -15,6 +15,6 @@ public interface Test {
}
class TestImpl implements Test {
void foo(Param param){}
void foo(Test.Param param){}
}

View File

@@ -0,0 +1,19 @@
class Test {
void foo(Param param) {
bar(param.getS());
}
void bar(String s){}
static class Param {
private final String s;
Param(String s) {
this.s = s;
}
public String getS() {
return s;
}
}
}

View File

@@ -0,0 +1,5 @@
class Usage {
void barr(Test t) {
t.foo(new Test.Param(""));
}
}

View File

@@ -0,0 +1,7 @@
class Test {
void foo(String s) {
bar(s);
}
void bar(String s){}
}

View File

@@ -0,0 +1,5 @@
class Usage {
void barr(Test t) {
t.foo("");
}
}