2 * Copyright (c) 2017 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;
10 import javax.annotation.concurrent.ThreadSafe;
11 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
12 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
13 import org.opendaylight.yangtools.yang.model.api.TypedSchemaNode;
16 * A simplistic factory, which does not perform any codec caching. Minimizes resident memory footprint at the expense
17 * of creating short-lived objects.
19 * @author Robert Varga
22 final class SimpleJSONCodecFactory extends JSONCodecFactory {
23 SimpleJSONCodecFactory(final SchemaContext context) {
28 JSONCodec<?> lookupComplex(final TypedSchemaNode schema) {
33 JSONCodec<?> lookupSimple(final TypeDefinition<?> type) {
38 JSONCodec<?> getSimple(final TypeDefinition<?> type, final JSONCodec<?> codec) {
43 JSONCodec<?> getComplex(final TypedSchemaNode schema, final JSONCodec<?> codec) {