Methods Summary |
---|
private static java.lang.String | createGetterName(java.lang.String propName)
String retVal = "get";//NOI18N
String capitalizedProp = propName.toUpperCase();
return retVal + capitalizedProp.substring(0,1) + propName.substring(1);
|
public static java.lang.reflect.Method | getReader(java.lang.Object target, java.lang.String destFieldName)
try {
PropertyDescriptor destPd = new PropertyDescriptor(destFieldName, target.getClass());
return destPd.getReadMethod();
}
catch (java.beans.IntrospectionException t) {
//Reporter.critical(new StackTrace(t)); //NOI18N
//throw t;
return getReader2(target,destFieldName);
}
|
public static java.lang.reflect.Method | getReader2(java.lang.Object target, java.lang.String destFieldName)
String getterName = createGetterName(destFieldName);
Class targetClass = null;
try {
targetClass = target.getClass();
Method reader = targetClass.getMethod(getterName,null);
return reader;
//PropertyDescriptor destPd = new PropertyDescriptor(destFieldName, target.getClass());
//return destPd.getReadMethod();
}
catch (Throwable t) {
Method[] allmethods = targetClass.getMethods();
for (int i = 0; null != allmethods && i < allmethods.length; i++)
Reporter.info(allmethods[i].getReturnType() + " " +allmethods[i].getName());//NOI18N
Reporter.critical(new StackTrace(t)); //NOI18N
throw new java.beans.IntrospectionException(getterName);
//return getReader2(target,destFieldName);
}
|
public static java.lang.reflect.Method | getWriter(java.lang.Object target, java.lang.String destFieldName)
try {
PropertyDescriptor destPd = new PropertyDescriptor(destFieldName, target.getClass());
return destPd.getWriteMethod();
}
catch (java.beans.IntrospectionException t) {
Reporter.critical(new StackTrace(t)); //NOI18N
throw t;
}
|