gpt4 book ai didi

org.opendaylight.yangtools.yang.xpath.api.YangLocationPath.of()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 13:23:06 30 4
gpt4 key购买 nike

本文整理了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

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);
}

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com