mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
introduce parameter object: add setters/getters, fix visibility for existing class
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
public class Param {
|
||||
private final int[] i;
|
||||
|
||||
public Param(int... i) {
|
||||
this.i = i;
|
||||
}
|
||||
|
||||
public int[] getI() {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class Test {
|
||||
void foo(Param param1) {
|
||||
if (param1.getI().lenght == 0) {
|
||||
}
|
||||
Param param = null;
|
||||
}
|
||||
|
||||
void bar(){
|
||||
foo(new Param(1, 2));
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
public class Param {
|
||||
private final int[] i;
|
||||
|
||||
public Param(int... i) {
|
||||
this.i = i;
|
||||
}
|
||||
|
||||
public int[] getI() {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class Test {
|
||||
void foo(int... i) {
|
||||
if (i.lenght == 0) {
|
||||
}
|
||||
Param param = null;
|
||||
}
|
||||
|
||||
void bar(){
|
||||
foo(1, 2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user