删除注解。可使用 JavaDoc 标记所覆写的父类方法。

dev
ZhouXY108 2024-04-07 16:14:03 +08:00
parent cc34af04c2
commit b2ece2fab5
2 changed files with 0 additions and 57 deletions

View File

@ -1,12 +0,0 @@
package xyz.zhouxy.plusone.commons.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.SOURCE)
public @interface DefinedIn {
Class<?>[] value();
}

View File

@ -1,45 +0,0 @@
package xyz.zhouxy.plusone.commons.annotation;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class ExplicitImplTest {
@Test
void test() {
}
}
interface A {
void fooA();
void fooAll();
}
interface B {
void fooB();
void fooAll();
}
class C implements A, B {
@DefinedIn(A.class)
@Override
public void fooA() {
}
@DefinedIn(B.class)
@Override
public void fooB() {
}
@DefinedIn({ A.class, B.class })
@Override
public void fooAll() {
}
}