1 16 17 package org.springframework.beans.propertyeditors; 18 19 import java.beans.PropertyEditorSupport ; 20 21 29 public class CharArrayPropertyEditor extends PropertyEditorSupport { 30 31 public void setAsText(String text) { 32 setValue(text != null ? text.toCharArray() : null); 33 } 34 35 public String getAsText() { 36 char[] value = (char[]) getValue(); 37 return (value != null ? new String (value) : ""); 38 } 39 40 } 41 | Popular Tags |