* @param delimiterType Node delimiter type.
* @throws IllegalNameException when name found in a xmltag-attribute is a java keyword.
*/
private JNamedType createAndAddSimpleType(ValueNode valueNode, BindingConfig parent, DelimiterType delimiterType) throws IllegalNameException {
JType jtype;
JNamedType childToParentProperty;
if (valueNode.getDataType() != null && !valueNode.getDataType().equals("")) {
jtype = new JType(valueNode.getTypeClass());
} else {
// Default type when no specific type is given.
jtype = new JType(String.class);
}
String propertyName = EDIUtils.encodeAttributeName(jtype, valueNode.getJavaName());
childToParentProperty = new JNamedType(jtype, propertyName);
JClass parentBeanClass = parent.getBeanClass();
if(!parentBeanClass.isFinalized() && !parentBeanClass.hasProperty(propertyName) && model.isClassCreator(parentBeanClass)) {
parentBeanClass.addBeanProperty(childToParentProperty);
getWriteMethod(parent).writeValue(childToParentProperty, valueNode, delimiterType);