Switched codecs infrastructure to use yang-data-impl codecs
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / main / java / org / opendaylight / controller / sal / rest / impl / RestUtil.java
1 package org.opendaylight.controller.sal.rest.impl;
2
3 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
4
5 public final class RestUtil {
6
7     public final static TypeDefinition<?> resolveBaseTypeFrom(TypeDefinition<?> type) {
8         TypeDefinition<?> superType = type;
9         while (superType.getBaseType() != null) {
10             superType = superType.getBaseType();
11         }
12         return superType;
13     }
14
15 }