2 * Copyright (c) 2016 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
9 package org.opendaylight.mdsal.binding2.generator.util;
11 import static org.opendaylight.mdsal.binding2.generator.util.Types.parameterizedTypeFor;
12 import static org.opendaylight.mdsal.binding2.generator.util.Types.typeForClass;
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;
28 public final class BindingTypes {
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);
40 private static final ConcreteType TREE_CHILD_NODE = typeForClass(TreeChildNode.class);
42 private BindingTypes() {
43 throw new UnsupportedOperationException("Utility class");
46 public static ParameterizedType augmentable(Type t) {
47 return parameterizedTypeFor(AUGMENTABLE, t);
50 public static ParameterizedType treeChildNode(Type t) {
51 return parameterizedTypeFor(TREE_CHILD_NODE, t);