2 * Copyright (c) 2018 Pantheon Technologies, s.r.o. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.xpath.api;
10 import com.google.common.annotations.Beta;
11 import javax.annotation.concurrent.NotThreadSafe;
12 import javax.xml.xpath.XPathExpressionException;
15 * Interface for converting a String into a {@link YangXPathExpression}.
17 * @author Robert Varga
21 public interface YangXPathParser {
23 * Parse a string containing an XPath expression.
25 * @param xpath XPath expression string
26 * @return A parsed {@link YangXPathExpression}
27 * @throws NullPointerException if {@code xpath} is null
28 * @throws XPathExpressionException when the expression cannot be parsed
30 YangXPathExpression parseExpression(String xpath) throws XPathExpressionException;