Bug 1411-3: MDSAL Binding2 Generator Util
[mdsal.git] / binding2 / mdsal-binding2-generator-util / src / main / java / org / opendaylight / mdsal / binding2 / generator / util / BindingTypes.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.mdsal.binding2.generator.util;
10
11 import static org.opendaylight.mdsal.binding2.generator.util.Types.parameterizedTypeFor;
12 import static org.opendaylight.mdsal.binding2.generator.util.Types.typeForClass;
13
14 import javax.management.NotificationListener;
15 import org.opendaylight.mdsal.binding2.model.api.ConcreteType;
16 import org.opendaylight.mdsal.binding2.model.api.ParameterizedType;
17 import org.opendaylight.mdsal.binding2.model.api.Type;
18 import org.opendaylight.mdsal.binding2.spec.Augmentable;
19 import org.opendaylight.mdsal.binding2.spec.Augmentation;
20 import org.opendaylight.mdsal.binding2.spec.IdentifiableItem;
21 import org.opendaylight.mdsal.binding2.spec.InstanceIdentifier;
22 import org.opendaylight.mdsal.binding2.spec.Notification;
23 import org.opendaylight.mdsal.binding2.spec.TreeChildNode;
24 import org.opendaylight.mdsal.binding2.spec.TreeNode;
25 import org.opendaylight.mdsal.binding2.spec.TreeRoot;
26 import org.opendaylight.yangtools.concepts.Identifier;
27
28 public final class BindingTypes {
29
30     public static final ConcreteType AUGMENTABLE = typeForClass(Augmentable.class);
31     public static final ConcreteType AUGMENTATION = typeForClass(Augmentation.class);
32     public static final ConcreteType TREE_NODE = typeForClass(TreeNode.class);
33     public static final ConcreteType TREE_ROOT = typeForClass(TreeRoot.class);
34     public static final ConcreteType IDENTIFIABLE_ITEM = typeForClass(IdentifiableItem.class);
35     public static final ConcreteType IDENTIFIER = typeForClass(Identifier.class);
36     public static final ConcreteType INSTANCE_IDENTIFIER = typeForClass(InstanceIdentifier.class);
37     public static final ConcreteType NOTIFICATION = typeForClass(Notification.class);
38     public static final ConcreteType NOTIFICATION_LISTENER = typeForClass(NotificationListener.class);
39
40     private static final ConcreteType TREE_CHILD_NODE = typeForClass(TreeChildNode.class);
41
42     private BindingTypes() {
43         throw new UnsupportedOperationException("Utility class");
44     }
45
46     public static ParameterizedType augmentable(Type t) {
47         return parameterizedTypeFor(AUGMENTABLE, t);
48     }
49
50     public static ParameterizedType treeChildNode(Type t) {
51         return parameterizedTypeFor(TREE_CHILD_NODE, t);
52     }
53
54 }