blob: 1a2b9b818ea894c68e695c93e8fdb3999e0103ed [file] [log] [blame]
Bharat saraswal870c56f2016-02-20 21:57:16 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Bharat saraswal870c56f2016-02-20 21:57:16 +05303 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Vinod Kumar S67e7be62016-02-11 20:13:28 +053016
Vinod Kumar S38046502016-03-23 15:30:27 +053017package org.onosproject.yangutils.translator.tojava;
Vinod Kumar S67e7be62016-02-11 20:13:28 +053018
19/**
Bharat saraswald9822e92016-04-05 15:13:44 +053020 * Represents type of java files generated.
Vinod Kumar S67e7be62016-02-11 20:13:28 +053021 */
Vinod Kumar S38046502016-03-23 15:30:27 +053022public final class GeneratedJavaFileType {
Vinod Kumar Sc4216002016-03-03 19:55:30 +053023
24 /**
Bharat saraswal870c56f2016-02-20 21:57:16 +053025 * Interface file.
Vinod Kumar S67e7be62016-02-11 20:13:28 +053026 */
Vinod Kumar Sc4216002016-03-03 19:55:30 +053027 public static final int INTERFACE_MASK = 1;
Vinod Kumar S67e7be62016-02-11 20:13:28 +053028
29 /**
Bharat saraswal870c56f2016-02-20 21:57:16 +053030 * Builder interface file.
31 */
Vinod Kumar Sc4216002016-03-03 19:55:30 +053032 public static final int BUILDER_INTERFACE_MASK = 2;
33
34 /**
35 * Builder class file.
36 */
37 public static final int BUILDER_CLASS_MASK = 4;
Bharat saraswal870c56f2016-02-20 21:57:16 +053038
39 /**
40 * Impl class file.
41 */
Vinod Kumar Sc4216002016-03-03 19:55:30 +053042 public static final int IMPL_CLASS_MASK = 8;
Bharat saraswal870c56f2016-02-20 21:57:16 +053043
44 /**
Vinod Kumar Sc4216002016-03-03 19:55:30 +053045 * Interface and class file.
Vinod Kumar S67e7be62016-02-11 20:13:28 +053046 */
Vinod Kumar Se4b9b0c2016-04-30 21:09:15 +053047 public static final int GENERATE_INTERFACE_WITH_BUILDER = INTERFACE_MASK
48 | BUILDER_INTERFACE_MASK | BUILDER_CLASS_MASK | IMPL_CLASS_MASK;
Vinod Kumar Sc4216002016-03-03 19:55:30 +053049
50 /**
Gaurav Agrawal56527662016-04-20 15:49:17 +053051 * Java interface corresponding to rpc.
Vinod Kumar Sc4216002016-03-03 19:55:30 +053052 */
VinodKumarS-Huaweicb3a1f52016-05-10 17:58:57 +053053 public static final int GENERATE_SERVICE_AND_MANAGER = 16;
Gaurav Agrawal338735b2016-04-18 18:53:11 +053054
55 /**
Bharat saraswald72411a2016-04-19 01:00:16 +053056 * Java class corresponding to YANG enumeration.
57 */
Vinod Kumar Se4b9b0c2016-04-30 21:09:15 +053058 public static final int GENERATE_ENUM_CLASS = 32;
Bharat saraswald72411a2016-04-19 01:00:16 +053059
60 /**
Gaurav Agrawal56527662016-04-20 15:49:17 +053061 * Java class corresponding to typedef.
62 */
Vinod Kumar Se4b9b0c2016-04-30 21:09:15 +053063 public static final int GENERATE_TYPEDEF_CLASS = 64;
Gaurav Agrawal56527662016-04-20 15:49:17 +053064
65 /**
66 * Java class corresponding to union.
67 */
Vinod Kumar Se4b9b0c2016-04-30 21:09:15 +053068 public static final int GENERATE_UNION_CLASS = 128;
69
70 /**
71 * Java class corresponding to typedef.
72 */
73 public static final int GENERATE_TYPE_CLASS = GENERATE_TYPEDEF_CLASS
74 | GENERATE_UNION_CLASS;
Gaurav Agrawal56527662016-04-20 15:49:17 +053075
76 /**
VinodKumarS-Huaweicb3a1f52016-05-10 17:58:57 +053077 * Event class.
78 */
79 public static final int GENERATE_EVENT_CLASS = 256;
80
81 /**
82 * Event listener class.
83 */
84 public static final int GENERATE_EVENT_LISTENER_INTERFACE = 512;
85
86 /**
Bharat saraswal33dfa012016-05-17 19:59:16 +053087 * Event listener class.
88 */
89 public static final int GENERATE_EVENT_SUBJECT_CLASS = 1024;
90
91 /**
Shankara-Huaweidf7b9ca2016-07-14 11:35:34 +053092 * Identity listener class.
93 */
94 public static final int GENERATE_IDENTITY_CLASS = 2048;
95
96 /**
Gaurav Agrawal338735b2016-04-18 18:53:11 +053097 * Creates an instance of generate java file type.
98 */
99 private GeneratedJavaFileType() {
100 }
Vinod Kumar S67e7be62016-02-11 20:13:28 +0530101}