protected Map<String, Object> buildParametersDescription( InitializrMetadata metadata) { Map<String, Object> result = new LinkedHashMap<>(); BeanWrapperImpl wrapper = new BeanWrapperImpl(metadata); for (PropertyDescriptor descriptor : wrapper.getPropertyDescriptors()) { Object value = wrapper.getPropertyValue(descriptor.getName()); BeanWrapperImpl nested = new BeanWrapperImpl(value); if (nested.isReadableProperty("description") && nested.isReadableProperty("id")) { result.put((String) nested.getPropertyValue("id"), nested.getPropertyValue("description")); } } result.put("applicationName", "application name"); result.put("baseDir", "base directory to create in the archive"); return result; }
if (bean.isReadableProperty(descriptor.getName())) { model.put(descriptor.getName(), bean.getPropertyValue(descriptor.getName()));
if (!beanWrapper.isReadableProperty(propertyNames.get(0))) { return false;
@Override public Object intercept(Object object, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { BeanWrapperImpl bean = new BeanWrapperImpl(proxied); PropertyDescriptor pd = BeanUtils.findPropertyForMethod(method); if(pd != null) { String propertyName = pd.getName(); PropertyValue x; boolean writable = bean.isWritableProperty(propertyName); boolean readable = bean.isReadableProperty(propertyName); System.out.println(propertyName + " " + readable + " " + writable); } //return methodProxy.invokeSuper(object, args); return methodProxy.invoke(proxied, args); }
@Override public Object intercept(Object object, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { BeanWrapperImpl bean = new BeanWrapperImpl(proxied); PropertyDescriptor pd = BeanUtils.findPropertyForMethod(method); if(pd != null) { String propertyName = pd.getName(); PropertyValue x; boolean writable = bean.isWritableProperty(propertyName); boolean readable = bean.isReadableProperty(propertyName); System.out.println(propertyName + " " + readable + " " + writable); } //return methodProxy.invokeSuper(object, args); return methodProxy.invoke(proxied, args); }
if (!beanWrapper.isReadableProperty(propertyNames.get(0))) { return false;
boolean isOk = true; for (String propName : this.hasProperties) { if (!wrapper.isReadableProperty(propName)) { isOk = false; && wrapper.isReadableProperty(this.keyProperty)) { key = wrapper.getPropertyValue(this.keyProperty); final BeanWrapperImpl wrapper = new BeanWrapperImpl(bean); if (this.keyProperty != null && this.keyProperty.length() > 0 && wrapper.isReadableProperty(this.keyProperty)) { key = wrapper.getPropertyValue(this.keyProperty);
if (!entityBean.isReadableProperty(unescapedFieldName)) { if (LOGGER.isTraceEnabled()) { LOGGER.trace("Property [{}] not fond in bean {} [{}]",
if (!entityBean.isReadableProperty(unescapedFieldName)) { if (LOGGER.isTraceEnabled()) { LOGGER.trace("Property [{}] not fond in bean {} [{}]",
if (beanWrapper.isReadableProperty(name)) { option.withDefaultValue(beanWrapper.getPropertyValue(name));
boolean isReadable = beanWrapper.isReadableProperty(propertyName); boolean isWritable = beanWrapper.isWritableProperty(propertyName); if(isReadable && isWritable) {