- 366 名前:デフォルトの名無しさん mailto:sage [2009/10/24(土) 01:54:34 ]
- >>365 こんなのであってます?
private String str1; private String str2; public String getStr1() { this.str1; } public String getStr2() { this.str2; } public void setValue(String fieldName, Object value) throws Exception { Field f = this.getClass().getField(fieldName); if (value != null) { if (value instanceof String) { f.set(this, ((String)value).trim()); } else { f.set(this., value); } } }
|

|