2 * Copyright (c) 2017 Pantheon Technologies, s.r.o. 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.util.codec;
10 import com.google.common.annotations.Beta;
11 import javax.annotation.concurrent.ThreadSafe;
12 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
13 import org.opendaylight.yangtools.yang.model.api.TypedSchemaNode;
16 * A no-operation codec cache.
18 * @author Robert Varga
20 * @param <T> Codec type
24 public final class NoopCodecCache<T> extends CodecCache<T> {
25 private static final NoopCodecCache<?> INSTANCE = new NoopCodecCache<>();
27 private NoopCodecCache() {
31 @SuppressWarnings("unchecked")
32 public static <T> NoopCodecCache<T> getInstance() {
33 return (NoopCodecCache<T>) INSTANCE;
37 public T lookupComplex(final TypedSchemaNode schema) {
42 public T lookupSimple(final TypeDefinition<?> type) {
47 public T getSimple(final TypeDefinition<?> type, final T codec) {
52 public T getComplex(final TypedSchemaNode schema, final T codec) {