public ConventionMapping map(Map<String, ? extends ConventionValue> mapping) { for (Map.Entry<String, ? extends ConventionValue> entry : mapping.entrySet()) { String propertyName = entry.getKey(); if (!ReflectionUtil.hasProperty(source, propertyName)) { throw new InvalidUserDataException( "You can't map a property that does not exist: propertyName=" + propertyName); } if (entry.getValue() == null) { throw new IllegalArgumentException( "No convention value provided: propertyName= " + propertyName); } } this.conventionMapping.putAll(mapping); return this; }