首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > 简单的复制豆

简单的复制豆

  • 资源大小:14.30 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: 简单

资 源 简 介

A simple Java framework to copy beans This Java framework is a lite solution to translate beans of your multi-tiers architecture. You develop atomic and reusable translators and map them to attributes thanks to annotations. ``` DateValue value = new DateValue(); value.setDate(new Date()); DateModel model = Kopipi.translate(value, new DateModel()); ``` ``` public class DateValue { @Translate(translator = DateTranslator.class) private Date date; } public class DateModel { @Translate(translator = DateTranslator.class) private String date; } public class DateTranslator { private static final String DATE_FORMAT = "dd/MM/yyyy"; public String translate(Date date) { return new SimpleDateFormat(DATE_FORMAT).format(date); } public Date translate(String date) throws ParseException { return new SimpleDateFormat(DATE_FORMAT).parse(date); } } ```
VIP VIP
  • 睥睨 15分钟前 成为了本站会员

  • ? 1小时前 成为了本站会员

  • IATWAY 1天前 成为了本站会员

  • 大智若愚 1天前 成为了本站会员

  • Mason 1天前 成为了本站会员

  • 1天前 成为了本站会员

  • Half_Punch 2天前 成为了本站会员

  • liqing71718 2天前 成为了本站会员

  • 伟国 2天前 成为了本站会员

  • songy 2天前 成为了本站会员

0.184308s