mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 08:50:57 +07:00
test++
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class Test1 {
|
||||
}
|
||||
class Test2 {
|
||||
public void <caret>test(Test1 t) {
|
||||
System.out.println("test");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class Test1 {
|
||||
public void test() {
|
||||
System.out.println("test");
|
||||
}
|
||||
}
|
||||
class Test2 {
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
class Foreign {
|
||||
}
|
||||
|
||||
public abstract class Test1 {
|
||||
|
||||
/**
|
||||
* @param f
|
||||
*/
|
||||
void <caret>foo (Foreign f) {
|
||||
bar();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see #foo(Foreign)
|
||||
*/
|
||||
void bar () {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
class Foreign {
|
||||
/**
|
||||
* @param test1
|
||||
*/
|
||||
void foo(Test1 test1) {
|
||||
test1.bar();
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class Test1 {
|
||||
|
||||
/**
|
||||
* @see Foreign#foo(Test1)
|
||||
*/
|
||||
void bar () {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class YoYo<T> {
|
||||
private YoYoYo myYoYoYo;
|
||||
|
||||
void <caret>foo () {
|
||||
myYoYoYo.getClass();
|
||||
}
|
||||
}
|
||||
|
||||
class YoYoYo extends YoYo {}
|
||||
@@ -0,0 +1,10 @@
|
||||
class YoYo<T> {
|
||||
private YoYoYo myYoYoYo;
|
||||
|
||||
}
|
||||
|
||||
class YoYoYo extends YoYo {
|
||||
void foo () {
|
||||
getClass();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class YoYo {
|
||||
private YoYoYo myYoYoYo;
|
||||
|
||||
void <caret>foo () {
|
||||
myYoYoYo.getClass();
|
||||
}
|
||||
}
|
||||
|
||||
class YoYoYo extends YoYo {}
|
||||
@@ -0,0 +1,10 @@
|
||||
class YoYo {
|
||||
private YoYoYo myYoYoYo;
|
||||
|
||||
}
|
||||
|
||||
class YoYoYo extends YoYo {
|
||||
void foo () {
|
||||
getClass();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
class Foreign {
|
||||
}
|
||||
|
||||
class MoveMethodTest {
|
||||
void bar() {}
|
||||
|
||||
void <caret>foo(final Foreign foreign) {
|
||||
class Inner {
|
||||
{
|
||||
MoveMethodTest.this.bar();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
class Foreign {
|
||||
void foo(MoveMethodTest moveMethodTest) {
|
||||
class Inner {
|
||||
{
|
||||
moveMethodTest.bar();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class MoveMethodTest {
|
||||
void bar() {}
|
||||
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
class CommandQueue {
|
||||
|
||||
void f() {
|
||||
}
|
||||
}
|
||||
|
||||
class CommandManager {
|
||||
|
||||
void g() {
|
||||
|
||||
}
|
||||
|
||||
CommandQueue getCommandQueue() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class Application {
|
||||
CommandManager myManager;
|
||||
{
|
||||
myManager.getCommandQueue().f();
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
public class MoveMethodTest {
|
||||
void <caret>foo (MoveMethodTest f) {
|
||||
foo(f);
|
||||
f.foo(f);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
public class MoveMethodTest {
|
||||
void foo() {
|
||||
foo();
|
||||
foo();
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
class FirstClass {
|
||||
|
||||
void y() {
|
||||
new SecondClass().x();
|
||||
}
|
||||
}
|
||||
|
||||
class SecondClass {
|
||||
SecondClass g() { return null; }
|
||||
|
||||
void x() {
|
||||
if (this != null) g().x();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
class Foreign {
|
||||
}
|
||||
|
||||
class Test {
|
||||
int field;
|
||||
|
||||
void <caret>foo (Foreign f) {
|
||||
field++;
|
||||
}
|
||||
|
||||
void bar () {
|
||||
foo(new Foreign());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class Foreign {
|
||||
void foo(Test test) {
|
||||
test.field++;
|
||||
}
|
||||
}
|
||||
|
||||
class Test {
|
||||
int field;
|
||||
|
||||
void bar () {
|
||||
new Foreign().foo(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
class Foreign {
|
||||
}
|
||||
|
||||
public abstract class Test1 {
|
||||
int field;
|
||||
Foreign myForeign;
|
||||
|
||||
void <caret>foo () {
|
||||
field++;
|
||||
}
|
||||
|
||||
void bar () {
|
||||
foo();
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
class Foreign {
|
||||
}
|
||||
|
||||
class MoveMethodTest {
|
||||
void bar(Inner inner) {}
|
||||
|
||||
class Inner {
|
||||
void <caret>foo(final Foreign foreign) {
|
||||
bar (this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
class Foreign {
|
||||
void foo(MoveMethodTest moveMethodTest, MoveMethodTest.Inner inner) {
|
||||
moveMethodTest.bar (inner);
|
||||
}
|
||||
}
|
||||
|
||||
class MoveMethodTest {
|
||||
void bar(Inner inner) {}
|
||||
|
||||
class Inner {
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user