0f6400156a373d5b3d0ee8846119c92444d9beb9
[mdsal.git] / code-generator / binding-data-codec / src / main / java / org / opendaylight / yangtools / binding / data / codec / impl / CaseNodeCodecContext.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.binding.data.codec.impl;
9
10 import java.util.List;
11 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.PathArgument;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
13 import org.opendaylight.yangtools.yang.model.api.ChoiceCaseNode;
14
15 class CaseNodeCodecContext extends DataObjectCodecContext<ChoiceCaseNode> {
16
17     private final YangInstanceIdentifier.PathArgument yangIdentifier;
18
19     CaseNodeCodecContext(final Class<?> cls, final ChoiceCaseNode nodeSchema,
20             final CodecContextFactory runtimeContext) {
21         super(cls, nodeSchema.getQName().getModule(), nodeSchema, runtimeContext);
22         this.yangIdentifier = (new YangInstanceIdentifier.NodeIdentifier(nodeSchema.getQName()));
23     }
24
25     @Override
26     protected YangInstanceIdentifier.PathArgument getDomPathArgument() {
27         return yangIdentifier;
28     }
29
30     @Override
31     protected void addYangPathArgument(final PathArgument arg,
32             final List<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> builder) {
33         // NOOP
34     }
35
36 }