一个既简单的校验框架

上传者: three_man | 上传时间: 2021-08-07 16:39:06 | 文件大小: 28KB | 文件类型: ZIP
主要的技术上使用了注解, 然后通过反射再利用注解解析器来进行解析进行校验 校验器每个方法返回this,可以使用更优雅的代码来完成校验 并且还可以比较方便的扩展。

文件下载

资源详情

[{"title":"( 36 个子文件 28KB ) 一个既简单的校验框架","children":[{"title":"MiniValidator","children":[{"title":"bin","children":[{"title":"com","children":[{"title":"prince","children":[{"title":"validator","children":[{"title":"User.class <span style='color:#111;'> 1.62KB </span>","children":null,"spread":false},{"title":"TestValidator.class <span style='color:#111;'> 700B </span>","children":null,"spread":false},{"title":"Rule","children":[{"title":"AnnotationRule.class <span style='color:#111;'> 995B </span>","children":null,"spread":false},{"title":"Rule.class <span style='color:#111;'> 183B </span>","children":null,"spread":false}],"spread":true},{"title":"Validator.class <span style='color:#111;'> 1.60KB </span>","children":null,"spread":false},{"title":"AnnotationValidator.class <span style='color:#111;'> 2.97KB </span>","children":null,"spread":false},{"title":"annotation","children":[{"title":"NotBlank.class <span style='color:#111;'> 443B </span>","children":null,"spread":false},{"title":"NotNull.class <span style='color:#111;'> 441B </span>","children":null,"spread":false},{"title":"Less.class <span style='color:#111;'> 449B </span>","children":null,"spread":false},{"title":"Eq.class <span style='color:#111;'> 439B </span>","children":null,"spread":false},{"title":"DateFormat.class <span style='color:#111;'> 464B </span>","children":null,"spread":false},{"title":"parser","children":[{"title":"NotBlankParser.class <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"NotNullParser.class <span style='color:#111;'> 1.47KB </span>","children":null,"spread":false},{"title":"ValidateResult.class <span style='color:#111;'> 725B </span>","children":null,"spread":false},{"title":"DateFormatParser.class <span style='color:#111;'> 1.79KB </span>","children":null,"spread":false},{"title":"IAnnotationParser.class <span style='color:#111;'> 276B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"TestAnnotationValidator.class <span style='color:#111;'> 1.39KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".settings","children":[{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 629B </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"test","children":[{"title":"java","children":[{"title":"com","children":[{"title":"prince","children":[{"title":"validator","children":[{"title":"TestAnnotationValidator.java <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"TestValidator.java <span style='color:#111;'> 226B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"main","children":[{"title":"java","children":[{"title":"com","children":[{"title":"prince","children":[{"title":"validator","children":[{"title":"Validator.java <span style='color:#111;'> 1.01KB </span>","children":null,"spread":false},{"title":"Rule","children":[{"title":"AnnotationRule.java <span style='color:#111;'> 672B </span>","children":null,"spread":false},{"title":"Rule.java <span style='color:#111;'> 207B </span>","children":null,"spread":false}],"spread":true},{"title":"AnnotationValidator.java <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"annotation","children":[{"title":"Less.java <span style='color:#111;'> 443B </span>","children":null,"spread":false},{"title":"Eq.java <span style='color:#111;'> 444B </span>","children":null,"spread":false},{"title":"NotBlank.java <span style='color:#111;'> 401B </span>","children":null,"spread":false},{"title":"DateFormat.java <span style='color:#111;'> 493B </span>","children":null,"spread":false},{"title":"NotNull.java <span style='color:#111;'> 403B </span>","children":null,"spread":false},{"title":"parser","children":[{"title":"ValidateResult.java <span style='color:#111;'> 744B </span>","children":null,"spread":false},{"title":"DateFormatParser.java <span style='color:#111;'> 985B </span>","children":null,"spread":false},{"title":"NotBlankParser.java <span style='color:#111;'> 751B </span>","children":null,"spread":false},{"title":"IAnnotationParser.java <span style='color:#111;'> 589B </span>","children":null,"spread":false},{"title":"NotNullParser.java <span style='color:#111;'> 677B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".project <span style='color:#111;'> 389B </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 363B </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • longjunping :
    谢谢分享。
    2017-12-07
  • qq_29892825 :
    比较好的检验框架,谢谢分享!
    2017-09-29
  • mrhu881228 :
    谢谢分享。
    2017-08-14
  • caobeikuku :
    谢谢分享 。
    2016-06-30

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明