本文整理了Java中org.opendaylight.yangtools.yang.xpath.api.YangLocationPath.of()
方法的一些代码示例,展示了YangLocationPath.of()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YangLocationPath.of()
方法的具体详情如下:
包路径:org.opendaylight.yangtools.yang.xpath.api.YangLocationPath
类名称:YangLocationPath
方法名:of
暂无
代码示例来源:origin: org.opendaylight.yangtools/yang-xpath-api
public static final YangLocationPath of(final boolean absolute, final Step... steps) {
return of(absolute, Arrays.asList(steps));
}
代码示例来源:origin: opendaylight/yangtools
public static final YangLocationPath of(final boolean absolute, final Step... steps) {
return of(absolute, Arrays.asList(steps));
}
代码示例来源:origin: org.opendaylight.yangtools/yang-xpath-impl
private YangLocationPath parseRelativeLocationPath(final RelativeLocationPathContext expr) {
return YangLocationPath.of(false, parseLocationPathSteps(expr));
}
代码示例来源:origin: opendaylight/yangtools
private YangLocationPath parseRelativeLocationPath(final RelativeLocationPathContext expr) {
return YangLocationPath.of(false, parseLocationPathSteps(expr));
}
代码示例来源:origin: org.opendaylight.yangtools/yang-xpath-api
public static final YangLocationPath of(final boolean absolute, final Collection<Step> steps) {
if (steps.isEmpty()) {
return of(absolute);
}
final List<Step> copy = ImmutableList.copyOf(steps);
return absolute ? new AbsoluteWithSteps(copy) : new WithSteps(copy);
}
代码示例来源:origin: opendaylight/yangtools
public static final YangLocationPath of(final boolean absolute, final Collection<Step> steps) {
if (steps.isEmpty()) {
return of(absolute);
}
final List<Step> copy = ImmutableList.copyOf(steps);
return absolute ? new AbsoluteWithSteps(copy) : new WithSteps(copy);
}
代码示例来源:origin: opendaylight/yangtools
@Override
public YangLocationPath interpretAsInstanceIdentifier(final YangLiteralExpr expr) throws XPathExpressionException {
if (expr instanceof InstanceIdentifierLiteralExpr) {
return YangLocationPath.of(true, ((InstanceIdentifierLiteralExpr)expr).getSteps());
}
throw new XPathExpressionException("Invalid instance-identifier " + expr);
}
代码示例来源:origin: org.opendaylight.yangtools/yang-xpath-impl
@Override
public YangLocationPath interpretAsInstanceIdentifier(final YangLiteralExpr expr) throws XPathExpressionException {
if (expr instanceof InstanceIdentifierLiteralExpr) {
return YangLocationPath.of(true, ((InstanceIdentifierLiteralExpr)expr).getSteps());
}
throw new XPathExpressionException("Invalid instance-identifier " + expr);
}
代码示例来源:origin: org.opendaylight.yangtools/yang-xpath-impl
private YangLocationPath parseLocationPath(final LocationPathContext expr) {
verifyChildCount(expr, 1);
final ParseTree first = expr.getChild(0);
if (first instanceof RelativeLocationPathContext) {
return parseRelativeLocationPath((RelativeLocationPathContext) first);
}
final AbsoluteLocationPathNorootContext abs = verifyTree(AbsoluteLocationPathNorootContext.class, first);
verifyChildCount(abs, 2);
final Deque<Step> steps = parseLocationPathSteps(getChild(abs, RelativeLocationPathContext.class, 1));
switch (getTerminalType(abs, 0)) {
case xpathParser.PATHSEP:
break;
case xpathParser.ABRPATH:
steps.addFirst(YangXPathAxis.DESCENDANT_OR_SELF.asStep());
break;
default:
throw illegalShape(abs);
}
return YangLocationPath.of(true, steps);
}
代码示例来源:origin: opendaylight/yangtools
private YangLocationPath parseLocationPath(final LocationPathContext expr) {
verifyChildCount(expr, 1);
final ParseTree first = expr.getChild(0);
if (first instanceof RelativeLocationPathContext) {
return parseRelativeLocationPath((RelativeLocationPathContext) first);
}
final AbsoluteLocationPathNorootContext abs = verifyTree(AbsoluteLocationPathNorootContext.class, first);
verifyChildCount(abs, 2);
final Deque<Step> steps = parseLocationPathSteps(getChild(abs, RelativeLocationPathContext.class, 1));
switch (getTerminalType(abs, 0)) {
case xpathParser.PATHSEP:
break;
case xpathParser.ABRPATH:
steps.addFirst(YangXPathAxis.DESCENDANT_OR_SELF.asStep());
break;
default:
throw illegalShape(abs);
}
return YangLocationPath.of(true, steps);
}
内容来源于网络,如有侵权,请联系作者删除!