mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
test++
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
class Test {
|
||||
int myField;
|
||||
Test(){
|
||||
myField = 7;
|
||||
}
|
||||
|
||||
void foo() {
|
||||
if (myField == 7){}
|
||||
}
|
||||
|
||||
void bar() {
|
||||
foo();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
class Test {
|
||||
int myField;
|
||||
Test(){
|
||||
myField = 7;
|
||||
}
|
||||
|
||||
void foo() {
|
||||
if (myField == 7){}
|
||||
}
|
||||
|
||||
void bar() {
|
||||
foo();
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
public class Extracted {
|
||||
private int myT;
|
||||
|
||||
public int getMyT() {
|
||||
return myT;
|
||||
}
|
||||
|
||||
public void setMyT(int myT) {
|
||||
this.myT = myT;
|
||||
}
|
||||
|
||||
public Extracted() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class Test {
|
||||
final Extracted extracted = new Extracted();
|
||||
|
||||
{
|
||||
extracted.setMyT(0);
|
||||
}
|
||||
|
||||
void bar(){
|
||||
int i = extracted.getMyT();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class Test {
|
||||
int myT;
|
||||
{
|
||||
myT = 0;
|
||||
}
|
||||
|
||||
void bar(){
|
||||
int i = myT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
public class Extracted {
|
||||
private int myT;
|
||||
|
||||
public Extracted() {
|
||||
}
|
||||
|
||||
public int getMyT() {
|
||||
return myT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class Test {
|
||||
final Extracted extracted = new Extracted();
|
||||
|
||||
public int getMyT() {
|
||||
return extracted.getMyT();
|
||||
}
|
||||
void bar(){
|
||||
int i = extracted.getMyT();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Test {
|
||||
int myT;
|
||||
public int getMyT() {
|
||||
return myT;
|
||||
}
|
||||
void bar(){
|
||||
int i = myT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A<T>{
|
||||
void foo(T t){}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
public class Extracted<R> {
|
||||
private final Test<R> test;
|
||||
private R myT;
|
||||
|
||||
public Extracted(Test<R> test) {
|
||||
this.test = test;
|
||||
}
|
||||
|
||||
void bar() {
|
||||
test.foo(myT);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class Test<R> extends A <R>{
|
||||
|
||||
void foo(R t){}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A<T>{
|
||||
void foo(T t){}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Test<R> extends A <R>{
|
||||
public R myT;
|
||||
|
||||
void foo(R t){}
|
||||
|
||||
void bar(){
|
||||
foo(myT);
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
public class Extracted implements I {
|
||||
public Extracted() {
|
||||
}
|
||||
|
||||
void foo() {
|
||||
System.out.println("");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
interface I {
|
||||
void foo();
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class Test implements I {
|
||||
private final Extracted extracted = new Extracted();
|
||||
|
||||
void foo() {
|
||||
extracted.foo();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
interface I {
|
||||
void foo();
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class Test implements I {
|
||||
void foo() {
|
||||
System.out.println("");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
public class Extracted {
|
||||
static class Inner {
|
||||
void foo() {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class Test {
|
||||
void bar() {
|
||||
new Extracted.Inner().foo();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Test {
|
||||
void bar() {
|
||||
new Inner().foo();
|
||||
}
|
||||
|
||||
static class Inner {
|
||||
void foo(){}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
public class Extracted {
|
||||
private int myT;
|
||||
|
||||
public Extracted() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class Test {
|
||||
final Extracted extracted = new Extracted();
|
||||
|
||||
public int getMyT() {
|
||||
return extracted.getMyT();
|
||||
}
|
||||
void bar(){
|
||||
int i = extracted.getMyT();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Test {
|
||||
int myT;
|
||||
public int getMyT() {
|
||||
return myT;
|
||||
}
|
||||
void bar(){
|
||||
int i = myT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class Test {
|
||||
int myT;
|
||||
public int getMyT() {
|
||||
return myT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class Test {
|
||||
int myT;
|
||||
public int getMyT() {
|
||||
return myT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
public class Extracted {
|
||||
public Extracted() {
|
||||
}
|
||||
|
||||
void foo() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
class Test {
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Test {
|
||||
void foo(){}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
public class Extracted<T> {
|
||||
private final Test<T> test;
|
||||
private T myT;
|
||||
|
||||
public Extracted(Test<T> test) {
|
||||
this.test = test;
|
||||
}
|
||||
|
||||
void bar() {
|
||||
test.foo(myT);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Test<T> {
|
||||
void foo(T t){}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class Test<T> {
|
||||
T myT;
|
||||
void foo(T t){}
|
||||
void bar(){
|
||||
foo(myT);
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
public class Extracted<T> {
|
||||
private T myT;
|
||||
|
||||
public Extracted() {
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class Test<T> {
|
||||
public final Extracted<T> extracted = new Extracted<T>();
|
||||
|
||||
void foo(T t){}
|
||||
void bar(){
|
||||
foo(extracted.getMyT());
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class Test<T> {
|
||||
public T myT;
|
||||
void foo(T t){}
|
||||
void bar(){
|
||||
foo(myT);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
public class Extracted<T> {
|
||||
private T myT;
|
||||
|
||||
public Extracted() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class Test<T> {
|
||||
|
||||
/**
|
||||
* {@link Extracted#myT}
|
||||
*/
|
||||
void bar(){
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Test<T> {
|
||||
T myT;
|
||||
|
||||
/**
|
||||
* {@link Test#myT}
|
||||
*/
|
||||
void bar(){
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
public class Extracted {
|
||||
static void foo() {
|
||||
System.out.println("");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class Test {
|
||||
|
||||
static void bar(){
|
||||
Extracted.foo();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Test {
|
||||
static void foo() {
|
||||
System.out.println("");
|
||||
}
|
||||
|
||||
static void bar(){
|
||||
foo();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class Test {
|
||||
int myT;
|
||||
Test(){
|
||||
myT = 0;
|
||||
}
|
||||
|
||||
public int getMyT() {
|
||||
return myT;
|
||||
}
|
||||
void bar(){
|
||||
int i = myT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class Test {
|
||||
int myT;
|
||||
Test(){
|
||||
myT = 0;
|
||||
}
|
||||
|
||||
public int getMyT() {
|
||||
return myT;
|
||||
}
|
||||
void bar(){
|
||||
int i = myT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class Test {
|
||||
int myT;
|
||||
{
|
||||
myT = 0;
|
||||
}
|
||||
|
||||
public int getMyT() {
|
||||
return myT;
|
||||
}
|
||||
void bar(){
|
||||
int i = myT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class Test {
|
||||
int myT;
|
||||
{
|
||||
myT = 0;
|
||||
}
|
||||
|
||||
public int getMyT() {
|
||||
return myT;
|
||||
}
|
||||
void bar(){
|
||||
int i = myT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
public class Extracted {
|
||||
public Extracted() {
|
||||
}
|
||||
|
||||
void foo(int... f) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class Test {
|
||||
private final Extracted extracted = new Extracted();
|
||||
|
||||
Test(){}
|
||||
|
||||
void foo(int... f) {
|
||||
extracted.foo(f);
|
||||
}
|
||||
|
||||
void bar() {
|
||||
extracted.foo(1, 2);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Test {
|
||||
Test(){}
|
||||
|
||||
void foo(int... f) {}
|
||||
|
||||
void bar() {
|
||||
foo(1, 2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user