添加元注解。

This commit is contained in:
zhouxy108 2023-07-06 10:06:08 +08:00
parent 98bfdfc6aa
commit b0a5255fbc
2 changed files with 14 additions and 0 deletions

View File

@ -16,6 +16,11 @@
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;
/**
* 标识该方法是可覆写的
* <p>该注解用于提醒强调父类虽然有默认实现但子类可以根据自己的需要覆写</p>
@ -23,5 +28,7 @@ package xyz.zhouxy.plusone.commons.annotation;
* @author <a href="https://gitee.com/zhouxy108">ZhouXY</a>
* @since 0.1.0
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.SOURCE)
public @interface Overridable {
}

View File

@ -16,11 +16,18 @@
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;
/**
* ValueObject - 值对象
*
* @author <a href="https://gitee.com/zhouxy108">ZhouXY</a>
* @since 0.1.0
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface ValueObject {
}