public static final Templates TEMPLATE = new UnderscoreTemplates();
@SuppressWarnings("unchecked")
private static <T> Path<T> replaceParent(Path<T> path, Path<?> parent) {
PathMetadata<?> metadata = new PathMetadata(parent, path.getMetadata().getElement(),
path.getMetadata().getPathType());
return new PathImpl<T>(path.getType(), metadata);
}