package plugin; import library.JavaClass; import library.JavaInterface; import library.JavaMethodOwner; import library.JavaNestedClassOwner; import library.JavaNonExtendableNestedOwner; import library.KotlinClass; import library.KotlinInterface; import library.KotlinMethodOwner; import library.KotlinNestedClassOwner; import library.KotlinNonExtendableNestedOwner; //Extensions of Java classes class JavaInheritor extends JavaClass { } class JavaImplementor implements JavaInterface { } interface JavaInterfaceInheritor extends JavaInterface { } class JavaNonExtendableNestedInheritor extends JavaNonExtendableNestedOwner.NonExtendableNested { } class JavaMethodOverrider extends JavaMethodOwner { @Override public void doNotOverride() { } } class JavaNestedClassInheritor extends JavaNestedClassOwner.NestedClass { } //Extensions of Kotlin classes class KotlinInheritor extends KotlinClass { } class KotlinImplementor implements KotlinInterface { } interface KotlinInterfaceInheritor extends JavaInterface { } class KotlinNonExtendableNestedInheritor extends KotlinNonExtendableNestedOwner.NonExtendableNested { } class KotlinMethodOverrider extends KotlinMethodOwner { @Override public void doNotOverride() { } } class KotlinNestedClassInheritor extends KotlinNestedClassOwner.NestedClass { } class AnynymousClasses { public void anonymous() { new JavaClass() { }; new JavaInterface() { }; new JavaNonExtendableNestedOwner.NonExtendableNested() { }; new KotlinClass() { }; new KotlinInterface() { }; new KotlinNonExtendableNestedOwner.NonExtendableNested() { }; //No warnings new JavaNestedClassOwner.NestedClass() { }; new KotlinNestedClassOwner.NestedClass() { }; new JavaMethodOwner() { @Override public void doNotOverride() { } }; new KotlinMethodOwner() { @Override public void doNotOverride() { } }; } }