mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
test++
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class Test {
|
||||
private class <caret>A {
|
||||
private B b = new B();
|
||||
private class B {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class Test {
|
||||
private static class A {
|
||||
private B b = new B();
|
||||
|
||||
public A() {
|
||||
}
|
||||
|
||||
private class B {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
class Test18 {
|
||||
|
||||
String str;
|
||||
|
||||
class <caret>A {
|
||||
boolean flag;
|
||||
|
||||
public A(boolean flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
void foo() {
|
||||
System.out.println("str = " + str);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
class Test18 {
|
||||
|
||||
String str;
|
||||
|
||||
static class A {
|
||||
boolean flag;
|
||||
private Test18 anObject;
|
||||
|
||||
public A(Test18 anObject, boolean flag) {
|
||||
this.flag = flag;
|
||||
this.anObject = anObject;
|
||||
}
|
||||
|
||||
void foo() {
|
||||
System.out.println("str = " + anObject.str);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
class Test8 {
|
||||
|
||||
void bar() {
|
||||
}
|
||||
|
||||
class <caret>B {
|
||||
|
||||
int c;
|
||||
|
||||
void foo() {
|
||||
c = 10;
|
||||
bar();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
class Test8 {
|
||||
|
||||
void bar() {
|
||||
}
|
||||
|
||||
static class B {
|
||||
|
||||
int c;
|
||||
private Test8 anObject;
|
||||
|
||||
public B(Test8 anObject) {
|
||||
this.anObject = anObject;
|
||||
}
|
||||
|
||||
void foo() {
|
||||
c = 10;
|
||||
anObject.bar();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class T {
|
||||
Object myObject;
|
||||
|
||||
void test() {
|
||||
new MyRunnable().run();
|
||||
}
|
||||
|
||||
private class <caret>MyRunnable implements Runnable {
|
||||
public void run() {
|
||||
myObject.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
class T {
|
||||
Object myObject;
|
||||
|
||||
void test() {
|
||||
new MyRunnable(myObject).run();
|
||||
}
|
||||
|
||||
private static class <caret>MyRunnable implements Runnable {
|
||||
private Object myObject;
|
||||
|
||||
public MyRunnable(Object object) {
|
||||
this.myObject = object;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
myObject.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
public class YoYo {
|
||||
class <caret>YoYoYo {
|
||||
void foo (){
|
||||
YoYo yoYoy = YoYo.this;
|
||||
}
|
||||
}
|
||||
|
||||
class Other {
|
||||
{
|
||||
new YoYoYo();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
public class YoYo {
|
||||
static class YoYoYo {
|
||||
private YoYo anObject;
|
||||
|
||||
public YoYoYo(YoYo anObject) {
|
||||
this.anObject = anObject;
|
||||
}
|
||||
|
||||
void foo (){
|
||||
YoYo yoYoy = anObject;
|
||||
}
|
||||
}
|
||||
|
||||
class Other {
|
||||
{
|
||||
new YoYoYo(YoYo.this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
public class A {
|
||||
public void test(Inner i) {
|
||||
}
|
||||
|
||||
private class <caret>Inner {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
public class A {
|
||||
public void test(Inner i) {
|
||||
}
|
||||
|
||||
private static class <caret>Inner {
|
||||
public Inner() {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
public class YoYo {
|
||||
int y;
|
||||
class <caret>YoYoYo {
|
||||
void foo (){
|
||||
YoYo yoYoy = YoYo.this;
|
||||
int t = y;
|
||||
int t1 = yoYoy.y;
|
||||
new Other();
|
||||
}
|
||||
}
|
||||
|
||||
class Other {}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
public class YoYo {
|
||||
int y;
|
||||
class <caret>YoYoYo {
|
||||
void foo (){
|
||||
YoYo yoYoy = YoYo.this;
|
||||
int t = y;
|
||||
int t1 = yoYoy.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
public class YoYo {
|
||||
int y;
|
||||
static class YoYoYo {
|
||||
private YoYo anObject;
|
||||
private int y;
|
||||
|
||||
public YoYoYo(YoYo anObject, int y) {
|
||||
this.anObject = anObject;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
void foo (){
|
||||
YoYo yoYoy = anObject;
|
||||
int t = y;
|
||||
int t1 = yoYoy.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
public class YoYo {
|
||||
int y;
|
||||
static class YoYoYo {
|
||||
private YoYo anObject;
|
||||
|
||||
public YoYoYo(YoYo anObject) {
|
||||
this.anObject = anObject;
|
||||
}
|
||||
|
||||
void foo (){
|
||||
YoYo yoYoy = anObject;
|
||||
int t = anObject.y;
|
||||
int t1 = yoYoy.y;
|
||||
anObject.new Other();
|
||||
}
|
||||
}
|
||||
|
||||
class Other {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user