588bc789cf3ab6f305f68a3cce8d66d4b7c678fc
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / java / org / opendaylight / controller / sal / binding / codegen / impl / XtendHelper.java
1 package org.opendaylight.controller.sal.binding.codegen.impl;
2
3 import java.util.List;
4
5 import org.opendaylight.yangtools.yang.binding.BaseIdentity;
6 import org.opendaylight.yangtools.yang.binding.RpcService;
7 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
8 import org.opendaylight.yangtools.yang.model.api.type.UnionTypeDefinition;
9
10 public class XtendHelper {
11
12     public static <C extends BaseIdentity> RpcRoutingTableImpl createRoutingTable(
13             Class<C> cls) {
14         return new RpcRoutingTableImpl<>(cls);
15     }
16
17     @SuppressWarnings({"rawtypes","unchecked"})
18     public static Iterable<TypeDefinition> getTypes(UnionTypeDefinition definition) {
19         return (Iterable<TypeDefinition>) (List) definition.getTypes();
20     }
21 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.