String message = "could not set property '" + name + "' for object '" + object + "' with value '" + value + "'";  try { int index = name.lastIndexOf("."); if (index == -1) { PropertyUtils.setProperty(object, name, value); return; }  String firstPart = name.substring(0, index); String remaining = name.substring(index + 1);  Object target = getCreatedProperty(object, firstPart, create); if (target != null) { PropertyUtils.setProperty(target, remaining, value); } } catch (IllegalAccessException e) { throw new RuntimeException(message, e); } catch (InvocationTargetException e) { throw new RuntimeException(message, e); } catch (NoSuchMethodException e) { throw new RuntimeException(message, e); } catch (InstantiationException e) { throw new RuntimeException(message, e); }
String message = "could not set property '" + name + "' for object '" + object + "' with value '" + value + "'";  try { int index = name.lastIndexOf("."); if (index == -1) { PropertyUtils.setProperty(object, name, value); return; }  String firstPart = name.substring(0, index); String remaining = name.substring(index + 1);  Object target = getCreatedProperty(object, firstPart, create); if (target != null) { PropertyUtils.setProperty(target, remaining, value); } } catch (IllegalAccessException e) { throw new RuntimeException(message, e); } catch (InvocationTargetException e) { if (! (e.getCause() instanceof RuntimeException)) { throw new RuntimeException(message, e.getTargetException()); } else { throw (RuntimeException) e.getTargetException(); } } catch (NoSuchMethodException e) { throw new RuntimeException(message, e); } catch (InstantiationException e) { throw new RuntimeException(message, e); }
    static public void setProperty(Object object, String name, Object value, boolean create) {        String message = "could not set property '" + name + "' for object '" + object + "' with value '" + value + "'";                try {            int index = name.lastIndexOf(".");            if (index == -1) {                PropertyUtils.setProperty(object, name, value);                return;            }                        String firstPart = name.substring(0, index);            String remaining = name.substring(index + 1);                        Object target = getCreatedProperty(object, firstPart, create);            if (target != null) {                PropertyUtils.setProperty(target, remaining, value);            }        } catch (IllegalAccessException e) {            throw new RuntimeException(message, e);        } catch (InvocationTargetException e) {            throw new RuntimeException(message, e);        } catch (NoSuchMethodException e) {            throw new RuntimeException(message, e);        } catch (InstantiationException e) {            throw new RuntimeException(message, e);        }    }