Merge "Remove unnecessary casts"
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / codec / CodecRegistry.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.yang.data.impl.codec;
9
10 import java.util.List;
11
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;
18
19 public interface CodecRegistry {
20
21     InstanceIdentifierCodec getInstanceIdentifierCodec();
22
23     IdentityCodec<?> getIdentityCodec();
24
25     <T extends DataContainer> DataContainerCodec<T> getCodecForDataObject(Class<T> object);
26
27     <T extends Identifiable<?>> IdentifierCodec<?> getIdentifierCodecForIdentifiable(Class<T> object);
28
29     <T extends Identifier<?>> IdentifierCodec<T> getCodecForIdentifier(Class<T> object);
30
31     <T extends Augmentation<?>> AugmentationCodec<T> getCodecForAugmentation(Class<T> object);
32
33     <T extends BaseIdentity> IdentityCodec<T> getCodecForIdentity(Class<T> codec);
34
35     Class<?> getClassForPath(List<QName> names);
36
37     IdentifierCodec<?> getKeyCodecForPath(List<QName> names);
38
39
40     void bindingClassEncountered(Class<?> cls);
41
42     void putPathToClass(List<QName> names, Class<?> cls);
43
44     QName getQNameForAugmentation(Class<?> cls);
45 }