From b30404f156adb6e01bfe4edc50b4de4245ba4509 Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Fri, 12 Nov 2021 11:58:05 +0100 Subject: Separate B from A test files So we are closer to a realistic setup and can tell when we accidentally look up a class in the wrong project. Also allows us to have changes in a class but not to the class or its package (i.e. same file). --- src/testB/java/b/pkg/B.java | 104 +++++++++++++++++++++++++++++++++++ src/testB/java/b/pkg/BInterface.java | 5 ++ src/testB/java/b/pkg/BParent.java | 7 +++ 3 files changed, 116 insertions(+) create mode 100644 src/testB/java/b/pkg/B.java create mode 100644 src/testB/java/b/pkg/BInterface.java create mode 100644 src/testB/java/b/pkg/BParent.java (limited to 'src/testB/java') diff --git a/src/testB/java/b/pkg/B.java b/src/testB/java/b/pkg/B.java new file mode 100644 index 0000000..150ab0b --- /dev/null +++ b/src/testB/java/b/pkg/B.java @@ -0,0 +1,104 @@ +package b.pkg; + +public class B extends BParent implements BInterface { + private B b; + private int bField; + + public B() { + } + + public B(B arg) { + } + + public static B create() { return new B(); } + + public void bMethod() { + bInterfaceMethod(); + } + + public B getB() { + return this; + } + + public B getSyntheticB() { + return this; + } + + public void setSyntheticB(B arg) { + } + + public boolean isSyntheticBooleanB() { + return false; + } + + public void setSyntheticBooleanB(boolean arg) { + } + + public B getNonSyntheticB() { + return this; + } + + public void setNonSyntheticB(B arg) { + } + + public boolean isNonSyntheticBooleanB() { + return false; + } + + public void setNonSyntheticBooleanB(boolean arg) { + } + + public B getterB() { + return this; + } + + public void setterB(B arg) { + } + + public boolean getterBooleanB() { + return false; + } + + public void setterBooleanB(boolean arg) { + } + + public int conflictingField; + public int getConflictingField() { + return conflictingField; + } + + public void bOverloaded() { + } + + public void bOverloaded(int arg) { + } + + public void bOverloaded(boolean arg) { + } + + public void commonOverloaded(Object arg) { + } + + public void commonOverloaded(B arg) { + } + + public void unmappedOverloaded(Object arg) { + } + + public void unmappedOverloaded(B arg) { + } + + @Override + public void bInterfaceMethod() { + new B() {}; + } + + public class Inner { + private int bField; + } + + public class InnerB { + } + + public class GenericB {} +} diff --git a/src/testB/java/b/pkg/BInterface.java b/src/testB/java/b/pkg/BInterface.java new file mode 100644 index 0000000..c57c72f --- /dev/null +++ b/src/testB/java/b/pkg/BInterface.java @@ -0,0 +1,5 @@ +package b.pkg; + +public interface BInterface { + void bInterfaceMethod(); +} diff --git a/src/testB/java/b/pkg/BParent.java b/src/testB/java/b/pkg/BParent.java new file mode 100644 index 0000000..d4b20fa --- /dev/null +++ b/src/testB/java/b/pkg/BParent.java @@ -0,0 +1,7 @@ +package b.pkg; + +public class BParent { + public BParent bParentMethod() { + return this; + } +} -- cgit