/** * Checks whether the property is valid or not. */ private boolean isValid(Method setMethod, Class loadedClass) { Method getMethod = correspondingGetMethod( setMethod, loadedClass); if (getMethod != null) { return RARUtils.isValidRABeanConfigProperty(getMethod.getReturnType()); } else { return false; } }
/** * Invokes the method passed and returns the value obtained. If method * invocation fails empty string is returned. If the return type is not * of Wrapper class of the primitive types, empty string is returned. */ private String getPropValue(Method method, Class loadedClass, Object loadedInstance) { Object retValue = null; Method getMethod = correspondingGetMethod(method, loadedClass); if(getMethod != null) { try { retValue = getMethod.invoke(loadedInstance, (java.lang.Object[])null); } catch (IllegalAccessException ie) { if (_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "rardeployment.illegalaccess_error", loadedClass.getName()); } } catch (InvocationTargetException ie) { if (_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "Failed to invoke the method", loadedClass.getName()); } } } return convertToString(retValue); }