Optimize JavaIdentifierNormalizer.normalizeClassIdentifier()
[mdsal.git] / binding2 / mdsal-binding2-generator-util / src / main / java / org / opendaylight / mdsal / binding / javav2 / generator / util / BindingTypes.java
1 /*
2  * Copyright (c) 2017 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.binding.javav2.generator.util;
10
11 import static org.opendaylight.mdsal.binding.javav2.generator.util.Types.parameterizedTypeFor;
12 import static org.opendaylight.mdsal.binding.javav2.generator.util.Types.typeForClass;
13
14 import org.opendaylight.mdsal.binding.javav2.model.api.ConcreteType;
15 import org.opendaylight.mdsal.binding.javav2.model.api.ParameterizedType;
16 import org.opendaylight.mdsal.binding.javav2.model.api.Type;
17 import org.opendaylight.mdsal.binding.javav2.spec.base.Action;
18 import org.opendaylight.mdsal.binding.javav2.spec.base.IdentifiableItem;
19 import org.opendaylight.mdsal.binding.javav2.spec.base.Input;
20 import org.opendaylight.mdsal.binding.javav2.spec.base.InstanceIdentifier;
21 import org.opendaylight.mdsal.binding.javav2.spec.base.Instantiable;
22 import org.opendaylight.mdsal.binding.javav2.spec.base.Item;
23 import org.opendaylight.mdsal.binding.javav2.spec.base.KeyedInstanceIdentifier;
24 import org.opendaylight.mdsal.binding.javav2.spec.base.ListAction;
25 import org.opendaylight.mdsal.binding.javav2.spec.base.Notification;
26 import org.opendaylight.mdsal.binding.javav2.spec.base.Output;
27 import org.opendaylight.mdsal.binding.javav2.spec.base.Rpc;
28 import org.opendaylight.mdsal.binding.javav2.spec.base.RpcCallback;
29 import org.opendaylight.mdsal.binding.javav2.spec.base.TreeNode;
30 import org.opendaylight.mdsal.binding.javav2.spec.base.TreeRoot;
31 import org.opendaylight.mdsal.binding.javav2.spec.runtime.NotificationListener;
32 import org.opendaylight.mdsal.binding.javav2.spec.structural.Augmentable;
33 import org.opendaylight.mdsal.binding.javav2.spec.structural.Augmentation;
34 import org.opendaylight.mdsal.binding.javav2.spec.structural.TreeChildNode;
35 import org.opendaylight.yangtools.concepts.Identifier;
36
37 public final class BindingTypes {
38
39     public static final ConcreteType ACTION = typeForClass(Action.class);
40     public static final ConcreteType AUGMENTABLE = typeForClass(Augmentable.class);
41     public static final ConcreteType AUGMENTATION = typeForClass(Augmentation.class);
42     public static final ConcreteType IDENTIFIABLE_ITEM = typeForClass(IdentifiableItem.class);
43     public static final ConcreteType IDENTIFIER = typeForClass(Identifier.class);
44     public static final ConcreteType INPUT = typeForClass(Input.class);
45     public static final ConcreteType INSTANCE_IDENTIFIER = typeForClass(InstanceIdentifier.class);
46     public static final ConcreteType INSTANTIABLE = typeForClass(Instantiable.class);
47     public static final ConcreteType ITEM = typeForClass(Item.class);
48     public static final ConcreteType KEYED_INSTANCE_IDENTIFIER = typeForClass(KeyedInstanceIdentifier.class);
49     public static final ConcreteType LIST_ACTION = typeForClass(ListAction.class);
50     public static final ConcreteType NOTIFICATION = typeForClass(Notification.class);
51     public static final ConcreteType NOTIFICATION_LISTENER = typeForClass(NotificationListener.class);
52     public static final ConcreteType OUTPUT = typeForClass(Output.class);
53     public static final ConcreteType RPC = typeForClass(Rpc.class);
54     public static final ConcreteType RPC_CALLBACK = typeForClass(RpcCallback.class);
55     public static final ConcreteType TREE_NODE = typeForClass(TreeNode.class);
56     public static final ConcreteType TREE_ROOT = typeForClass(TreeRoot.class);
57     public static final ConcreteType TREE_CHILD_NODE = typeForClass(TreeChildNode.class);
58
59     private BindingTypes() {
60         throw new UnsupportedOperationException("Utility class");
61     }
62
63     public static ParameterizedType augmentable(Type t) {
64         return parameterizedTypeFor(AUGMENTABLE, t);
65     }
66 }