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.codec.gson.helpers;
10 import com.google.common.annotations.Beta;
11 import com.google.common.base.Preconditions;
13 import org.opendaylight.yangtools.concepts.Codec;
14 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
17 * This class is implementation-internal and subject to change. Please do not use it.
20 public final class RestCodecFactory {
21 private final SchemaContextUtils utils;
23 private RestCodecFactory(final SchemaContextUtils utils) {
24 this.utils = Preconditions.checkNotNull(utils);
27 public static RestCodecFactory create(final SchemaContextUtils utils) {
28 return new RestCodecFactory(utils);
31 public final Codec<Object, Object> codecFor(final TypeDefinition<?> typeDefinition) {
32 // FIXME: implement loadingcache
33 return new ObjectCodec(utils, typeDefinition);