文件名称:Proxy
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2013-12-28
- 文件大小:
- 2kb
- 下载次数:
- 0次
- 提 供 者:
- 亮*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
利用动态代理技术,完成如下功能:1. 创建Person类,Person的属性有:
Strng name 姓名
String sex 性别
Integer age 年龄
String idNo 身份证号
Boolean isMerried 是否已婚
请生成相应的getter、setter方法,并创建两个构造方法:Person(),Person(String idNo)。
2. 创建代理类 PersonProxy,PersonProxy的在代理Person类的所有setter方法时,把方法的调用时间、方法名称写入到文本文件中,每一行日志的格式为:
时间:2012-09-01 23:34:24 方法名称:setName 参数:张小平-Dynamic agent technology, complete the following functions: (1) create a Person class, Person attributes are: Strng name String name Integer age sex is sex Age String idNo ID number Boolean isMerried married Please generate the corresponding getter, setter methods, and create two constructors: Person (), Person (String idNo). (2) create a proxy class PersonProxy, all setter methods in the proxy Person class PersonProxy of the time the method is called, the method name is written to a text file, each line of the log format is: Time :2012-09-0123: 34:24 method name: setName parameters: Zhang Xiaoping
Strng name 姓名
String sex 性别
Integer age 年龄
String idNo 身份证号
Boolean isMerried 是否已婚
请生成相应的getter、setter方法,并创建两个构造方法:Person(),Person(String idNo)。
2. 创建代理类 PersonProxy,PersonProxy的在代理Person类的所有setter方法时,把方法的调用时间、方法名称写入到文本文件中,每一行日志的格式为:
时间:2012-09-01 23:34:24 方法名称:setName 参数:张小平-Dynamic agent technology, complete the following functions: (1) create a Person class, Person attributes are: Strng name String name Integer age sex is sex Age String idNo ID number Boolean isMerried married Please generate the corresponding getter, setter methods, and create two constructors: Person (), Person (String idNo). (2) create a proxy class PersonProxy, all setter methods in the proxy Person class PersonProxy of the time the method is called, the method name is written to a text file, each line of the log format is: Time :2012-09-0123: 34:24 method name: setName parameters: Zhang Xiaoping
(系统自动生成,下载前可以参看下载内容)
下载文件列表
work2\Bootsrap.java
.....\Person.java
.....\PersonProxy.java
.....\Setter.java
.....\Write.java
work2