}
return new NodeBuilderDefinedContextImpl(parent, messageTemplate, path);
}
public NodeBuilderCustomizableContext addPropertyNode(String name) {
final NodeImpl node;
if (!propertyPath.isRootPath()) {
if (propertyPath.getLeafNode().getKind() != null) {
node = new NodeImpl.PropertyNodeImpl(name);
propertyPath.addNode(node);
} else {
node = propertyPath.getLeafNode();
}
} else {
node = new NodeImpl.PropertyNodeImpl(name);
propertyPath.addNode(node);
}
node.setName(name);
node.setKind(ElementKind.PROPERTY); // enforce it
return new NodeBuilderCustomizableContextImpl(parent, messageTemplate, propertyPath);
}