2 * Copyright (c) 2014 Cisco Systems, Inc. and others. 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.binding.data.codec.impl;
10 import com.google.common.base.Preconditions;
12 import java.util.List;
14 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.PathArgument;
15 import org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode;
16 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
17 import org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode;
19 final class CaseNodeCodecContext extends DataObjectCodecContext<ChoiceCaseNode> {
20 public CaseNodeCodecContext(final DataContainerCodecPrototype<ChoiceCaseNode> prototype) {
25 protected void addYangPathArgument(final PathArgument arg,
26 final List<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> builder) {
31 protected Object dataFromNormalizedNode(final NormalizedNode<?, ?> normalizedNode) {
32 Preconditions.checkState(normalizedNode instanceof ChoiceNode);
33 return LazyDataObject.create(this, (ChoiceNode) normalizedNode);