BeanUtils就是一个处理Bean的工具包。内部也是使用内省。但对内省做了加强.

Bean的set |get不用再成对出现

核心类:

BeanUtils。

1、导包

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOIAAAA+CAIAAAC5jlDUAAAHmUlEQVR4nO2c708TZxzA7w/YC5O92pIlMyHuxSwk2Jjtxd7s1UIyZm1iFEdNlsX5gph5uy0iUxkFgQ2VX1MTIpskUGZoaaOYBSUaQUeZIZjYpYrU1iL94aFNSreOsWwv2t49d/fcj17b6518n3xizqcPzz333Ifv81y9r8R8fE4JV+65Z8MzWnLlnlvh2IBXHkJhO9AUKCOgKWAANNa0y0LUng3PzE4fNhHbj0zPzIZHj+wgLEOgKSCFSk2nf9jJAJoCpUaNps6Giv+Q4myoyFtTFtAUkCdvTafbdqajF9LRCwl/d3ShI3jrqN/95XTbThTQFCgueWt6o606nZiV4EZbtbJFP+NrRtMuC5EtjLKgKcCQv6Ynq9NRtwSDB97OV1OCCbFDtcwxaAow5K3p1ZPV6eDPDE6ySgLF0RSzBwBNAYa8NXWS76b93RmcZFU6eAFLdKEDNAWKRd6aDjdUpP0daX+Hk6zKHAgRcVR80d/flWkw1rwdFn1ASN6aDh54K71w1ElWpReasYg7Kh5N99fmnqDY7wFAU4Ahb03P7n7DSValF45ikXQ0P0BTgEHN1/uDB9+RoCiOgqYACrx6AhgA0BQwAKApYADy0FR7yj47gE5QqikAlBHQFDAAGml63TfnuDX704Q8jluz133lnxdAV2ik6fDUHd+jQCqV+ktQ1tbWmONUKuV7FBieulP2eQF0hUaanhu7ubq6urGx8S9SNjY21tbWEg9n1tfXmZrV1dVzYzfLPi/Fw0WZCatD8/N6yUrCRHnn5uM9VsLSW95JYAejEo007XZM0jT9D1LW19eTyeTq9S76zHupVIqpp2m62zFZzjktMsbT1GM3VdpdIn1mCs45B/Nqu+BTo2jaeWkiFov9jZREIhH/tfN527aXL18+vz+ZSqUy9bFYrPPShNY3tYRoqSn2XPlomhMRp2mPlch17rAQZtLD+5S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00rTPM1LX2PLBp6QsdY0tfZ6R8s8voCfgtWjAAICmgAEATQEDAJoCBgByoQADALlQgAGAXKhSU+xUpIITNow4AMiFKjW61lQ07amUiU0qgFyoUqODxE4s0mlPpUxsUgHkQpUafWoqmfbEH39Z9xjxuXnIhSp9LhSqKbZbtN5E2dHXpXH1vNelBeMR7w2DvKYlSGzSr6abOBeKk+Mh1i3nfVP2LWxcPe9CeOMR7U2VpqVJbNKvpps4FyqnqVi3vHrmr2L10sknYj+Vb9pTKROb9KvpJs6FktBUUqwia4pHTNOSJjbpV9NNnAslvuhLL+6KFn18dFe56GuV2KRfTTdxLpSCRyj0/2ZCH3qw9TKaivemXNMSJzbpV1PIhVKK2DItt3zn11shFJzYpALIhSo7LsrMCbe58CZWr663olF4YpMKIBdKByDfPnKsEqtX11vhFCmxSQWQCwUYAHgtGjAAoClgAEBTwACApoABUKnp0rzjY8fvtSPeXY7Z3aPeXb/cC9y/XPaLAV5V/gdNKtAzYjfUOQAAAABJRU5ErkJggg==" alt="" />

由于运行时需要写日志,所以还需要导logging.jar,否则会报错

 //1、设置属性  setXxx
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
String data="2010-5-6";
User u=new User();
BeanUtils.setProperty(u, "id", "jack");
BeanUtils.setProperty(u, "age", "90");
BeanUtils.setProperty(u, "birthday", sdf.parse(data));
System.err.println(u);
System.err.println("===========================");
//2、获取属性
String id= BeanUtils.getProperty(u, "id");
System.err.println(id);
//3、整体赋值
Map<String,Object> map=new HashMap<String, Object>();
map.put("id", "Rose");
map.put("age", "99");
BeanUtils.populate(u, map);
System.err.println(u);

注意:BeanUtils对类型进行转换只能进行简单的转换,如上面的date类型就需要自己进行转化

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAp4AAAB6CAIAAACZXsR5AAAXK0lEQVR4nO2dO5LqOhCGvSBC2AcroNjBLIIqMvZws6maWcRkpwqCyciJiSYg5wa2sbrV3XrYBlv8qq9OncFGVrda+vWwTfX39/fff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FpBwAAAIoC0g4AAAAUBaQdAAAAKApIOwAAAFAUkHYAAACgKCDtAAAAQFFA2gEAAICigLQDAAAARQFpBwAAAIoC0g4AAAAUBaQdAAAAKApIOwAAAFAUkHYAAACgKCDtAAAAQFFA2gEAAICigLQDAAAARQFpBwAAAIoC0g4AAAAUBaQdAAAAKIr/AUF2hr/r0SZQAAAAAElFTkSuQmCC" alt="" />

BeanUtils--内省加强的更多相关文章

  1. springboot整合springdata-jpa

    1.简介  SpringData : Spring 的一个子项目.用于简化数据库访问,支持NoSQL 和 关系数据存储.其主要目标是使数据库的访问变得方便快捷. SpringData 项目所支持 No ...

  2. web-day10

    第10章WEB10-requet&response篇 今日任务 登录系统后完成文件下载 商城系统注册功能. 教学导航 教学目标 掌握response设置响应头 掌握response重定向和转发 ...

  3. 内省、JavaBean、PropertyDescriptor类、Introspector类、BeanUtils工具包、注解、Rentention、Target、注解的基本属性和高级属性

      本文转载自:http://blog.sina.com.cn/s/blog_5d65a16901011kom.html 关键字:内省.JavaBean.PropertyDescriptor类.Int ...

  4. javaweb学习总结五(内省、beanUtils工具包)

    一:内省的概念 1:内省是反射的一种特例,由于在反射中频繁的操作javabean,所以为了方便反射 javabean,sun公司开发出一套API提高效率. 2:javaBean,就是用来封装客户端请求 ...

  5. JavaBean 内省API BeanUtils工具 泛型 xml xml约束

    1 什么是JavaBean?有何特征? 1)符合特定规则的类    2)JavaBean分二类:     a)侠义的JavaBean         .私有的字段(Field)         .对私 ...

  6. 内省(二)之BeanUtils工具类

    上一篇内省(Introspector)讲到的是采用JavaAPI中的类来操作bean及其属性,而Apache也开源了第三方框架来简化和丰富了对bean属性的操作,这个框架就是BeanUtils. 使用 ...

  7. JavaEE JavaBean 反射、内省、BeanUtils

    JavaEE JavaBean 反射.内省.BeanUtils @author ixenos JavaBean是什么 一种规范,表达实体和信息的规范,便于封装重用. 1.所有属性为private2.提 ...

  8. day27(反射之内省机制实现BeanUtils)

    使用内省方式来实现beanUtils往对象里面存值 public class BeanInfoUtil2 { public static void setPropertyByIntrospector( ...

  9. JAVA中反射机制五(JavaBean的内省与BeanUtils库)

    内省(Introspector) 是Java 语言对JavaBean类属性.事件的一种缺省处理方法. JavaBean是一种特殊的类,主要用于传递数据信息,这种类中的方法主要用于访问私有的字段,且方法 ...

  10. javabean的内省技术和BeanUtils的使用

    一.关于javabean javabean是固定写法的java类 书写格式为: 1)必须有无参构造函数 2)属性必须私有, 我们称为字段 3)提供标准的getter和setter 例: name 字段 ...

随机推荐

  1. Egret 文本处理

    常规处理: private createGameScene():void { var shp = new egret.Shape(); shp.graphics.beginFill(0xff0000, ...

  2. codevs 3269 混合背包

    题目描述 Description 背包体积为V ,给出N个物品,每个物品占用体积为Vi,价值为Wi,每个物品要么至多取1件,要么至多取mi件(mi > 1) , 要么数量无限 , 在所装物品总体 ...

  3. 转:Hprose for php(二)——服务器

    文章来自于:http://blog.csdn.net/half1/article/details/21252879 本文将介绍Hprose for php服务器的更多细节 1.发布服务 Hprose提 ...

  4. ImportError: No module named matlab

    这个matlab已经改名为pylab了,你可以运行: from pylab import *

  5. linux命令之文件、文件夹操作

    文件 创建文件 touch fileName 拷贝文件 基本形式: cp source destination tips: 1) 将文件拷贝纸当前目录 cp source . 2)常用参数 -R -r ...

  6. 【动态规划】XMU 1028 Game Boy Advance

    题目链接: http://acm.xmu.edu.cn/JudgeOnline/problem.php?id=1028 题目大意: 求01背包最优解的方案.物件数和物件编号. 题目思路: [动态规划] ...

  7. C#之VS2010开发Web Service

    一:创建web service vs2010软件默认的framework是4.0版本,所以想创建web服务的时候压根看不到web服务应用程序.网上有人说vs2010的web service 跟wcf合 ...

  8. Eclipse无法设置NDK路径的解决方法

    如果在Eclipse中设置NDK路径的时候遇到下面的情况(尼玛,我的NDK设置呢?): 可以参考百度经验解决:http://jingyan.baidu.com/article/4d58d5413000 ...

  9. Java程序员容易犯的10个错误

    1. Array 转 ArrayList 一般开发者喜欢用: List<String> list = Arrays.asList(arr); Arrays.asList() 会返回一个Ar ...

  10. Python自动化之Django的CSRF

    什么CSRF? CSRF, Cross Site Request Forgery, 跨站点伪造请求.举例来讲,某个恶意的网站上有一个指向你的网站的链接,如果 某个用户已经登录到你的网站上了,那么当这个 ...