private <P extends Path<?>> P  addMetadataOf(P newPath, Path<?> path) {
        if (path.getMetadata().getParent() instanceof EntityPath) {
            EntityPath<?> parent = (EntityPath<?>) path.getMetadata().getParent();
            if (parent.getMetadata(path) != null) {
                propertyMetadata.putIfAbsent(newPath, parent.getMetadata(path));
            }
        }
        return newPath;
    }
Creates a new PathBuilder instance

@param type type of the expression
@param variable variable name
querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java