Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | 0f7908b | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 3 | * |
| 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 | */ |
| 16 | |
| 17 | package org.onosproject.yangutils.utils; |
| 18 | |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 19 | import java.io.File; |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 20 | import java.util.Arrays; |
| 21 | import java.util.List; |
| 22 | |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 23 | /** |
Bharat saraswal | 63f26fb | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 24 | * Represents utilities constants which are used while generating java files. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 25 | */ |
| 26 | public final class UtilConstants { |
| 27 | |
| 28 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 29 | * JavaDocs for impl class. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 30 | */ |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 31 | public static final String IMPL_CLASS_JAVA_DOC = " * Represents the implementation of "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 32 | |
| 33 | /** |
| 34 | * JavaDocs for builder class. |
| 35 | */ |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 36 | public static final String BUILDER_CLASS_JAVA_DOC = " * Represents the builder implementation of "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 37 | |
| 38 | /** |
| 39 | * JavaDocs for interface class. |
| 40 | */ |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 41 | public static final String INTERFACE_JAVA_DOC = " * Abstraction of an entity which represents the" |
| 42 | + " functionality of "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 43 | |
VinodKumarS-Huawei | 6266db3 | 2016-05-10 17:58:57 +0530 | [diff] [blame] | 44 | /** |
| 45 | * JavaDocs for event. |
| 46 | */ |
| 47 | public static final String EVENT_JAVA_DOC = " * Represents event implementation of "; |
| 48 | |
| 49 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 50 | * JavaDocs for op param class. |
| 51 | */ |
| 52 | public static final String OP_PARAM_JAVA_DOC = " * Represents operation parameter implementation of "; |
| 53 | |
| 54 | /** |
VinodKumarS-Huawei | 6266db3 | 2016-05-10 17:58:57 +0530 | [diff] [blame] | 55 | * JavaDocs for event listener. |
| 56 | */ |
| 57 | public static final String EVENT_LISTENER_JAVA_DOC = " * Abstraction for event listener of "; |
| 58 | |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 59 | /** |
| 60 | * JavaDocs for builder interface class. |
| 61 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 62 | public static final String BUILDER_INTERFACE_JAVA_DOC = " * Builder for "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 63 | |
| 64 | /** |
Bharat saraswal | 68fa0d1 | 2016-04-19 01:00:16 +0530 | [diff] [blame] | 65 | * JavaDocs for enum class. |
| 66 | */ |
| 67 | public static final String ENUM_CLASS_JAVADOC = " * Represents ENUM data of "; |
| 68 | |
| 69 | /** |
| 70 | * JavaDocs for enum attribute. |
| 71 | */ |
| 72 | public static final String ENUM_ATTRIBUTE_JAVADOC = " * Represents "; |
| 73 | |
| 74 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 75 | * JavaDocs for package info class. |
| 76 | */ |
Bharat saraswal | 68fa0d1 | 2016-04-19 01:00:16 +0530 | [diff] [blame] | 77 | public static final String PACKAGE_INFO_JAVADOC = " * Implementation of YANG node "; |
| 78 | |
| 79 | /** |
| 80 | * JavaDocs for package info class. |
| 81 | */ |
| 82 | public static final String PACKAGE_INFO_JAVADOC_OF_CHILD = "'s children nodes"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 83 | |
| 84 | /** |
| 85 | * JavaDocs's first line. |
| 86 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 87 | public static final String JAVA_DOC_FIRST_LINE = "/**\n"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 88 | |
| 89 | /** |
| 90 | * JavaDocs's last line. |
| 91 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 92 | public static final String JAVA_DOC_END_LINE = " */\n"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 93 | |
| 94 | /** |
| 95 | * JavaDocs's param annotation. |
| 96 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 97 | public static final String JAVA_DOC_PARAM = " * @param "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 98 | |
| 99 | /** |
| 100 | * JavaDocs's return annotation. |
| 101 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 102 | public static final String JAVA_DOC_RETURN = " * @return "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 103 | |
| 104 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 105 | * JavaDocs's description for setter method. |
| 106 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 107 | public static final String JAVA_DOC_SETTERS = " * Returns the builder object of "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 108 | |
| 109 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 110 | * JavaDocs's description for add to list method. |
| 111 | */ |
| 112 | public static final String JAVA_DOC_ADD_TO_LIST = " * Adds to the list of "; |
| 113 | |
| 114 | /** |
VinodKumarS-Huawei | 6266db3 | 2016-05-10 17:58:57 +0530 | [diff] [blame] | 115 | * JavaDocs's description for setter method. |
| 116 | */ |
| 117 | public static final String JAVA_DOC_MANAGER_SETTERS = " * Sets the value to attribute "; |
| 118 | |
| 119 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 120 | * JavaDocs's description for OF method. |
| 121 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 122 | public static final String JAVA_DOC_OF = " * Returns the object of "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 123 | |
| 124 | /** |
| 125 | * JavaDocs's description for typedef' setter method. |
| 126 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 127 | public static final String JAVA_DOC_SETTERS_COMMON = " * Sets the value of "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 128 | |
| 129 | /** |
| 130 | * JavaDocs's description for getter method. |
| 131 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 132 | public static final String JAVA_DOC_GETTERS = " * Returns the attribute "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 133 | |
| 134 | /** |
Bharat saraswal | 64e7e23 | 2016-07-14 23:33:55 +0530 | [diff] [blame] | 135 | * JavaDocs's description for getter method. |
| 136 | */ |
| 137 | public static final String JAVA_DOC_FOR_VALIDATOR = " * Validates if value is in given range."; |
| 138 | |
| 139 | /** |
| 140 | * JavaDocs's description for getter method. |
| 141 | */ |
| 142 | public static final String JAVA_DOC_FOR_VALIDATOR_RETURN = " * @return true if value is in range"; |
| 143 | |
| 144 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 145 | * JavaDocs's description for constructor. |
| 146 | */ |
Bharat saraswal | 780eca3 | 2016-04-05 12:45:45 +0530 | [diff] [blame] | 147 | public static final String JAVA_DOC_CONSTRUCTOR = " * Creates an instance of "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 148 | |
| 149 | /** |
| 150 | * JavaDocs's description for build method. |
| 151 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 152 | public static final String JAVA_DOC_BUILD = " * Builds object of "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 153 | |
| 154 | /** |
| 155 | * JavaDocs's return statement for build method. |
| 156 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 157 | public static final String JAVA_DOC_BUILD_RETURN = "object of "; |
| 158 | |
| 159 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 160 | * JavaDocs's statement for builder object. |
| 161 | */ |
| 162 | public static final String BUILDER_OBJECT = "builder object of "; |
| 163 | |
| 164 | /** |
Gaurav Agrawal | 02a60de | 2016-04-20 15:49:17 +0530 | [diff] [blame] | 165 | * JavaDocs's statement for rpc method. |
| 166 | */ |
| 167 | public static final String JAVA_DOC_RPC = " * Service interface of "; |
| 168 | |
| 169 | /** |
| 170 | * JavaDocs's statement for rpc's input string. |
| 171 | */ |
| 172 | public static final String RPC_INPUT_STRING = "input of service interface "; |
| 173 | |
| 174 | /** |
| 175 | * JavaDocs's statement for rpc's output string. |
| 176 | */ |
| 177 | public static final String RPC_OUTPUT_STRING = "output of service interface "; |
| 178 | |
| 179 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 180 | * Static attribute for new line. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 181 | */ |
| 182 | public static final String NEW_LINE = "\n"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 183 | |
| 184 | /** |
Bharat saraswal | 250a747 | 2016-05-12 13:16:57 +0530 | [diff] [blame] | 185 | * Static attribute for default. |
| 186 | */ |
| 187 | public static final String DEFAULT = "default"; |
| 188 | |
| 189 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 190 | * Static attribute for op param class. |
| 191 | */ |
| 192 | public static final String OPERATION = "OpParam"; |
| 193 | |
| 194 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 195 | * Static attribute for java code generation for sbi. |
| 196 | */ |
| 197 | public static final String SBI = "sbi"; |
| 198 | |
| 199 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 200 | * Static attribute for multiple new line. |
| 201 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 202 | public static final String MULTIPLE_NEW_LINE = "\n\n"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 203 | |
| 204 | /** |
| 205 | * Static attribute for empty line. |
| 206 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 207 | public static final String EMPTY_STRING = ""; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 208 | |
| 209 | /** |
| 210 | * Static attribute for new line with asterisk. |
| 211 | */ |
| 212 | public static final String NEW_LINE_ASTERISK = " *\n"; |
| 213 | |
| 214 | /** |
| 215 | * Static attribute for period. |
| 216 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 217 | public static final String PERIOD = "."; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 218 | |
| 219 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 220 | * Static attribute for period. |
| 221 | */ |
| 222 | public static final String INVOKE = "invoke"; |
| 223 | |
| 224 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 225 | * Static attribute for parse byte. |
| 226 | */ |
| 227 | public static final String PARSE_BYTE = "parseByte"; |
| 228 | |
| 229 | /** |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 230 | * Static attribute for parse boolean. |
| 231 | */ |
| 232 | public static final String PARSE_BOOLEAN = "parseBoolean"; |
| 233 | |
| 234 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 235 | * Static attribute for parse short. |
| 236 | */ |
| 237 | public static final String PARSE_SHORT = "parseShort"; |
| 238 | |
| 239 | /** |
| 240 | * Static attribute for parse int. |
| 241 | */ |
| 242 | public static final String PARSE_INT = "parseInt"; |
| 243 | |
| 244 | /** |
| 245 | * Static attribute for parse long. |
| 246 | */ |
| 247 | public static final String PARSE_LONG = "parseLong"; |
| 248 | |
| 249 | /** |
Mahesh Poojary Huawei | 41547ad | 2016-07-14 17:49:50 +0530 | [diff] [blame] | 250 | * Static attribute for base64. |
| 251 | */ |
| 252 | public static final String BASE64 = "Base64"; |
| 253 | |
| 254 | /** |
| 255 | * Static attribute for getEncoder. |
| 256 | */ |
| 257 | public static final String GET_ENCODER = "getEncoder"; |
| 258 | |
| 259 | /** |
| 260 | * Static attribute for encodeToString. |
| 261 | */ |
| 262 | public static final String ENCODE_TO_STRING = "encodeToString"; |
| 263 | |
| 264 | /** |
| 265 | * Static attribute for getDecoder. |
| 266 | */ |
| 267 | public static final String GET_DECODER = "getDecoder"; |
| 268 | |
| 269 | /** |
| 270 | * Static attribute for decode. |
| 271 | */ |
| 272 | public static final String DECODE = "decode"; |
| 273 | |
| 274 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 275 | * Static attribute for omit null value. |
| 276 | */ |
| 277 | public static final String OMIT_NULL_VALUE_STRING = "omitNullValues()"; |
| 278 | |
| 279 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 280 | * Static attribute for colan. |
| 281 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 282 | public static final String COLAN = ":"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 283 | |
| 284 | /** |
| 285 | * Static attribute for underscore. |
| 286 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 287 | public static final String UNDER_SCORE = "_"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 288 | |
| 289 | /** |
| 290 | * Static attribute for semi-colan. |
| 291 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 292 | public static final String SEMI_COLAN = ";"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 293 | |
| 294 | /** |
| 295 | * Static attribute for hyphen. |
| 296 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 297 | public static final String HYPHEN = "-"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 298 | |
| 299 | /** |
| 300 | * Static attribute for space. |
| 301 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 302 | public static final String SPACE = " "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 303 | |
| 304 | /** |
Bharat saraswal | 64e7e23 | 2016-07-14 23:33:55 +0530 | [diff] [blame] | 305 | * Static attribute for validateRange. |
| 306 | */ |
| 307 | public static final String VALIDATE_RANGE = "validateRange"; |
| 308 | |
| 309 | /** |
| 310 | * Static attribute for minRange. |
| 311 | */ |
| 312 | public static final String MIN_RANGE = "minRange"; |
| 313 | |
| 314 | /** |
| 315 | * Static attribute for maxRange. |
| 316 | */ |
| 317 | public static final String MAX_RANGE = "maxRange"; |
| 318 | |
| 319 | /** |
| 320 | * Static attribute for minRange. |
| 321 | */ |
Bharat saraswal | 2da23bf | 2016-08-25 15:28:39 +0530 | [diff] [blame^] | 322 | public static final String SHORT_MIN_RANGE_ATTR = "static final int INT16_MIN_RANGE = -32768;\n"; |
| 323 | |
| 324 | /** |
| 325 | * Static attribute for minRange. |
| 326 | */ |
| 327 | public static final String SHORT_MIN_RANGE = "INT16_MIN_RANGE"; |
| 328 | |
| 329 | /** |
| 330 | * Static attribute for minRange. |
| 331 | */ |
| 332 | public static final String SHORT_MAX_RANGE = "INT16_MAX_RANGE"; |
| 333 | |
| 334 | /** |
| 335 | * Static attribute for maxRange. |
| 336 | */ |
| 337 | public static final String SHORT_MAX_RANGE_ATTR = "static final int INT16_MAX_RANGE = 32767;"; |
| 338 | |
| 339 | |
| 340 | /** |
| 341 | * Static attribute for minRange. |
| 342 | */ |
| 343 | public static final String UINT8_MIN_RANGE_ATTR = "static final int UINT8_MIN_RANGE = 0;\n"; |
| 344 | |
| 345 | /** |
| 346 | * Static attribute for maxRange. |
| 347 | */ |
| 348 | public static final String UINT8_MAX_RANGE_ATTR = "static final int UINT8_MAX_RANGE = 32767;"; |
| 349 | |
| 350 | |
| 351 | /** |
| 352 | * Static attribute for minRange. |
| 353 | */ |
| 354 | public static final String UINT8_MIN_RANGE = "UINT8_MIN_RANGE"; |
| 355 | |
| 356 | /** |
| 357 | * Static attribute for maxRange. |
| 358 | */ |
| 359 | public static final String UINT8_MAX_RANGE = "UINT8_MAX_RANGE"; |
| 360 | |
| 361 | /** |
| 362 | * Static attribute for minRange. |
| 363 | */ |
Bharat saraswal | 64e7e23 | 2016-07-14 23:33:55 +0530 | [diff] [blame] | 364 | public static final String INT_MIN_RANGE_ATTR = "static final int INT32_MIN_RANGE = -2147483648;\n"; |
| 365 | |
| 366 | /** |
| 367 | * Static attribute for minRange. |
| 368 | */ |
| 369 | public static final String INT_MIN_RANGE = "INT32_MIN_RANGE"; |
| 370 | |
| 371 | /** |
| 372 | * Static attribute for minRange. |
| 373 | */ |
| 374 | public static final String INT_MAX_RANGE = "INT32_MAX_RANGE"; |
| 375 | |
| 376 | /** |
| 377 | * Static attribute for maxRange. |
| 378 | */ |
| 379 | public static final String INT_MAX_RANGE_ATTR = "static final int INT32_MAX_RANGE = 2147483647;"; |
| 380 | |
| 381 | |
| 382 | /** |
| 383 | * Static attribute for minRange. |
| 384 | */ |
| 385 | public static final String UINT_MIN_RANGE_ATTR = "static final int UINT16_MIN_RANGE = 0;\n"; |
| 386 | |
| 387 | /** |
| 388 | * Static attribute for maxRange. |
| 389 | */ |
| 390 | public static final String UINT_MAX_RANGE_ATTR = "static final int UINT16_MAX_RANGE = 2147483647;"; |
| 391 | |
| 392 | |
| 393 | /** |
| 394 | * Static attribute for minRange. |
| 395 | */ |
| 396 | public static final String UINT_MIN_RANGE = "UINT16_MIN_RANGE"; |
| 397 | |
| 398 | /** |
| 399 | * Static attribute for maxRange. |
| 400 | */ |
| 401 | public static final String UINT_MAX_RANGE = "UINT16_MAX_RANGE"; |
| 402 | |
| 403 | /** |
| 404 | * Static attribute for minRange. |
| 405 | */ |
| 406 | public static final String LONG_MIN_RANGE_ATTR = "static final BigInteger INT64_MIN_RANGE =" + |
| 407 | " new BigInteger(\"-9223372036854775808\");\n"; |
| 408 | |
| 409 | /** |
| 410 | * Static attribute for maxRange. |
| 411 | */ |
| 412 | public static final String LONG_MAX_RANGE_ATTR = "static final BigInteger INT64_MAX_RANGE =" + |
| 413 | " new BigInteger(\"9223372036854775807\");"; |
| 414 | |
| 415 | /** |
| 416 | * Static attribute for minRange. |
| 417 | */ |
| 418 | public static final String LONG_MIN_RANGE = "INT64_MIN_RANGE"; |
| 419 | |
| 420 | /** |
| 421 | * Static attribute for maxRange. |
| 422 | */ |
| 423 | public static final String LONG_MAX_RANGE = "INT64_MAX_RANGE"; |
| 424 | |
| 425 | /** |
| 426 | * Static attribute for minRange. |
| 427 | */ |
| 428 | public static final String ULONG_MIN_RANGE_ATTR = "static final BigInteger UINT32_MIN_RANGE =" + |
| 429 | " new BigInteger(\"0\");\n"; |
| 430 | |
| 431 | /** |
| 432 | * Static attribute for maxRange. |
| 433 | */ |
| 434 | public static final String ULONG_MAX_RANGE_ATTR = "static final BigInteger UINT32_MAX_RANGE =" + |
| 435 | " new BigInteger(\"9223372036854775807\");"; |
| 436 | |
| 437 | |
| 438 | /** |
| 439 | * Static attribute for minRange. |
| 440 | */ |
| 441 | public static final String ULONG_MIN_RANGE = "UINT32_MIN_RANGE"; |
| 442 | |
| 443 | /** |
| 444 | * Static attribute for maxRange. |
| 445 | */ |
| 446 | public static final String ULONG_MAX_RANGE = "UINT32_MAX_RANGE"; |
| 447 | |
| 448 | /** |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 449 | * Static attribute for subject. |
| 450 | */ |
| 451 | public static final String SUBJECT = "Subject"; |
| 452 | |
| 453 | /** |
Bharat saraswal | 4aaab4d | 2016-05-17 14:19:38 +0530 | [diff] [blame] | 454 | * Static attribute for ListenerRegistry. |
| 455 | */ |
| 456 | public static final String LISTENER_REG = "ListenerRegistry"; |
| 457 | |
| 458 | /** |
| 459 | * Static attribute for ListenerService. |
| 460 | */ |
| 461 | public static final String LISTENER_SERVICE = "ListenerService"; |
| 462 | |
| 463 | /** |
| 464 | * Static attribute for listener package. |
| 465 | */ |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 466 | public static final String ONOS_EVENT_PKG = "org.onosproject.event"; |
Bharat saraswal | 4aaab4d | 2016-05-17 14:19:38 +0530 | [diff] [blame] | 467 | |
| 468 | /** |
Vidyashree Rama | b624817 | 2016-05-17 16:16:15 +0530 | [diff] [blame] | 469 | * Static attribute for colon. |
| 470 | */ |
| 471 | public static final String COLON = ":"; |
| 472 | |
| 473 | /** |
| 474 | * Static attribute for caret. |
| 475 | */ |
| 476 | public static final String CARET = "^"; |
| 477 | |
| 478 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 479 | * Static attribute for input string. |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 480 | */ |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 481 | public static final String INPUT = "input"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 482 | |
| 483 | /** |
janani b | 0e4e8ae | 2016-07-13 21:06:41 +0530 | [diff] [blame] | 484 | * Static attribute for output string. |
| 485 | */ |
| 486 | public static final String OUTPUT = "output"; |
| 487 | |
| 488 | /** |
| 489 | * Static attribute for current string. |
| 490 | */ |
| 491 | public static final String CURRENT = "current"; |
| 492 | |
| 493 | /** |
janani b | b08850e | 2016-05-17 18:20:33 +0530 | [diff] [blame] | 494 | * Static attribute for leafref string. |
| 495 | */ |
| 496 | public static final String LEAFREF = "leafref"; |
| 497 | |
| 498 | /** |
| 499 | * Static attribute for identityref string. |
| 500 | */ |
| 501 | public static final String IDENTITYREF = "identityref"; |
| 502 | |
| 503 | /** |
Gaurav Agrawal | 02a60de | 2016-04-20 15:49:17 +0530 | [diff] [blame] | 504 | * Static attribute for output variable of rpc. |
| 505 | */ |
| 506 | public static final String RPC_INPUT_VAR_NAME = "inputVar"; |
| 507 | |
| 508 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 509 | * Static attribute for new line. |
| 510 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 511 | public static final String EQUAL = "="; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 512 | |
| 513 | /** |
| 514 | * Static attribute for slash syntax. |
| 515 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 516 | public static final String SLASH = File.separator; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 517 | |
| 518 | /** |
| 519 | * Static attribute for add syntax. |
| 520 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 521 | public static final String ADD = "+"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 522 | |
| 523 | /** |
Mahesh Poojary Huawei | 41547ad | 2016-07-14 17:49:50 +0530 | [diff] [blame] | 524 | * Static attribute for single quote. |
| 525 | */ |
| 526 | public static final String SINGLE_QUOTE = "\'"; |
| 527 | |
| 528 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 529 | * Static attribute for quotes. |
| 530 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 531 | public static final String QUOTES = "\""; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 532 | |
| 533 | /** |
Mahesh Poojary Huawei | 41547ad | 2016-07-14 17:49:50 +0530 | [diff] [blame] | 534 | * Static attribute for zero. |
| 535 | */ |
| 536 | public static final String ZERO = "0"; |
| 537 | |
| 538 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 539 | * Static attribute for ampersand. |
| 540 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 541 | public static final String AND = "&"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 542 | |
| 543 | /** |
| 544 | * Static attribute for comma. |
| 545 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 546 | public static final String COMMA = ","; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 547 | |
| 548 | /** |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 549 | * Static attribute for class. |
| 550 | */ |
| 551 | public static final String CLASS_STRING = "Class"; |
| 552 | |
| 553 | /** |
| 554 | * Static attribute for put. |
| 555 | */ |
| 556 | public static final String PUT = "put"; |
| 557 | |
| 558 | /** |
| 559 | * Static attribute for get. |
| 560 | */ |
| 561 | public static final String GET = "get"; |
| 562 | |
| 563 | /** |
janani b | 0e4e8ae | 2016-07-13 21:06:41 +0530 | [diff] [blame] | 564 | * Static attribute for slash character. |
| 565 | */ |
| 566 | public static final char CHAR_OF_SLASH = '/'; |
| 567 | |
| 568 | /** |
| 569 | * Static attribute for open square bracket character. |
| 570 | */ |
| 571 | public static final char CHAR_OF_OPEN_SQUARE_BRACKET = '['; |
| 572 | |
| 573 | /** |
| 574 | * Static attribute for close square bracket character. |
| 575 | */ |
| 576 | public static final char CHAR_OF_CLOSE_SQUARE_BRACKET = ']'; |
| 577 | |
| 578 | /** |
| 579 | * Static attribute for slash string. |
| 580 | */ |
| 581 | public static final String SLASH_FOR_STRING = "/"; |
| 582 | |
| 583 | /** |
| 584 | * Static attribute for open square bracket. |
| 585 | */ |
| 586 | public static final String OPEN_SQUARE_BRACKET = "["; |
| 587 | |
| 588 | /** |
| 589 | * Static attribute for ancestor accessor. |
| 590 | */ |
| 591 | public static final String ANCESTOR_ACCESSOR = ".."; |
| 592 | |
| 593 | /** |
| 594 | * Static attribute for ancestor accessor along with path. |
| 595 | */ |
| 596 | public static final String ANCESTOR_ACCESSOR_IN_PATH = "../"; |
| 597 | |
| 598 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 599 | * Static attribute for add syntax. |
| 600 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 601 | public static final String ADD_STRING = "add"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 602 | |
| 603 | /** |
Mahesh Poojary Huawei | 41547ad | 2016-07-14 17:49:50 +0530 | [diff] [blame] | 604 | * Static attribute for string replace syntax. |
| 605 | */ |
| 606 | public static final String REPLACE_STRING = "replace"; |
| 607 | |
| 608 | /** |
| 609 | * Static attribute for string trim syntax. |
| 610 | */ |
| 611 | public static final String TRIM_STRING = "trim"; |
| 612 | |
| 613 | /** |
| 614 | * Static attribute for string split syntax. |
| 615 | */ |
| 616 | public static final String SPLIT_STRING = "split"; |
| 617 | |
| 618 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 619 | * Static attribute for from syntax. |
| 620 | */ |
| 621 | public static final String FROM_STRING_METHOD_NAME = "fromString"; |
| 622 | |
| 623 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 624 | * Static attribute for check not null syntax. |
| 625 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 626 | public static final String CHECK_NOT_NULL_STRING = "checkNotNull"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 627 | |
| 628 | /** |
| 629 | * Static attribute for hash code syntax. |
| 630 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 631 | public static final String HASH_CODE_STRING = "hashCode"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 632 | |
| 633 | /** |
| 634 | * Static attribute for equals syntax. |
| 635 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 636 | public static final String EQUALS_STRING = "equals"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 637 | |
| 638 | /** |
| 639 | * Static attribute for object. |
| 640 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 641 | public static final String OBJECT_STRING = "Object"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 642 | |
| 643 | /** |
| 644 | * Static attribute for instance of syntax. |
| 645 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 646 | public static final String INSTANCE_OF = " instanceof "; |
| 647 | |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 648 | /** |
| 649 | * Static attribute for value syntax. |
| 650 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 651 | public static final String VALUE = "value"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 652 | |
| 653 | /** |
| 654 | * Static attribute for suffix s. |
| 655 | */ |
Bharat saraswal | 84366c5 | 2016-03-23 19:40:35 +0530 | [diff] [blame] | 656 | public static final String SUFFIX_S = "s"; |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 657 | |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 658 | /** |
| 659 | * Static attribute for if. |
| 660 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 661 | public static final String IF = "if"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 662 | |
| 663 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 664 | * Static attribute for of. |
| 665 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 666 | public static final String OF = "of"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 667 | |
| 668 | /** |
| 669 | * Static attribute for other. |
| 670 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 671 | public static final String OTHER = "other"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 672 | |
| 673 | /** |
| 674 | * Static attribute for obj syntax. |
| 675 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 676 | public static final String OBJ = "obj"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 677 | |
| 678 | /** |
| 679 | * Static attribute for hash syntax. |
| 680 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 681 | public static final String HASH = "hash"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 682 | |
| 683 | /** |
| 684 | * Static attribute for to syntax. |
| 685 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 686 | public static final String TO = "to"; |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 687 | |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 688 | /** |
| 689 | * Static attribute for true syntax. |
| 690 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 691 | public static final String TRUE = "true"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 692 | |
| 693 | /** |
| 694 | * Static attribute for false syntax. |
| 695 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 696 | public static final String FALSE = "false"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 697 | |
| 698 | /** |
| 699 | * Static attribute for org. |
| 700 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 701 | public static final String ORG = "org"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 702 | |
| 703 | /** |
| 704 | * Static attribute for temp. |
| 705 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 706 | public static final String TEMP = "temp"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 707 | |
| 708 | /** |
| 709 | * Static attribute for YANG file directory. |
| 710 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 711 | public static final String YANG_RESOURCES = "yang/resources"; |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 712 | |
| 713 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 714 | * Static attribute for diamond close bracket syntax. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 715 | */ |
| 716 | public static final String DIAMOND_OPEN_BRACKET = "<"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 717 | |
| 718 | /** |
| 719 | * Static attribute for diamond close bracket syntax. |
| 720 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 721 | public static final String DIAMOND_CLOSE_BRACKET = ">"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 722 | |
| 723 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 724 | * Static attribute for exception syntax. |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 725 | */ |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 726 | public static final String EXCEPTION = "Exception"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 727 | |
| 728 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 729 | * Static attribute for exception variable syntax. |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 730 | */ |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 731 | public static final String EXCEPTION_VAR = "e"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 732 | |
| 733 | /** |
| 734 | * Static attribute for open parenthesis syntax. |
| 735 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 736 | public static final String OPEN_PARENTHESIS = "("; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 737 | |
| 738 | /** |
Bharat saraswal | 250a747 | 2016-05-12 13:16:57 +0530 | [diff] [blame] | 739 | * Static attribute for switch syntax. |
| 740 | */ |
| 741 | public static final String SWITCH = "switch"; |
| 742 | |
| 743 | /** |
| 744 | * Static attribute for case syntax. |
| 745 | */ |
| 746 | public static final String CASE = "case"; |
| 747 | |
| 748 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 749 | * Static attribute for temp val syntax. |
| 750 | */ |
| 751 | public static final String TMP_VAL = "tmpVal"; |
| 752 | |
| 753 | /** |
Bharat saraswal | 64e7e23 | 2016-07-14 23:33:55 +0530 | [diff] [blame] | 754 | * Static attribute for close curly bracket syntax. |
| 755 | */ |
| 756 | public static final String ELSE = "else"; |
| 757 | |
| 758 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 759 | * From string parameter name. |
| 760 | */ |
| 761 | public static final String FROM_STRING_PARAM_NAME = "valInString"; |
| 762 | |
| 763 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 764 | * Static attribute for close parenthesis syntax. |
| 765 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 766 | public static final String CLOSE_PARENTHESIS = ")"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 767 | |
| 768 | /** |
VinodKumarS-Huawei | 9a91b48 | 2016-08-19 23:22:59 +0530 | [diff] [blame] | 769 | * Static attribute for empty parameter function call. |
| 770 | */ |
| 771 | public static final String EMPTY_PARAMETER_FUNCTION_CALL = "()"; |
| 772 | |
| 773 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 774 | * Static attribute for open curly bracket syntax. |
| 775 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 776 | public static final String OPEN_CURLY_BRACKET = "{"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 777 | |
| 778 | /** |
| 779 | * Static attribute for close curly bracket syntax. |
| 780 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 781 | public static final String CLOSE_CURLY_BRACKET = "}"; |
| 782 | |
| 783 | /** |
Mahesh Poojary Huawei | 2cd4433 | 2016-07-14 12:38:17 +0530 | [diff] [blame] | 784 | * Static attribute for square brackets syntax. |
| 785 | */ |
| 786 | public static final String SQUARE_BRACKETS = "[]"; |
| 787 | |
| 788 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 789 | * Static attribute for getter method prefix. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 790 | */ |
| 791 | public static final String GET_METHOD_PREFIX = "get"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 792 | |
| 793 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 794 | * Static attribute for getter method prefix. |
| 795 | */ |
| 796 | public static final String GET_METHOD = "getMethod"; |
| 797 | |
| 798 | /** |
| 799 | * Static attribute for getter method prefix. |
| 800 | */ |
| 801 | public static final String GET_CLASS = "getClass()"; |
| 802 | |
| 803 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 804 | * Static attribute for setter method prefix. |
| 805 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 806 | public static final String SET_METHOD_PREFIX = "set"; |
| 807 | |
| 808 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 809 | * Static attribute for get filter leaf flags. |
| 810 | */ |
VinodKumarS-Huawei | 9a91b48 | 2016-08-19 23:22:59 +0530 | [diff] [blame] | 811 | public static final String GET_VALUE_LEAF_FLAGS = "getValueLeafFlags"; |
| 812 | |
| 813 | /** |
| 814 | * Static attribute for get select filter leaf flags. |
| 815 | */ |
| 816 | public static final String GET_SELECT_LEAF_FLAGS = "getSelectLeafFlags"; |
| 817 | |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 818 | |
| 819 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 820 | * Static attribute for getLeafIndex. |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 821 | */ |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 822 | public static final String GET_LEAF_INDEX = "getLeafIndex()"; |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 823 | |
| 824 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 825 | * Static attribute for op param. |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 826 | */ |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 827 | public static final String OP_PARAM = "OpParam"; |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 828 | |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 829 | |
| 830 | /** |
| 831 | * Static attribute for is filter content match method prefix. |
| 832 | */ |
VinodKumarS-Huawei | 9a91b48 | 2016-08-19 23:22:59 +0530 | [diff] [blame] | 833 | public static final String PROCESS_SUBTREE_FILTERING = "processSubtreeFiltering"; |
| 834 | |
| 835 | /** |
| 836 | * variable name of the subtree filtering result builder. |
| 837 | */ |
| 838 | public static final String SUBTREE_FILTERING_RESULT_BUILDER = "subTreeFilteringResultBuilder"; |
| 839 | |
| 840 | /** |
| 841 | * variable name of the subtree filtering result flag. |
| 842 | */ |
| 843 | public static final String IS_ANY_SELECT_OR_CONTAINMENT_NODE_FLAG = "isAnySelectOrContainmentNode"; |
| 844 | |
| 845 | /** |
| 846 | * variable name of the subtree filtering to select all child. |
| 847 | */ |
| 848 | public static final String IS_SELECT_ALL_SCHEMA_CHILD_FLAG = "isSelectAllSchemaChild"; |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 849 | |
| 850 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 851 | * Static attribute for flag prefix. |
| 852 | */ |
| 853 | public static final String FLAG = "flag"; |
| 854 | |
| 855 | /** |
| 856 | * Static attribute for break prefix. |
| 857 | */ |
| 858 | public static final String BREAK = "break"; |
| 859 | |
| 860 | /** |
| 861 | * Static attribute for break prefix. |
| 862 | */ |
| 863 | public static final String IS_EMPTY = "isEmpty()"; |
| 864 | |
| 865 | /** |
| 866 | * Static attribute for is isLeafValueSet method prefix. |
| 867 | */ |
| 868 | public static final String VALUE_LEAF_SET = "isLeafValueSet"; |
| 869 | |
| 870 | /** |
| 871 | * Static attribute for is isSelectLeaf method prefix. |
| 872 | */ |
| 873 | public static final String IS_SELECT_LEAF = "isSelectLeaf"; |
| 874 | |
| 875 | /** |
| 876 | * Static attribute for is selectLeaf method prefix. |
| 877 | */ |
| 878 | public static final String SET_SELECT_LEAF = "selectLeaf"; |
| 879 | |
| 880 | /** |
| 881 | * Static attribute for is LeafIdentifier enum prefix. |
| 882 | */ |
| 883 | public static final String LEAF_IDENTIFIER = "LeafIdentifier"; |
| 884 | |
| 885 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 886 | * Static attribute for four space indentation. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 887 | */ |
| 888 | public static final String FOUR_SPACE_INDENTATION = " "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 889 | |
| 890 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 891 | * Static attribute for not syntax. |
| 892 | */ |
| 893 | public static final String NOT = "!"; |
| 894 | |
| 895 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 896 | * Static attribute for try syntax. |
| 897 | */ |
| 898 | public static final String TRY = "try"; |
| 899 | |
| 900 | /** |
| 901 | * Static attribute for catch syntax. |
| 902 | */ |
| 903 | public static final String CATCH = "catch"; |
| 904 | |
| 905 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 906 | * Static attribute for eight space indentation. |
| 907 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 908 | public static final String EIGHT_SPACE_INDENTATION = FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 909 | |
| 910 | /** |
| 911 | * Static attribute for twelve space indentation. |
| 912 | */ |
VinodKumarS-Huawei | 9a91b48 | 2016-08-19 23:22:59 +0530 | [diff] [blame] | 913 | public static final String TWELVE_SPACE_INDENTATION = EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 914 | |
| 915 | /** |
| 916 | * Static attribute for sixteen space indentation. |
| 917 | */ |
VinodKumarS-Huawei | 9a91b48 | 2016-08-19 23:22:59 +0530 | [diff] [blame] | 918 | public static final String SIXTEEN_SPACE_INDENTATION = TWELVE_SPACE_INDENTATION + FOUR_SPACE_INDENTATION; |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 919 | |
| 920 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 921 | * Static attribute for twenty space indentation. |
| 922 | */ |
VinodKumarS-Huawei | 9a91b48 | 2016-08-19 23:22:59 +0530 | [diff] [blame] | 923 | public static final String TWENTY_SPACE_INDENTATION = SIXTEEN_SPACE_INDENTATION + FOUR_SPACE_INDENTATION; |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 924 | |
| 925 | /** |
| 926 | * Static attribute for twenty four space indentation. |
| 927 | */ |
VinodKumarS-Huawei | 9a91b48 | 2016-08-19 23:22:59 +0530 | [diff] [blame] | 928 | public static final String TWENTY_FOUR_SPACE_INDENTATION = TWENTY_SPACE_INDENTATION + FOUR_SPACE_INDENTATION; |
| 929 | |
| 930 | /** |
| 931 | * Static attribute for twenty eight space indentation. |
| 932 | */ |
| 933 | public static final String TWENTY_EIGHT_SPACE_INDENTATION = TWENTY_FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION; |
| 934 | |
| 935 | /** |
| 936 | * Static attribute for thirty two space indentation. |
| 937 | */ |
| 938 | public static final String THIRTY_TWO_SPACE_INDENTATION = TWENTY_EIGHT_SPACE_INDENTATION + FOUR_SPACE_INDENTATION; |
| 939 | |
| 940 | /** |
| 941 | * continue. |
| 942 | */ |
| 943 | public static final String CONTINUE = "continue"; |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 944 | |
| 945 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 946 | * Static attribute for generated code path. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 947 | */ |
Bharat saraswal | 5600f0f | 2016-03-09 18:34:56 +0530 | [diff] [blame] | 948 | public static final String YANG_GEN_DIR = "src/main/java/"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 949 | |
| 950 | /** |
| 951 | * Static attribute for base package. |
| 952 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 953 | public static final String DEFAULT_BASE_PKG = "org.onosproject.yang.gen"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 954 | |
| 955 | /** |
| 956 | * Static attribute for YANG date prefix. |
| 957 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 958 | public static final String REVISION_PREFIX = "rev"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 959 | |
| 960 | /** |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 961 | * Static attribute for YANG automatic prefix for identifiers with keywords and beginning with digits. |
| 962 | */ |
| 963 | public static final String YANG_AUTO_PREFIX = "yangAutoPrefix"; |
| 964 | |
| 965 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 966 | * Static attribute for YANG version prefix. |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 967 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 968 | public static final String VERSION_PREFIX = "v"; |
| 969 | |
| 970 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 971 | * Static attribute for private modifier. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 972 | */ |
| 973 | public static final String PRIVATE = "private"; |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 974 | |
| 975 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 976 | * Static attribute for public modifier. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 977 | */ |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 978 | public static final String PUBLIC = "public"; |
| 979 | |
| 980 | /** |
Shankara-Huawei | 234cd09 | 2016-07-14 11:35:34 +0530 | [diff] [blame] | 981 | * Static attribute for abstract modifier. |
| 982 | */ |
| 983 | public static final String ABSTRACT = "abstract"; |
| 984 | |
| 985 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 986 | * Static attribute for protected modifier. |
| 987 | */ |
| 988 | public static final String PROTECTED = "protected"; |
| 989 | |
| 990 | /** |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 991 | * Void java type. |
| 992 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 993 | public static final String VOID = "void"; |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 994 | |
| 995 | /** |
| 996 | * String built in java type. |
| 997 | */ |
Bharat saraswal | 84366c5 | 2016-03-23 19:40:35 +0530 | [diff] [blame] | 998 | public static final String STRING_DATA_TYPE = "String"; |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 999 | |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1000 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1001 | * Java.lang.* packages. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1002 | */ |
| 1003 | public static final String JAVA_LANG = "java.lang"; |
| 1004 | |
| 1005 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1006 | * Java.math.* packages. |
| 1007 | */ |
| 1008 | public static final String JAVA_MATH = "java.math"; |
| 1009 | |
| 1010 | /** |
| 1011 | * Boolean built in java type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1012 | */ |
Bharat saraswal | 84366c5 | 2016-03-23 19:40:35 +0530 | [diff] [blame] | 1013 | public static final String BOOLEAN_DATA_TYPE = "boolean"; |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1014 | |
| 1015 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1016 | * BigInteger built in java type. |
| 1017 | */ |
| 1018 | public static final String BIG_INTEGER = "BigInteger"; |
| 1019 | |
| 1020 | /** |
Mahesh Poojary Huawei | 2cd4433 | 2016-07-14 12:38:17 +0530 | [diff] [blame] | 1021 | * BigDecimal built in java type. |
| 1022 | */ |
| 1023 | public static final String BIG_DECIMAL = "BigDecimal"; |
| 1024 | |
| 1025 | /** |
| 1026 | * BitSet built in java type. |
| 1027 | */ |
| 1028 | public static final String BIT_SET = "BitSet"; |
| 1029 | |
| 1030 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1031 | * Byte java built in type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1032 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 1033 | public static final String BYTE = "byte"; |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1034 | |
| 1035 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1036 | * Short java built in type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1037 | */ |
| 1038 | public static final String SHORT = "short"; |
| 1039 | |
| 1040 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1041 | * Int java built in type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1042 | */ |
| 1043 | public static final String INT = "int"; |
| 1044 | |
| 1045 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1046 | * Long java built in type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1047 | */ |
| 1048 | public static final String LONG = "long"; |
| 1049 | |
| 1050 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1051 | * Double java built in type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1052 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 1053 | public static final String DOUBLE = "double"; |
| 1054 | |
| 1055 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1056 | * Boolean built in java wrapper type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1057 | */ |
| 1058 | public static final String BOOLEAN_WRAPPER = "Boolean"; |
| 1059 | |
| 1060 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1061 | * Byte java built in wrapper type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1062 | */ |
| 1063 | public static final String BYTE_WRAPPER = "Byte"; |
| 1064 | |
| 1065 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1066 | * Short java built in wrapper type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1067 | */ |
| 1068 | public static final String SHORT_WRAPPER = "Short"; |
| 1069 | |
| 1070 | /** |
| 1071 | * Integer java built in wrapper type. |
| 1072 | */ |
| 1073 | public static final String INTEGER_WRAPPER = "Integer"; |
| 1074 | |
| 1075 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1076 | * Long java built in wrapper type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1077 | */ |
| 1078 | public static final String LONG_WRAPPER = "Long"; |
| 1079 | |
| 1080 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 1081 | * Static variable for question mark. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1082 | */ |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 1083 | public static final String QUESTION_MARK = "?"; |
Mahesh Poojary Huawei | 2cd4433 | 2016-07-14 12:38:17 +0530 | [diff] [blame] | 1084 | |
| 1085 | /** |
Bharat saraswal | 84366c5 | 2016-03-23 19:40:35 +0530 | [diff] [blame] | 1086 | * List of keywords in java, this is used for checking if the input does not contain these keywords. |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 1087 | */ |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1088 | public static final List<String> JAVA_KEY_WORDS = Arrays.asList( |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 1089 | "abstract", "assert", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", |
| 1090 | "default", "do", "double", "else", "extends", "false", "final", "finally", "float", "for", "goto", "if", |
| 1091 | "implements", "import", "instanceof", "enum", "int", "interface", "long", "native", "new", "null", |
| 1092 | "package", "private", "protected", "public", "return", "short", "static", "strictfp", "super", "switch", |
| 1093 | "synchronized", "this", "throw", "throws", "transient", "true", "try", "void", "volatile", "while"); |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 1094 | |
| 1095 | /** |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 1096 | * Static attribute for regex for all the special characters. |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 1097 | */ |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 1098 | public static final String REGEX_WITH_ALL_SPECIAL_CHAR = "\\p{Punct}+"; |
| 1099 | |
| 1100 | /** |
| 1101 | * Static attribute for regex for three special characters used in identifier. |
| 1102 | */ |
| 1103 | public static final String REGEX_FOR_IDENTIFIER_SPECIAL_CHAR = "[. _ -]+"; |
| 1104 | |
| 1105 | /** |
| 1106 | * Static attribute for regex for period. |
| 1107 | */ |
| 1108 | public static final String REGEX_FOR_PERIOD = "[.]"; |
| 1109 | |
| 1110 | /** |
| 1111 | * Static attribute for regex for underscore. |
| 1112 | */ |
| 1113 | public static final String REGEX_FOR_UNDERSCORE = "[_]"; |
| 1114 | |
| 1115 | /** |
| 1116 | * Static attribute for regex for hyphen. |
| 1117 | */ |
| 1118 | public static final String REGEX_FOR_HYPHEN = "[-]"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1119 | |
| 1120 | /** |
| 1121 | * Static attribute for regex for digits. |
| 1122 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 1123 | public static final String REGEX_FOR_FIRST_DIGIT = "\\d.*"; |
| 1124 | |
| 1125 | /** |
janani b | 703cfe4 | 2016-05-17 13:12:22 +0530 | [diff] [blame] | 1126 | * Static attribute for regex with digits. |
| 1127 | */ |
| 1128 | public static final String REGEX_WITH_DIGITS = "(?=\\d+)"; |
| 1129 | |
| 1130 | /** |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 1131 | * Static attribute for regex for single letter. |
| 1132 | */ |
| 1133 | public static final String REGEX_FOR_SINGLE_LETTER = "[a-zA-Z]"; |
| 1134 | |
| 1135 | /** |
| 1136 | * Static attribute for regex for digits with single letter. |
| 1137 | */ |
| 1138 | public static final String REGEX_FOR_DIGITS_WITH_SINGLE_LETTER = "[0-9]+[a-zA-Z]"; |
| 1139 | |
| 1140 | /** |
janani b | 703cfe4 | 2016-05-17 13:12:22 +0530 | [diff] [blame] | 1141 | * Static attribute for regex with uppercase. |
| 1142 | */ |
| 1143 | public static final String REGEX_WITH_UPPERCASE = "(?=\\p{Upper})"; |
| 1144 | |
| 1145 | /** |
| 1146 | * Static attribute for regex for single capital case letter. |
| 1147 | */ |
| 1148 | public static final String REGEX_WITH_SINGLE_CAPITAL_CASE = "[A-Z]"; |
| 1149 | |
| 1150 | /** |
| 1151 | * Static attribute for regex for capital case letter with any number of digits and small case letters. |
| 1152 | */ |
| 1153 | public static final String REGEX_WITH_SINGLE_CAPITAL_CASE_AND_DIGITS_SMALL_CASES = "[A-Z][0-9a-z]+"; |
| 1154 | |
| 1155 | /** |
janani b | 3e357f6 | 2016-05-19 17:39:50 +0530 | [diff] [blame] | 1156 | * Static attribute for regex for any string ending with service. |
| 1157 | */ |
| 1158 | public static final String REGEX_FOR_ANY_STRING_ENDING_WITH_SERVICE = ".+Service"; |
| 1159 | |
| 1160 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1161 | * Static attribute for class syntax. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 1162 | */ |
| 1163 | public static final String CLASS = "class"; |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 1164 | |
| 1165 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1166 | * Static attribute for builder syntax. |
| 1167 | */ |
| 1168 | public static final String BUILDER = "Builder"; |
| 1169 | |
| 1170 | /** |
VinodKumarS-Huawei | 6266db3 | 2016-05-10 17:58:57 +0530 | [diff] [blame] | 1171 | * Static attribute for manager syntax. |
| 1172 | */ |
| 1173 | public static final String MANAGER = "Manager"; |
| 1174 | |
| 1175 | /** |
| 1176 | * Static attribute for service syntax. |
| 1177 | */ |
| 1178 | public static final String SERVICE = "Service"; |
| 1179 | |
VinodKumarS-Huawei | 6266db3 | 2016-05-10 17:58:57 +0530 | [diff] [blame] | 1180 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1181 | * Static attribute for interface syntax. |
| 1182 | */ |
| 1183 | public static final String INTERFACE = "interface"; |
| 1184 | |
| 1185 | /** |
| 1186 | * Static attribute for enum syntax. |
| 1187 | */ |
| 1188 | public static final String ENUM = "enum"; |
| 1189 | |
| 1190 | /** |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 1191 | * Static attribute for type syntax. |
| 1192 | */ |
| 1193 | public static final String TYPE = "Type"; |
| 1194 | |
| 1195 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1196 | * Static attribute for static syntax. |
| 1197 | */ |
| 1198 | public static final String STATIC = "static"; |
| 1199 | |
| 1200 | /** |
| 1201 | * Static attribute for final syntax. |
| 1202 | */ |
| 1203 | public static final String FINAL = "final"; |
| 1204 | |
| 1205 | /** |
| 1206 | * Static attribute for package syntax. |
| 1207 | */ |
| 1208 | public static final String PACKAGE = "package"; |
| 1209 | |
| 1210 | /** |
| 1211 | * Static attribute for import syntax. |
| 1212 | */ |
| 1213 | public static final String IMPORT = "import "; |
| 1214 | |
| 1215 | /** |
| 1216 | * Static attribute for null syntax. |
| 1217 | */ |
| 1218 | public static final String NULL = "null"; |
| 1219 | |
| 1220 | /** |
| 1221 | * Static attribute for return syntax. |
| 1222 | */ |
| 1223 | public static final String RETURN = "return"; |
| 1224 | |
| 1225 | /** |
| 1226 | * Static attribute for java new syntax. |
| 1227 | */ |
| 1228 | public static final String NEW = "new"; |
| 1229 | |
| 1230 | /** |
| 1231 | * Static attribute for this syntax. |
| 1232 | */ |
| 1233 | public static final String THIS = "this"; |
| 1234 | |
| 1235 | /** |
| 1236 | * Static attribute for implements syntax. |
| 1237 | */ |
| 1238 | public static final String IMPLEMENTS = "implements"; |
| 1239 | |
| 1240 | /** |
| 1241 | * Static attribute for extends syntax. |
| 1242 | */ |
| 1243 | public static final String EXTEND = "extends"; |
| 1244 | |
| 1245 | /** |
Gaurav Agrawal | 02a60de | 2016-04-20 15:49:17 +0530 | [diff] [blame] | 1246 | * Static attribute for service interface suffix syntax. |
| 1247 | */ |
| 1248 | public static final String SERVICE_METHOD_STRING = "Service"; |
| 1249 | |
| 1250 | /** |
VinodKumarS-Huawei | 6266db3 | 2016-05-10 17:58:57 +0530 | [diff] [blame] | 1251 | * For event file generation. |
| 1252 | */ |
| 1253 | public static final String EVENT_STRING = "Event"; |
| 1254 | |
| 1255 | /** |
| 1256 | * For event listener file generation. |
| 1257 | */ |
Bharat saraswal | aab24b9 | 2016-08-02 18:43:16 +0530 | [diff] [blame] | 1258 | public static final String EVENT_LISTENER_STRING = "EventListener"; |
VinodKumarS-Huawei | 6266db3 | 2016-05-10 17:58:57 +0530 | [diff] [blame] | 1259 | |
| 1260 | /** |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 1261 | * For event subject file generation. |
| 1262 | */ |
| 1263 | public static final String EVENT_SUBJECT_NAME_SUFFIX = "EventSubject"; |
| 1264 | |
| 1265 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1266 | * Static attribute for build method syntax. |
| 1267 | */ |
| 1268 | public static final String BUILD = "build"; |
| 1269 | |
| 1270 | /** |
| 1271 | * Static attribute for object. |
| 1272 | */ |
| 1273 | public static final String OBJECT = "Object"; |
| 1274 | |
| 1275 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 1276 | * Static attribute for app instance. |
| 1277 | */ |
| 1278 | public static final String APP_INSTANCE = "appInstance"; |
| 1279 | |
| 1280 | /** |
Bharat saraswal | e50edca | 2016-08-05 01:58:25 +0530 | [diff] [blame] | 1281 | * Static attribute for instance. |
| 1282 | */ |
| 1283 | public static final String INSTANCE = "instance"; |
| 1284 | |
| 1285 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1286 | * Static attribute for override annotation. |
| 1287 | */ |
| 1288 | public static final String OVERRIDE = "@Override"; |
| 1289 | |
| 1290 | /** |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 1291 | * Static attribute for collections. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 1292 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 1293 | public static final String COLLECTION_IMPORTS = "java.util"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1294 | |
| 1295 | /** |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 1296 | * Static attribute for map. |
| 1297 | */ |
| 1298 | public static final String MAP = "Map"; |
| 1299 | |
| 1300 | /** |
| 1301 | * Static attribute for hash map. |
| 1302 | */ |
| 1303 | public static final String HASH_MAP = "HashMap"; |
| 1304 | |
| 1305 | |
| 1306 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1307 | * Static attribute for more object import package. |
| 1308 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 1309 | public static final String GOOGLE_MORE_OBJECT_IMPORT_PKG = "com.google.common.base"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1310 | |
| 1311 | /** |
| 1312 | * Static attribute for more object import class. |
| 1313 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 1314 | public static final String GOOGLE_MORE_OBJECT_IMPORT_CLASS = "MoreObjects;\n"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1315 | |
| 1316 | /** |
| 1317 | * Static attribute for to string method. |
| 1318 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 1319 | public static final String GOOGLE_MORE_OBJECT_METHOD_STRING = " MoreObjects.toStringHelper(getClass())"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1320 | |
| 1321 | /** |
| 1322 | * Static attribute for java utilities import package. |
| 1323 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 1324 | public static final String JAVA_UTIL_OBJECTS_IMPORT_PKG = "java.util"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1325 | |
| 1326 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 1327 | * Static attribute for bitset. |
| 1328 | */ |
| 1329 | public static final String BITSET = "BitSet"; |
| 1330 | |
| 1331 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1332 | * Static attribute for java utilities objects import class. |
| 1333 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 1334 | public static final String JAVA_UTIL_OBJECTS_IMPORT_CLASS = "Objects;\n"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1335 | |
| 1336 | /** |
Mahesh Poojary Huawei | 41547ad | 2016-07-14 17:49:50 +0530 | [diff] [blame] | 1337 | * Static attribute for java utilities import base64 class. |
| 1338 | */ |
| 1339 | public static final String JAVA_UTIL_IMPORT_BASE64_CLASS = "Base64;\n"; |
| 1340 | |
| 1341 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1342 | * Static attribute for AugmentedInfo class. |
| 1343 | */ |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 1344 | public static final String YANG_AUGMENTED_INFO = "YangAugmentedInfo"; |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1345 | |
| 1346 | /** |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 1347 | * Static attribute for augmented. |
Bharat saraswal | 4aaab4d | 2016-05-17 14:19:38 +0530 | [diff] [blame] | 1348 | */ |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 1349 | public static final String AUGMENTED = "Augmented"; |
VinodKumarS-Huawei | d81eccb | 2016-06-01 14:30:22 +0530 | [diff] [blame] | 1350 | |
Bharat saraswal | 4aaab4d | 2016-05-17 14:19:38 +0530 | [diff] [blame] | 1351 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1352 | * Static attribute for list. |
| 1353 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 1354 | public static final String LIST = "List"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1355 | |
| 1356 | /** |
Vidyashree Rama | b367047 | 2016-08-06 15:49:56 +0530 | [diff] [blame] | 1357 | * Static attribute for queue. |
| 1358 | */ |
| 1359 | public static final String QUEUE = "Queue"; |
| 1360 | |
| 1361 | /** |
| 1362 | * Static attribute for set. |
| 1363 | */ |
| 1364 | public static final String SET = "Set"; |
| 1365 | |
| 1366 | /** |
| 1367 | * Comment to be added for autogenerated impl methods. |
VinodKumarS-Huawei | 6266db3 | 2016-05-10 17:58:57 +0530 | [diff] [blame] | 1368 | */ |
| 1369 | public static final String YANG_UTILS_TODO = "//TODO: YANG utils generated code"; |
| 1370 | |
| 1371 | /** |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 1372 | * Static attribute for AbstractEvent. |
| 1373 | */ |
| 1374 | public static final String ABSTRACT_EVENT = "AbstractEvent"; |
| 1375 | |
| 1376 | /** |
| 1377 | * Static attribute for EventListener. |
| 1378 | */ |
| 1379 | public static final String EVENT_LISTENER = "EventListener"; |
| 1380 | |
| 1381 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 1382 | * Static attribute for or operator. |
| 1383 | */ |
| 1384 | public static final String OR_OPERATION = "||"; |
| 1385 | |
| 1386 | /** |
VinodKumarS-Huawei | 9a91b48 | 2016-08-19 23:22:59 +0530 | [diff] [blame] | 1387 | * Static attribute for or operator. |
| 1388 | */ |
| 1389 | public static final String AND_OPERATION = "&&"; |
| 1390 | |
| 1391 | /** |
Vidyashree Rama | b624817 | 2016-05-17 16:16:15 +0530 | [diff] [blame] | 1392 | * Static attribute for YANG file error. |
| 1393 | */ |
| 1394 | public static final String YANG_FILE_ERROR = "YANG file error : "; |
| 1395 | |
| 1396 | /** |
| 1397 | * Static attribute for unsupported error information. |
| 1398 | */ |
| 1399 | public static final String UNSUPPORTED_YANG_CONSTRUCT = " is not supported."; |
| 1400 | |
| 1401 | /** |
| 1402 | * Static attribute for currently unsupported error information. |
| 1403 | */ |
| 1404 | public static final String CURRENTLY_UNSUPPORTED = " is not supported in current version, please check wiki" + |
| 1405 | " for YANG utils road map."; |
| 1406 | |
| 1407 | /** |
Vidyashree Rama | 5daea74 | 2016-05-20 16:29:25 +0530 | [diff] [blame] | 1408 | * Static attribute for typedef linker error information. |
| 1409 | */ |
| 1410 | public static final String TYPEDEF_LINKER_ERROR = "YANG file error: Unable to find base " |
| 1411 | + "typedef for given type"; |
| 1412 | |
| 1413 | /** |
| 1414 | * Static attribute for grouping linker error information. |
| 1415 | */ |
| 1416 | public static final String GROUPING_LINKER_ERROR = "YANG file error: Unable to find base " |
| 1417 | + "grouping for given uses"; |
| 1418 | |
| 1419 | /** |
janani b | 0e4e8ae | 2016-07-13 21:06:41 +0530 | [diff] [blame] | 1420 | * Static attribute for if-feature linker error information. |
Vidyashree Rama | 13b4c55 | 2016-06-20 15:12:43 +0530 | [diff] [blame] | 1421 | */ |
| 1422 | public static final String FEATURE_LINKER_ERROR = "YANG file error: Unable to find feature " |
| 1423 | + "for given if-feature"; |
| 1424 | |
| 1425 | /** |
janani b | 0e4e8ae | 2016-07-13 21:06:41 +0530 | [diff] [blame] | 1426 | * Static attribute for leafref linker error information. |
| 1427 | */ |
| 1428 | public static final String LEAFREF_LINKER_ERROR = "YANG file error: Unable to find base " |
| 1429 | + "leaf/leaf-list for given leafref"; |
| 1430 | |
| 1431 | /** |
Shankara-Huawei | 234cd09 | 2016-07-14 11:35:34 +0530 | [diff] [blame] | 1432 | * Static attribute for base linker error information. |
| 1433 | */ |
| 1434 | public static final String BASE_LINKER_ERROR = "YANG file error: Unable to find base " |
| 1435 | + "identity for given base"; |
| 1436 | |
| 1437 | /** |
| 1438 | * Static attribute for identityref linker error information. |
| 1439 | */ |
| 1440 | public static final String IDENTITYREF_LINKER_ERROR = "YANG file error: Unable to find base " |
| 1441 | + "identity for given base"; |
| 1442 | |
| 1443 | /** |
Bharat saraswal | c2d3be1 | 2016-06-16 00:29:12 +0530 | [diff] [blame] | 1444 | * Static attribute for jar. |
| 1445 | */ |
| 1446 | public static final String JAR = "jar"; |
| 1447 | |
| 1448 | /** |
Bharat saraswal | 039f59c | 2016-07-14 21:57:13 +0530 | [diff] [blame] | 1449 | * Static attribute for for. |
| 1450 | */ |
| 1451 | public static final String FOR = "for"; |
| 1452 | |
| 1453 | /** |
| 1454 | * Static attribute for YangAugmentedOpParamInfo. |
| 1455 | */ |
| 1456 | public static final String YANG_AUGMENTED_OP_PARAM_INFO = "YangAugmentedOpParamInfo"; |
| 1457 | |
| 1458 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 1459 | * Static attribute for NoSuchMethodException. |
Bharat saraswal | 039f59c | 2016-07-14 21:57:13 +0530 | [diff] [blame] | 1460 | */ |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 1461 | public static final String NO_SUCH_METHOD_EXCEPTION = "NoSuchMethodException"; |
Bharat saraswal | 039f59c | 2016-07-14 21:57:13 +0530 | [diff] [blame] | 1462 | |
| 1463 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 1464 | * Static attribute for InvocationTargetException. |
Bharat saraswal | 039f59c | 2016-07-14 21:57:13 +0530 | [diff] [blame] | 1465 | */ |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 1466 | public static final String INVOCATION_TARGET_EXCEPTION = "InvocationTargetException"; |
Bharat saraswal | 039f59c | 2016-07-14 21:57:13 +0530 | [diff] [blame] | 1467 | |
| 1468 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 1469 | * Static attribute for InvocationTargetException. |
Bharat saraswal | 039f59c | 2016-07-14 21:57:13 +0530 | [diff] [blame] | 1470 | */ |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 1471 | public static final String INVOCATION_TARGET_EXCEPTION_IMPORT = "import" + |
| 1472 | " java.lang.reflect.InvocationTargetException;\n"; |
| 1473 | /** |
| 1474 | * Static attribute for IllegalAccessException. |
| 1475 | */ |
| 1476 | public static final String ILLEGAL_ACCESS_EXCEPTION = "IllegalAccessException"; |
Bharat saraswal | 039f59c | 2016-07-14 21:57:13 +0530 | [diff] [blame] | 1477 | |
| 1478 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 1479 | * Static attribute for arrayList. |
Bharat saraswal | 039f59c | 2016-07-14 21:57:13 +0530 | [diff] [blame] | 1480 | */ |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 1481 | public static final String ARRAY_LIST = "ArrayList<>()"; |
Bharat saraswal | 039f59c | 2016-07-14 21:57:13 +0530 | [diff] [blame] | 1482 | |
| 1483 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 1484 | * Static attribute for arrayList import. |
Bharat saraswal | 039f59c | 2016-07-14 21:57:13 +0530 | [diff] [blame] | 1485 | */ |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 1486 | public static final String ARRAY_LIST_IMPORT = IMPORT + COLLECTION_IMPORTS + ".ArrayList;\n"; |
Bharat saraswal | 039f59c | 2016-07-14 21:57:13 +0530 | [diff] [blame] | 1487 | |
| 1488 | /** |
Gaurav Agrawal | 8a14752 | 2016-08-10 13:43:01 +0530 | [diff] [blame] | 1489 | * Static attribute for temp keyword. |
| 1490 | */ |
| 1491 | public static final String TMP_VAR = "tmp"; |
| 1492 | |
| 1493 | /** |
| 1494 | * Static attribute for unused keyword. |
| 1495 | */ |
| 1496 | public static final String UNUSED = "UNUSED"; |
| 1497 | |
| 1498 | /** |
| 1499 | * Static attribute for 1 keyword. |
| 1500 | */ |
| 1501 | public static final String ONE = "1"; |
| 1502 | |
| 1503 | /** |
Vidyashree Rama | 1396065 | 2016-04-26 15:06:06 +0530 | [diff] [blame] | 1504 | * Creates an instance of util constants. |
| 1505 | */ |
| 1506 | private UtilConstants() { |
| 1507 | } |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 1508 | } |