All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cds.impl.parser.PathParser Maven / Gradle / Ivy

There is a newer version: 3.6.1
Show newest version
/*******************************************************************
 * © 2019 SAP SE or an SAP affiliate company. All rights reserved. *
 *******************************************************************/
package com.sap.cds.impl.parser;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import com.sap.cds.impl.parser.token.RefSegmentImpl;
import com.sap.cds.ql.RefSegment;

public class PathParser {

	private PathParser() {
	}

	public static List segments(String path) {
		return segments(path.split("\\."));
	}

	public static List segments(String... segments) {
		return Arrays.stream(segments).map(RefSegmentImpl::refSegment).collect(Collectors.toList());
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy