This commit is contained in:
Dmitry Jemerov
2009-09-10 20:03:37 +04:00
parent 735897ab61
commit d1b91105a2
31 changed files with 5 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
class Test1 {
}
class Test2 {
public void <caret>test(Test1 t) {
System.out.println("test");
}
}

View File

@@ -0,0 +1,7 @@
class Test1 {
public void test() {
System.out.println("test");
}
}
class Test2 {
}

View File

@@ -0,0 +1,18 @@
interface Foreign {
}
class ForeignImpl implements Foreign {
}
public abstract class Test1 {
int field;
void <caret>foo (Foreign f) {
field++;
}
void bar () {
foo(new ForeignImpl());
}
}

View File

@@ -0,0 +1,18 @@
interface Foreign {
void foo(Test1 test1);
}
class ForeignImpl implements Foreign {
public void foo(Test1 test1) {
test1.field++;
}
}
public abstract class Test1 {
int field;
void bar () {
new ForeignImpl().foo(this);
}
}

View File

@@ -0,0 +1,18 @@
class Foreign {
}
public abstract class Test1 {
/**
* @param f
*/
void <caret>foo (Foreign f) {
bar();
}
/**
* @see #foo(Foreign)
*/
void bar () {
}
}

View File

@@ -0,0 +1,17 @@
class Foreign {
/**
* @param test1
*/
void foo(Test1 test1) {
test1.bar();
}
}
public abstract class Test1 {
/**
* @see Foreign#foo(Test1)
*/
void bar () {
}
}

View File

@@ -0,0 +1,9 @@
class YoYo<T> {
private YoYoYo myYoYoYo;
void <caret>foo () {
myYoYoYo.getClass();
}
}
class YoYoYo extends YoYo {}

View File

@@ -0,0 +1,10 @@
class YoYo<T> {
private YoYoYo myYoYoYo;
}
class YoYoYo extends YoYo {
void foo () {
getClass();
}
}

View File

@@ -0,0 +1,9 @@
class YoYo {
private YoYoYo myYoYoYo;
void <caret>foo () {
myYoYoYo.getClass();
}
}
class YoYoYo extends YoYo {}

View File

@@ -0,0 +1,10 @@
class YoYo {
private YoYoYo myYoYoYo;
}
class YoYoYo extends YoYo {
void foo () {
getClass();
}
}

View File

@@ -0,0 +1,14 @@
class Foreign {
}
class MoveMethodTest {
void bar() {}
void <caret>foo(final Foreign foreign) {
class Inner {
{
MoveMethodTest.this.bar();
}
}
}
}

View File

@@ -0,0 +1,14 @@
class Foreign {
void foo(MoveMethodTest moveMethodTest) {
class Inner {
{
moveMethodTest.bar();
}
}
}
}
class MoveMethodTest {
void bar() {}
}

View File

@@ -0,0 +1,23 @@
class CommandQueue {
}
class CommandManager {
void <caret>f(CommandQueue q) {
}
void g() {
}
CommandQueue getCommandQueue() {
return null;
}
}
class Application {
CommandManager myManager;
{
myManager.f(myManager.getCommandQueue());
}
}

View File

@@ -0,0 +1,23 @@
class CommandQueue {
void f() {
}
}
class CommandManager {
void g() {
}
CommandQueue getCommandQueue() {
return null;
}
}
class Application {
CommandManager myManager;
{
myManager.getCommandQueue().f();
}
}

View File

@@ -0,0 +1,24 @@
class CommandQueue {
}
class CommandManager {
void <caret>f(CommandQueue q) {
g();
}
void g() {
}
CommandQueue getCommandQueue() {
return null;
}
}
class Application {
CommandManager myManager;
{
myManager.f(myManager.getCommandQueue());
}
}

View File

@@ -0,0 +1,24 @@
class CommandQueue {
void f(CommandManager commandManager) {
commandManager.g();
}
}
class CommandManager {
void g() {
}
CommandQueue getCommandQueue() {
return null;
}
}
class Application {
CommandManager myManager;
{
myManager.getCommandQueue().f(myManager);
}
}

View File

@@ -0,0 +1,24 @@
class CommandQueue {
}
class CommandManager {
void <caret>f(CommandQueue q) {
notify();
}
void g() {
}
CommandQueue getCommandQueue() {
return null;
}
}
class Application {
CommandManager myManager;
{
myManager.f(myManager.getCommandQueue());
}
}

View File

@@ -0,0 +1,24 @@
class CommandQueue {
void f(CommandManager commandManager) {
commandManager.notify();
}
}
class CommandManager {
void g() {
}
CommandQueue getCommandQueue() {
return null;
}
}
class Application {
CommandManager myManager;
{
myManager.getCommandQueue().f(myManager);
}
}

View File

@@ -0,0 +1,6 @@
public class MoveMethodTest {
void <caret>foo (MoveMethodTest f) {
foo(f);
f.foo(f);
}
}

View File

@@ -0,0 +1,6 @@
public class MoveMethodTest {
void foo() {
foo();
foo();
}
}

View File

@@ -0,0 +1,13 @@
class FirstClass {
void <caret>x(SecondClass sc) {
if (sc != null) x(sc.g());
}
void y() {
x(new SecondClass());
}
}
class SecondClass {
SecondClass g() { return null; }
}

View File

@@ -0,0 +1,14 @@
class FirstClass {
void y() {
new SecondClass().x();
}
}
class SecondClass {
SecondClass g() { return null; }
void x() {
if (this != null) g().x();
}
}

View File

@@ -0,0 +1,14 @@
class Foreign {
}
class Test {
int field;
void <caret>foo (Foreign f) {
field++;
}
void bar () {
foo(new Foreign());
}
}

View File

@@ -0,0 +1,13 @@
class Foreign {
void foo(Test test) {
test.field++;
}
}
class Test {
int field;
void bar () {
new Foreign().foo(this);
}
}

View File

@@ -0,0 +1,15 @@
class Foreign {
}
public abstract class Test1 {
int field;
Foreign myForeign;
void <caret>foo () {
field++;
}
void bar () {
foo();
}
}

View File

@@ -0,0 +1,14 @@
class Foreign {
void foo(Test1 test1) {
test1.field++;
}
}
public abstract class Test1 {
int field;
Foreign myForeign;
void bar () {
myForeign.foo(this);
}
}

View File

@@ -0,0 +1,12 @@
class Foreign {
}
class MoveMethodTest {
void bar(Inner inner) {}
class Inner {
void <caret>foo(final Foreign foreign) {
bar (this);
}
}
}

View File

@@ -0,0 +1,12 @@
class Foreign {
void foo(MoveMethodTest moveMethodTest, MoveMethodTest.Inner inner) {
moveMethodTest.bar (inner);
}
}
class MoveMethodTest {
void bar(Inner inner) {}
class Inner {
}
}

View File

@@ -0,0 +1,16 @@
class Foreign {
class Inner {}
}
public abstract class Test1 {
void <caret>foo (Foreign f, Inner i) {
new Inner();
}
class Inner {}
void bar () {
foo(new Foreign(), new Inner());
}
}

View File

@@ -0,0 +1,17 @@
class Foreign {
void foo(Test1.Inner i, Test1 test1) {
test1.new Inner();
}
class Inner {}
}
public abstract class Test1 {
class Inner {}
void bar () {
new Foreign().foo(new Inner(), this);
}
}