|
|
|
|
@ -46,7 +46,7 @@ public class Property extends AbstractComponent {
|
|
|
|
|
* @param name 프로퍼티 이름
|
|
|
|
|
* @return 객체의 프로퍼티 값
|
|
|
|
|
*/
|
|
|
|
|
public static String read(Object obj, String name) {
|
|
|
|
|
public static Object read(Object obj, String name) {
|
|
|
|
|
return get().get(obj, name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -100,8 +100,10 @@ public class Property extends AbstractComponent {
|
|
|
|
|
* @param name 프로퍼티 이름
|
|
|
|
|
* @return 객체의 프로퍼티 값
|
|
|
|
|
*/
|
|
|
|
|
public String get(Object obj, String name) {
|
|
|
|
|
public Object get(Object obj, String name) {
|
|
|
|
|
try {
|
|
|
|
|
String str = BeanUtils.getIndexedProperty(obj, name);
|
|
|
|
|
System.out.println(str);
|
|
|
|
|
return BeanUtils.getProperty(obj, name);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw runtimeException(e);
|
|
|
|
|
@ -109,8 +111,9 @@ public class Property extends AbstractComponent {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Object getValue(Object obj, String name) {
|
|
|
|
|
return get(obj, name);
|
|
|
|
|
/*
|
|
|
|
|
if (name.contains("."))
|
|
|
|
|
return get(obj, name);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
return getDescriptor(obj, name)
|
|
|
|
|
.getReadMethod()
|
|
|
|
|
@ -118,7 +121,6 @@ public class Property extends AbstractComponent {
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw runtimeException(e);
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**객체에 지정하는 프로퍼티 값을 쓴다.
|
|
|
|
|
|