ContainerEffectiveStatementImpl.java 文件源码

java
阅读 35 收藏 0 点赞 0 评论 0

项目:yangtools 作者:
ContainerEffectiveStatementImpl(
        final StmtContext<QName, ContainerStatement, EffectiveStatement<QName, ContainerStatement>> ctx) {
    super(ctx);
    this.original = (ContainerSchemaNode) ctx.getOriginalCtx().map(StmtContext::buildEffective).orElse(null);
    final ImmutableSet.Builder<ActionDefinition> actionsBuilder = ImmutableSet.builder();
    final Builder<NotificationDefinition> notificationsBuilder = ImmutableSet.builder();
    for (final EffectiveStatement<?, ?> effectiveStatement : effectiveSubstatements()) {
        if (effectiveStatement instanceof ActionDefinition) {
            actionsBuilder.add((ActionDefinition) effectiveStatement);
        }

        if (effectiveStatement instanceof NotificationDefinition) {
            notificationsBuilder.add((NotificationDefinition) effectiveStatement);
        }
    }

    this.actions = actionsBuilder.build();
    this.notifications = notificationsBuilder.build();
    presence = findFirstEffectiveSubstatement(PresenceEffectiveStatement.class).isPresent();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号