Open bengbengbalabalabeng opened 1 month ago
模块:sql-core 涉及代码:@Nullable、@NotNull 建议:支持 JSR-305 规范,这样可以让标记了以上注解的 API 在常用的 IDE 上有更好的可读性(如:idea 中对代码加重灰色提示可能出现的潜在问题)提升代码的健壮性。
sql-core
@Nullable
@NotNull
API
IDE
idea
com.easy.query.core.annotation.Nullable
package com.easy.query.core.annotation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; // jsr-305 support import javax.annotation.Nonnull; import javax.annotation.meta.TypeQualifierNickname; import javax.annotation.meta.When; // jsr-305 support /** * create time 2023/11/26 07:32 * 文件说明 * * @author xuejiaming */ @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE}) // jsr-305 support @Nonnull(when=MAYBE) @TypeQualifierNickname // jsr-305 support public @interface Nullable { String value() default ""; }
com.easy.query.core.annotation.NotNull
package com.easy.query.core.annotation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; // jsr-305 support import javax.annotation.Nonnull; import javax.annotation.meta.TypeQualifierNickname; // jsr-305 support /** * create time 2023/11/26 07:32 * 文件说明 * * @author xuejiaming */ @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE}) // jsr-305 support @Nonnull @TypeQualifierNickname // jsr-305 support public @interface NotNull { String value() default ""; }
@bengbengbalabalabeng 非常棒的建议后续会逐步增加
模块:
sql-core
涉及代码:@Nullable
、@NotNull
建议:支持 JSR-305 规范,这样可以让标记了以上注解的API
在常用的IDE
上有更好的可读性(如:idea
中对代码加重灰色提示可能出现的潜在问题)提升代码的健壮性。com.easy.query.core.annotation.Nullable
com.easy.query.core.annotation.NotNull