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.yang.data.impl.codec;
10 import java.util.List;
12 import org.opendaylight.yangtools.concepts.Identifiable;
13 import org.opendaylight.yangtools.yang.binding.Augmentation;
14 import org.opendaylight.yangtools.yang.binding.BaseIdentity;
15 import org.opendaylight.yangtools.yang.binding.DataContainer;
16 import org.opendaylight.yangtools.yang.binding.Identifier;
17 import org.opendaylight.yangtools.yang.common.QName;
19 public interface CodecRegistry {
21 InstanceIdentifierCodec getInstanceIdentifierCodec();
23 IdentityCodec<?> getIdentityCodec();
25 <T extends DataContainer> DataContainerCodec<T> getCodecForDataObject(Class<T> object);
27 <T extends Identifiable<?>> IdentifierCodec<?> getIdentifierCodecForIdentifiable(Class<T> object);
29 <T extends Identifier<?>> IdentifierCodec<T> getCodecForIdentifier(Class<T> object);
31 <T extends Augmentation<?>> AugmentationCodec<T> getCodecForAugmentation(Class<T> object);
33 <T extends BaseIdentity> IdentityCodec<T> getCodecForIdentity(Class<T> codec);
35 Class<?> getClassForPath(List<QName> names);
37 IdentifierCodec<?> getKeyCodecForPath(List<QName> names);
40 void bindingClassEncountered(Class<?> cls);
42 void putPathToClass(List<QName> names, Class<?> cls);
44 QName getQNameForAugmentation(Class<?> cls);