摘要:
package com.wzh.test.beanutils;
import java.lang.reflect.InvocationTargetException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map; 阅读全文
posted @ 2013-10-19 23:11
上校
阅读(6882)
评论(0)
推荐(1)
摘要:
package com.wzh.test.introspector;
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
import org.junit.Test;
//使用内省API操作Bean的属性
public class Demo1 {
@Test
public void test() throws Exception{
// BeanInfo info=Introspector.getBeanInfo(Person.class);
// BeanInfo info=Introspector.getBeanInfo(Class.forName("com.wzh.test.introspector.Person"));
BeanInfo 阅读全文
posted @ 2013-10-19 17:00
上校
阅读(424)
评论(0)
推荐(1)
摘要:
package com.wzh.test.enum1;
import org.junit.Test;
public class demo1 {
@Test
public void test2(){
System.out.println(Ab.c.name());
System.out.println(Ab.a.ordinal());
String str="b";
Ab a=Ab.valueOf(str);
System.out.println(a);
Ab arr[]= Ab.values();
for(Ab ab : arr){
System.out.println(ab);
}
}
@Test
public void testAb() {
System.out.println(Ab.b.localValue());
System.out.println(Ab.values());
}
// 带抽象方法的枚举
enum Ab {
a 阅读全文
posted @ 2013-10-19 16:57
上校
阅读(339)
评论(0)
推荐(0)
浙公网安备 33010602011771号