2 * Copyright (c) 2013 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.model.util;
10 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
13 * Utility class which provides various helper methods for working with YANG
16 * @deprecated Use {@link BaseTypes} instead.
19 public final class YangTypesConverter {
21 * It isn't desirable to create the instances of this class
23 private YangTypesConverter() {
27 public static boolean isBaseYangType(final String type) {
28 return BaseTypes.isYangBuildInType(type);
33 * Returns default instance of built-in type for supplied string.
36 * @return default instance of built-in type for supplied string or null, if
37 * default instance does not exist.
39 * @deprecated Use {@link BaseTypes#defaultBaseTypeFor(String)} instead.
42 public static TypeDefinition<?> javaTypeForBaseYangType(final String typeName) {
43 return BaseTypes.defaultBaseTypeFor(typeName).orNull();