import com.sun.beans.editors.EnumEditor; //导入依赖的package包/类
public void run() {
PropertyEditorManager.registerEditor(ThirdBean.class, ThirdBeanEditor.class);
test(FirstBean.class, FirstBeanEditor.class);
test(SecondBean.class, null);
test(ThirdBean.class, ThirdBeanEditor.class);
// test editors for default primitive types
test(Byte.TYPE, ByteEditor.class);
test(Short.TYPE, ShortEditor.class);
test(Integer.TYPE, IntegerEditor.class);
test(Long.TYPE, LongEditor.class);
test(Boolean.TYPE, BooleanEditor.class);
test(Float.TYPE, FloatEditor.class);
test(Double.TYPE, DoubleEditor.class);
// test editors for default object types
test(Byte.class, ByteEditor.class);
test(Short.class, ShortEditor.class);
test(Integer.class, IntegerEditor.class);
test(Long.class, LongEditor.class);
test(Boolean.class, BooleanEditor.class);
test(Float.class, FloatEditor.class);
test(Double.class, DoubleEditor.class);
test(String.class, StringEditor.class);
test(Color.class, ColorEditor.class);
test(Font.class, FontEditor.class);
test(Enumeration.class, EnumEditor.class);
PropertyEditorManager.registerEditor(ThirdBean.class, null);
PropertyEditorManager.setEditorSearchPath(SEARCH_PATH);
test(FirstBean.class, FirstBeanEditor.class);
test(SecondBean.class, SecondBeanEditor.class);
test(ThirdBean.class, ThirdBeanEditor.class);
// test editors for default primitive types
test(Byte.TYPE, ByteEditor.class);
test(Short.TYPE, ShortEditor.class);
test(Integer.TYPE, IntegerEditor.class);
test(Long.TYPE, LongEditor.class);
test(Boolean.TYPE, BooleanEditor.class);
test(Float.TYPE, FloatEditor.class);
test(Double.TYPE, DoubleEditor.class);
// test editors for default object types
test(Byte.class, null);
test(Short.class, null);
test(Integer.class, null);
test(Long.class, null);
test(Boolean.class, null);
test(Float.class, null);
test(Double.class, null);
test(String.class, null);
test(Color.class, null);
test(Font.class, null);
test(Enumeration.class, EnumEditor.class);
}
请发表评论