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 | /** |
VinodKumarS-Huawei | 6266db3 | 2016-05-10 17:58:57 +0530 | [diff] [blame] | 110 | * JavaDocs's description for setter method. |
| 111 | */ |
| 112 | public static final String JAVA_DOC_MANAGER_SETTERS = " * Sets the value to attribute "; |
| 113 | |
| 114 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 115 | * JavaDocs's description for OF method. |
| 116 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 117 | public static final String JAVA_DOC_OF = " * Returns the object of "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 118 | |
| 119 | /** |
| 120 | * JavaDocs's description for typedef' setter method. |
| 121 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 122 | public static final String JAVA_DOC_SETTERS_COMMON = " * Sets the value of "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 123 | |
| 124 | /** |
| 125 | * JavaDocs's description for getter method. |
| 126 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 127 | public static final String JAVA_DOC_GETTERS = " * Returns the attribute "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 128 | |
| 129 | /** |
Bharat saraswal | 64e7e23 | 2016-07-14 23:33:55 +0530 | [diff] [blame] | 130 | * JavaDocs's description for getter method. |
| 131 | */ |
| 132 | public static final String JAVA_DOC_FOR_VALIDATOR = " * Validates if value is in given range."; |
| 133 | |
| 134 | /** |
| 135 | * JavaDocs's description for getter method. |
| 136 | */ |
| 137 | public static final String JAVA_DOC_FOR_VALIDATOR_RETURN = " * @return true if value is in range"; |
| 138 | |
| 139 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 140 | * JavaDocs's description for constructor. |
| 141 | */ |
Bharat saraswal | 780eca3 | 2016-04-05 12:45:45 +0530 | [diff] [blame] | 142 | public static final String JAVA_DOC_CONSTRUCTOR = " * Creates an instance of "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 143 | |
| 144 | /** |
| 145 | * JavaDocs's description for build method. |
| 146 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 147 | public static final String JAVA_DOC_BUILD = " * Builds object of "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 148 | |
| 149 | /** |
| 150 | * JavaDocs's return statement for build method. |
| 151 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 152 | public static final String JAVA_DOC_BUILD_RETURN = "object of "; |
| 153 | |
| 154 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 155 | * JavaDocs's statement for builder object. |
| 156 | */ |
| 157 | public static final String BUILDER_OBJECT = "builder object of "; |
| 158 | |
| 159 | /** |
Gaurav Agrawal | 02a60de | 2016-04-20 15:49:17 +0530 | [diff] [blame] | 160 | * JavaDocs's statement for rpc method. |
| 161 | */ |
| 162 | public static final String JAVA_DOC_RPC = " * Service interface of "; |
| 163 | |
| 164 | /** |
| 165 | * JavaDocs's statement for rpc's input string. |
| 166 | */ |
| 167 | public static final String RPC_INPUT_STRING = "input of service interface "; |
| 168 | |
| 169 | /** |
| 170 | * JavaDocs's statement for rpc's output string. |
| 171 | */ |
| 172 | public static final String RPC_OUTPUT_STRING = "output of service interface "; |
| 173 | |
| 174 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 175 | * Static attribute for new line. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 176 | */ |
| 177 | public static final String NEW_LINE = "\n"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 178 | |
| 179 | /** |
Bharat saraswal | 250a747 | 2016-05-12 13:16:57 +0530 | [diff] [blame] | 180 | * Static attribute for default. |
| 181 | */ |
| 182 | public static final String DEFAULT = "default"; |
| 183 | |
| 184 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 185 | * Static attribute for op param class. |
| 186 | */ |
| 187 | public static final String OPERATION = "OpParam"; |
| 188 | |
| 189 | /** |
| 190 | * Static attribute for operation type. |
| 191 | */ |
| 192 | public static final String OPERATION_ENUM = "OperationType"; |
| 193 | |
| 194 | /** |
| 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 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 220 | * Static attribute for parse byte. |
| 221 | */ |
| 222 | public static final String PARSE_BYTE = "parseByte"; |
| 223 | |
| 224 | /** |
Mahesh Poojary Huawei | 2cd4433 | 2016-07-14 12:38:17 +0530 | [diff] [blame] | 225 | * Static attribute for get bytes. |
| 226 | */ |
| 227 | public static final String GET_BYTES = "getBytes"; |
| 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 | */ |
| 322 | public static final String INT_MIN_RANGE_ATTR = "static final int INT32_MIN_RANGE = -2147483648;\n"; |
| 323 | |
| 324 | /** |
| 325 | * Static attribute for minRange. |
| 326 | */ |
| 327 | public static final String INT_MIN_RANGE = "INT32_MIN_RANGE"; |
| 328 | |
| 329 | /** |
| 330 | * Static attribute for minRange. |
| 331 | */ |
| 332 | public static final String INT_MAX_RANGE = "INT32_MAX_RANGE"; |
| 333 | |
| 334 | /** |
| 335 | * Static attribute for maxRange. |
| 336 | */ |
| 337 | public static final String INT_MAX_RANGE_ATTR = "static final int INT32_MAX_RANGE = 2147483647;"; |
| 338 | |
| 339 | |
| 340 | /** |
| 341 | * Static attribute for minRange. |
| 342 | */ |
| 343 | public static final String UINT_MIN_RANGE_ATTR = "static final int UINT16_MIN_RANGE = 0;\n"; |
| 344 | |
| 345 | /** |
| 346 | * Static attribute for maxRange. |
| 347 | */ |
| 348 | public static final String UINT_MAX_RANGE_ATTR = "static final int UINT16_MAX_RANGE = 2147483647;"; |
| 349 | |
| 350 | |
| 351 | /** |
| 352 | * Static attribute for minRange. |
| 353 | */ |
| 354 | public static final String UINT_MIN_RANGE = "UINT16_MIN_RANGE"; |
| 355 | |
| 356 | /** |
| 357 | * Static attribute for maxRange. |
| 358 | */ |
| 359 | public static final String UINT_MAX_RANGE = "UINT16_MAX_RANGE"; |
| 360 | |
| 361 | /** |
| 362 | * Static attribute for minRange. |
| 363 | */ |
| 364 | public static final String LONG_MIN_RANGE_ATTR = "static final BigInteger INT64_MIN_RANGE =" + |
| 365 | " new BigInteger(\"-9223372036854775808\");\n"; |
| 366 | |
| 367 | /** |
| 368 | * Static attribute for maxRange. |
| 369 | */ |
| 370 | public static final String LONG_MAX_RANGE_ATTR = "static final BigInteger INT64_MAX_RANGE =" + |
| 371 | " new BigInteger(\"9223372036854775807\");"; |
| 372 | |
| 373 | /** |
| 374 | * Static attribute for minRange. |
| 375 | */ |
| 376 | public static final String LONG_MIN_RANGE = "INT64_MIN_RANGE"; |
| 377 | |
| 378 | /** |
| 379 | * Static attribute for maxRange. |
| 380 | */ |
| 381 | public static final String LONG_MAX_RANGE = "INT64_MAX_RANGE"; |
| 382 | |
| 383 | /** |
| 384 | * Static attribute for minRange. |
| 385 | */ |
| 386 | public static final String ULONG_MIN_RANGE_ATTR = "static final BigInteger UINT32_MIN_RANGE =" + |
| 387 | " new BigInteger(\"0\");\n"; |
| 388 | |
| 389 | /** |
| 390 | * Static attribute for maxRange. |
| 391 | */ |
| 392 | public static final String ULONG_MAX_RANGE_ATTR = "static final BigInteger UINT32_MAX_RANGE =" + |
| 393 | " new BigInteger(\"9223372036854775807\");"; |
| 394 | |
| 395 | |
| 396 | /** |
| 397 | * Static attribute for minRange. |
| 398 | */ |
| 399 | public static final String ULONG_MIN_RANGE = "UINT32_MIN_RANGE"; |
| 400 | |
| 401 | /** |
| 402 | * Static attribute for maxRange. |
| 403 | */ |
| 404 | public static final String ULONG_MAX_RANGE = "UINT32_MAX_RANGE"; |
| 405 | |
| 406 | /** |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 407 | * Static attribute for subject. |
| 408 | */ |
| 409 | public static final String SUBJECT = "Subject"; |
| 410 | |
| 411 | /** |
Bharat saraswal | 4aaab4d | 2016-05-17 14:19:38 +0530 | [diff] [blame] | 412 | * Static attribute for ListenerRegistry. |
| 413 | */ |
| 414 | public static final String LISTENER_REG = "ListenerRegistry"; |
| 415 | |
| 416 | /** |
| 417 | * Static attribute for ListenerService. |
| 418 | */ |
| 419 | public static final String LISTENER_SERVICE = "ListenerService"; |
| 420 | |
| 421 | /** |
| 422 | * Static attribute for listener package. |
| 423 | */ |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 424 | public static final String ONOS_EVENT_PKG = "org.onosproject.event"; |
Bharat saraswal | 4aaab4d | 2016-05-17 14:19:38 +0530 | [diff] [blame] | 425 | |
| 426 | /** |
Vidyashree Rama | b624817 | 2016-05-17 16:16:15 +0530 | [diff] [blame] | 427 | * Static attribute for colon. |
| 428 | */ |
| 429 | public static final String COLON = ":"; |
| 430 | |
| 431 | /** |
| 432 | * Static attribute for caret. |
| 433 | */ |
| 434 | public static final String CARET = "^"; |
| 435 | |
| 436 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 437 | * Static attribute for input string. |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 438 | */ |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 439 | public static final String INPUT = "input"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 440 | |
| 441 | /** |
janani b | 0e4e8ae | 2016-07-13 21:06:41 +0530 | [diff] [blame] | 442 | * Static attribute for output string. |
| 443 | */ |
| 444 | public static final String OUTPUT = "output"; |
| 445 | |
| 446 | /** |
| 447 | * Static attribute for current string. |
| 448 | */ |
| 449 | public static final String CURRENT = "current"; |
| 450 | |
| 451 | /** |
janani b | b08850e | 2016-05-17 18:20:33 +0530 | [diff] [blame] | 452 | * Static attribute for leafref string. |
| 453 | */ |
| 454 | public static final String LEAFREF = "leafref"; |
| 455 | |
| 456 | /** |
| 457 | * Static attribute for identityref string. |
| 458 | */ |
| 459 | public static final String IDENTITYREF = "identityref"; |
| 460 | |
| 461 | /** |
Gaurav Agrawal | 02a60de | 2016-04-20 15:49:17 +0530 | [diff] [blame] | 462 | * Static attribute for output variable of rpc. |
| 463 | */ |
| 464 | public static final String RPC_INPUT_VAR_NAME = "inputVar"; |
| 465 | |
| 466 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 467 | * Static attribute for new line. |
| 468 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 469 | public static final String EQUAL = "="; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 470 | |
| 471 | /** |
| 472 | * Static attribute for slash syntax. |
| 473 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 474 | public static final String SLASH = File.separator; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 475 | |
| 476 | /** |
| 477 | * Static attribute for add syntax. |
| 478 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 479 | public static final String ADD = "+"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 480 | |
| 481 | /** |
Mahesh Poojary Huawei | 41547ad | 2016-07-14 17:49:50 +0530 | [diff] [blame] | 482 | * Static attribute for single quote. |
| 483 | */ |
| 484 | public static final String SINGLE_QUOTE = "\'"; |
| 485 | |
| 486 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 487 | * Static attribute for quotes. |
| 488 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 489 | public static final String QUOTES = "\""; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 490 | |
| 491 | /** |
Mahesh Poojary Huawei | 41547ad | 2016-07-14 17:49:50 +0530 | [diff] [blame] | 492 | * Static attribute for zero. |
| 493 | */ |
| 494 | public static final String ZERO = "0"; |
| 495 | |
| 496 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 497 | * Static attribute for ampersand. |
| 498 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 499 | public static final String AND = "&"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 500 | |
| 501 | /** |
| 502 | * Static attribute for comma. |
| 503 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 504 | public static final String COMMA = ","; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 505 | |
| 506 | /** |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 507 | * Static attribute for class. |
| 508 | */ |
| 509 | public static final String CLASS_STRING = "Class"; |
| 510 | |
| 511 | /** |
| 512 | * Static attribute for put. |
| 513 | */ |
| 514 | public static final String PUT = "put"; |
| 515 | |
| 516 | /** |
| 517 | * Static attribute for get. |
| 518 | */ |
| 519 | public static final String GET = "get"; |
| 520 | |
| 521 | /** |
janani b | 0e4e8ae | 2016-07-13 21:06:41 +0530 | [diff] [blame] | 522 | * Static attribute for slash character. |
| 523 | */ |
| 524 | public static final char CHAR_OF_SLASH = '/'; |
| 525 | |
| 526 | /** |
| 527 | * Static attribute for open square bracket character. |
| 528 | */ |
| 529 | public static final char CHAR_OF_OPEN_SQUARE_BRACKET = '['; |
| 530 | |
| 531 | /** |
| 532 | * Static attribute for close square bracket character. |
| 533 | */ |
| 534 | public static final char CHAR_OF_CLOSE_SQUARE_BRACKET = ']'; |
| 535 | |
| 536 | /** |
| 537 | * Static attribute for slash string. |
| 538 | */ |
| 539 | public static final String SLASH_FOR_STRING = "/"; |
| 540 | |
| 541 | /** |
| 542 | * Static attribute for open square bracket. |
| 543 | */ |
| 544 | public static final String OPEN_SQUARE_BRACKET = "["; |
| 545 | |
| 546 | /** |
| 547 | * Static attribute for ancestor accessor. |
| 548 | */ |
| 549 | public static final String ANCESTOR_ACCESSOR = ".."; |
| 550 | |
| 551 | /** |
| 552 | * Static attribute for ancestor accessor along with path. |
| 553 | */ |
| 554 | public static final String ANCESTOR_ACCESSOR_IN_PATH = "../"; |
| 555 | |
| 556 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 557 | * Static attribute for add syntax. |
| 558 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 559 | public static final String ADD_STRING = "add"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 560 | |
| 561 | /** |
Mahesh Poojary Huawei | 41547ad | 2016-07-14 17:49:50 +0530 | [diff] [blame] | 562 | * Static attribute for string replace syntax. |
| 563 | */ |
| 564 | public static final String REPLACE_STRING = "replace"; |
| 565 | |
| 566 | /** |
| 567 | * Static attribute for string trim syntax. |
| 568 | */ |
| 569 | public static final String TRIM_STRING = "trim"; |
| 570 | |
| 571 | /** |
| 572 | * Static attribute for string split syntax. |
| 573 | */ |
| 574 | public static final String SPLIT_STRING = "split"; |
| 575 | |
| 576 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 577 | * Static attribute for from syntax. |
| 578 | */ |
| 579 | public static final String FROM_STRING_METHOD_NAME = "fromString"; |
| 580 | |
| 581 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 582 | * Static attribute for check not null syntax. |
| 583 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 584 | public static final String CHECK_NOT_NULL_STRING = "checkNotNull"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 585 | |
| 586 | /** |
| 587 | * Static attribute for hash code syntax. |
| 588 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 589 | public static final String HASH_CODE_STRING = "hashCode"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 590 | |
| 591 | /** |
| 592 | * Static attribute for equals syntax. |
| 593 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 594 | public static final String EQUALS_STRING = "equals"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 595 | |
| 596 | /** |
| 597 | * Static attribute for object. |
| 598 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 599 | public static final String OBJECT_STRING = "Object"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 600 | |
| 601 | /** |
| 602 | * Static attribute for instance of syntax. |
| 603 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 604 | public static final String INSTANCE_OF = " instanceof "; |
| 605 | |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 606 | /** |
| 607 | * Static attribute for value syntax. |
| 608 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 609 | public static final String VALUE = "value"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 610 | |
| 611 | /** |
| 612 | * Static attribute for suffix s. |
| 613 | */ |
Bharat saraswal | 84366c5 | 2016-03-23 19:40:35 +0530 | [diff] [blame] | 614 | public static final String SUFFIX_S = "s"; |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 615 | |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 616 | /** |
| 617 | * Static attribute for if. |
| 618 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 619 | public static final String IF = "if"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 620 | |
| 621 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 622 | * Static attribute for of. |
| 623 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 624 | public static final String OF = "of"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 625 | |
| 626 | /** |
| 627 | * Static attribute for other. |
| 628 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 629 | public static final String OTHER = "other"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 630 | |
| 631 | /** |
| 632 | * Static attribute for obj syntax. |
| 633 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 634 | public static final String OBJ = "obj"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 635 | |
| 636 | /** |
| 637 | * Static attribute for hash syntax. |
| 638 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 639 | public static final String HASH = "hash"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 640 | |
| 641 | /** |
| 642 | * Static attribute for to syntax. |
| 643 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 644 | public static final String TO = "to"; |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 645 | |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 646 | /** |
| 647 | * Static attribute for true syntax. |
| 648 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 649 | public static final String TRUE = "true"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 650 | |
| 651 | /** |
| 652 | * Static attribute for false syntax. |
| 653 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 654 | public static final String FALSE = "false"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 655 | |
| 656 | /** |
| 657 | * Static attribute for org. |
| 658 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 659 | public static final String ORG = "org"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 660 | |
| 661 | /** |
| 662 | * Static attribute for temp. |
| 663 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 664 | public static final String TEMP = "temp"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 665 | |
| 666 | /** |
| 667 | * Static attribute for YANG file directory. |
| 668 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 669 | public static final String YANG_RESOURCES = "yang/resources"; |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 670 | |
| 671 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 672 | * Static attribute for diamond close bracket syntax. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 673 | */ |
| 674 | public static final String DIAMOND_OPEN_BRACKET = "<"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 675 | |
| 676 | /** |
| 677 | * Static attribute for diamond close bracket syntax. |
| 678 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 679 | public static final String DIAMOND_CLOSE_BRACKET = ">"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 680 | |
| 681 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 682 | * Static attribute for exception syntax. |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 683 | */ |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 684 | public static final String EXCEPTION = "Exception"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 685 | |
| 686 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 687 | * Static attribute for exception variable syntax. |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 688 | */ |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 689 | public static final String EXCEPTION_VAR = "e"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 690 | |
| 691 | /** |
| 692 | * Static attribute for open parenthesis syntax. |
| 693 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 694 | public static final String OPEN_PARENTHESIS = "("; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 695 | |
| 696 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 697 | * Static attribute for received syntax. |
| 698 | */ |
| 699 | public static final String RECEIVED_OBJECT = "recv"; |
| 700 | |
| 701 | /** |
Bharat saraswal | 250a747 | 2016-05-12 13:16:57 +0530 | [diff] [blame] | 702 | * Static attribute for switch syntax. |
| 703 | */ |
| 704 | public static final String SWITCH = "switch"; |
| 705 | |
| 706 | /** |
| 707 | * Static attribute for case syntax. |
| 708 | */ |
| 709 | public static final String CASE = "case"; |
| 710 | |
| 711 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 712 | * Static attribute for temp val syntax. |
| 713 | */ |
| 714 | public static final String TMP_VAL = "tmpVal"; |
| 715 | |
| 716 | /** |
Bharat saraswal | 64e7e23 | 2016-07-14 23:33:55 +0530 | [diff] [blame] | 717 | * Static attribute for close curly bracket syntax. |
| 718 | */ |
| 719 | public static final String ELSE = "else"; |
| 720 | |
| 721 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 722 | * From string parameter name. |
| 723 | */ |
| 724 | public static final String FROM_STRING_PARAM_NAME = "valInString"; |
| 725 | |
| 726 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 727 | * Static attribute for close parenthesis syntax. |
| 728 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 729 | public static final String CLOSE_PARENTHESIS = ")"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 730 | |
| 731 | /** |
| 732 | * Static attribute for open curly bracket syntax. |
| 733 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 734 | public static final String OPEN_CURLY_BRACKET = "{"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 735 | |
| 736 | /** |
| 737 | * Static attribute for close curly bracket syntax. |
| 738 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 739 | public static final String CLOSE_CURLY_BRACKET = "}"; |
| 740 | |
| 741 | /** |
Mahesh Poojary Huawei | 2cd4433 | 2016-07-14 12:38:17 +0530 | [diff] [blame] | 742 | * Static attribute for square brackets syntax. |
| 743 | */ |
| 744 | public static final String SQUARE_BRACKETS = "[]"; |
| 745 | |
| 746 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 747 | * Static attribute for getter method prefix. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 748 | */ |
| 749 | public static final String GET_METHOD_PREFIX = "get"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 750 | |
| 751 | /** |
| 752 | * Static attribute for setter method prefix. |
| 753 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 754 | public static final String SET_METHOD_PREFIX = "set"; |
| 755 | |
| 756 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 757 | * Static attribute for get filter leaf flags. |
| 758 | */ |
| 759 | public static final String GET_FILTER_LEAF = "getFilterLeafFlags"; |
| 760 | |
| 761 | /** |
| 762 | * Static attribute for get filter leaf list flags. |
| 763 | */ |
| 764 | public static final String GET_FILTER_LEAF_LIST = "getFilterLeafListFlags"; |
| 765 | |
| 766 | /** |
| 767 | * Static attribute for filter leaf flags. |
| 768 | */ |
| 769 | public static final String FILTER_LEAF = "filterLeafFlags"; |
| 770 | |
| 771 | /** |
| 772 | * Static attribute for filter leaf list flags. |
| 773 | */ |
| 774 | public static final String FILTER_LEAF_LIST = "filterLeafListFlags"; |
| 775 | |
| 776 | /** |
| 777 | * Static attribute for get select leaf flags. |
| 778 | */ |
| 779 | public static final String GET_SELECT_LEAF = "getSelectLeafFlags"; |
| 780 | |
| 781 | /** |
| 782 | * Static attribute for get select leaf list flags. |
| 783 | */ |
| 784 | public static final String GET_SELECT_LEAF_LIST = "getSelectLeafListFlags"; |
| 785 | |
| 786 | /** |
| 787 | * Static attribute for get operation type. |
| 788 | */ |
| 789 | public static final String GET_OPERATION_TYPE = "getOpertionType"; |
| 790 | |
| 791 | /** |
| 792 | * Static attribute for set operation type. |
| 793 | */ |
| 794 | public static final String SET_OPERATION_TYPE = "setOpertionType"; |
| 795 | |
| 796 | /** |
| 797 | * Static attribute for select leaf flags. |
| 798 | */ |
| 799 | public static final String SELECT_LEAF = "selectLeafFlags"; |
| 800 | |
| 801 | /** |
| 802 | * Static attribute for select leaf list flags. |
| 803 | */ |
| 804 | public static final String SELECT_LEAF_LIST = "selectLeafListFlags"; |
| 805 | |
| 806 | /** |
| 807 | * Static attribute for op param type. |
| 808 | */ |
| 809 | public static final String OP_PARAM_TYPE = "opParamType"; |
| 810 | |
| 811 | /** |
| 812 | * Static attribute for is filter content match method prefix. |
| 813 | */ |
| 814 | public static final String FILTER_CONTENT_MATCH = "isFilterContentMatch"; |
| 815 | |
| 816 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 817 | * Static attribute for four space indentation. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 818 | */ |
| 819 | public static final String FOUR_SPACE_INDENTATION = " "; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 820 | |
| 821 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 822 | * Static attribute for not syntax. |
| 823 | */ |
| 824 | public static final String NOT = "!"; |
| 825 | |
| 826 | /** |
Gaurav Agrawal | 97a5e1c | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 827 | * Static attribute for try syntax. |
| 828 | */ |
| 829 | public static final String TRY = "try"; |
| 830 | |
| 831 | /** |
| 832 | * Static attribute for catch syntax. |
| 833 | */ |
| 834 | public static final String CATCH = "catch"; |
| 835 | |
| 836 | /** |
Bharat saraswal | d14cbe8 | 2016-07-14 13:26:18 +0530 | [diff] [blame] | 837 | * Static attribute for super syntax. |
| 838 | */ |
| 839 | public static final String SUPER = "super"; |
| 840 | |
| 841 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 842 | * Static attribute for merge syntax. |
| 843 | */ |
| 844 | public static final String MERGE = "MERGE,"; |
| 845 | |
| 846 | /** |
| 847 | * Static attribute for replace syntax. |
| 848 | */ |
| 849 | public static final String REPLACE = "REPLACE,"; |
| 850 | |
| 851 | /** |
| 852 | * Static attribute for create syntax. |
| 853 | */ |
| 854 | public static final String CREATE = "CREATE,"; |
| 855 | |
| 856 | /** |
| 857 | * Static attribute for delete syntax. |
| 858 | */ |
| 859 | public static final String DELETE = "DELETE,"; |
| 860 | |
| 861 | /** |
| 862 | * Static attribute for remove syntax. |
| 863 | */ |
| 864 | public static final String REMOVE = "REMOVE"; |
| 865 | |
| 866 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 867 | * Static attribute for eight space indentation. |
| 868 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 869 | 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] | 870 | |
| 871 | /** |
| 872 | * Static attribute for twelve space indentation. |
| 873 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 874 | public static final String TWELVE_SPACE_INDENTATION = FOUR_SPACE_INDENTATION + EIGHT_SPACE_INDENTATION; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 875 | |
| 876 | /** |
| 877 | * Static attribute for sixteen space indentation. |
| 878 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 879 | public static final String SIXTEEN_SPACE_INDENTATION = EIGHT_SPACE_INDENTATION + EIGHT_SPACE_INDENTATION; |
| 880 | |
| 881 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 882 | * Static attribute for generated code path. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 883 | */ |
Bharat saraswal | 5600f0f | 2016-03-09 18:34:56 +0530 | [diff] [blame] | 884 | public static final String YANG_GEN_DIR = "src/main/java/"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 885 | |
| 886 | /** |
| 887 | * Static attribute for base package. |
| 888 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 889 | public static final String DEFAULT_BASE_PKG = "org.onosproject.yang.gen"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 890 | |
| 891 | /** |
| 892 | * Static attribute for YANG date prefix. |
| 893 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 894 | public static final String REVISION_PREFIX = "rev"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 895 | |
| 896 | /** |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 897 | * Static attribute for YANG automatic prefix for identifiers with keywords and beginning with digits. |
| 898 | */ |
| 899 | public static final String YANG_AUTO_PREFIX = "yangAutoPrefix"; |
| 900 | |
| 901 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 902 | * Static attribute for YANG version perifx. |
| 903 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 904 | public static final String VERSION_PREFIX = "v"; |
| 905 | |
| 906 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 907 | * Static attribute for private modifier. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 908 | */ |
| 909 | public static final String PRIVATE = "private"; |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 910 | |
| 911 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 912 | * Static attribute for public modifier. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 913 | */ |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 914 | public static final String PUBLIC = "public"; |
| 915 | |
| 916 | /** |
Shankara-Huawei | 234cd09 | 2016-07-14 11:35:34 +0530 | [diff] [blame] | 917 | * Static attribute for abstract modifier. |
| 918 | */ |
| 919 | public static final String ABSTRACT = "abstract"; |
| 920 | |
| 921 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 922 | * Static attribute for protected modifier. |
| 923 | */ |
| 924 | public static final String PROTECTED = "protected"; |
| 925 | |
| 926 | /** |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 927 | * Void java type. |
| 928 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 929 | public static final String VOID = "void"; |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 930 | |
| 931 | /** |
| 932 | * String built in java type. |
| 933 | */ |
Bharat saraswal | 84366c5 | 2016-03-23 19:40:35 +0530 | [diff] [blame] | 934 | public static final String STRING_DATA_TYPE = "String"; |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 935 | |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 936 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 937 | * Java.lang.* packages. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 938 | */ |
| 939 | public static final String JAVA_LANG = "java.lang"; |
| 940 | |
| 941 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 942 | * Java.math.* packages. |
| 943 | */ |
| 944 | public static final String JAVA_MATH = "java.math"; |
| 945 | |
| 946 | /** |
| 947 | * Boolean built in java type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 948 | */ |
Bharat saraswal | 84366c5 | 2016-03-23 19:40:35 +0530 | [diff] [blame] | 949 | public static final String BOOLEAN_DATA_TYPE = "boolean"; |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 950 | |
| 951 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 952 | * BigInteger built in java type. |
| 953 | */ |
| 954 | public static final String BIG_INTEGER = "BigInteger"; |
| 955 | |
| 956 | /** |
Mahesh Poojary Huawei | 2cd4433 | 2016-07-14 12:38:17 +0530 | [diff] [blame] | 957 | * BigDecimal built in java type. |
| 958 | */ |
| 959 | public static final String BIG_DECIMAL = "BigDecimal"; |
| 960 | |
| 961 | /** |
| 962 | * BitSet built in java type. |
| 963 | */ |
| 964 | public static final String BIT_SET = "BitSet"; |
| 965 | |
| 966 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 967 | * Byte java built in type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 968 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 969 | public static final String BYTE = "byte"; |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 970 | |
| 971 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 972 | * Short java built in type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 973 | */ |
| 974 | public static final String SHORT = "short"; |
| 975 | |
| 976 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 977 | * Int java built in type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 978 | */ |
| 979 | public static final String INT = "int"; |
| 980 | |
| 981 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 982 | * Long java built in type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 983 | */ |
| 984 | public static final String LONG = "long"; |
| 985 | |
| 986 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 987 | * Double java built in type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 988 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 989 | public static final String DOUBLE = "double"; |
| 990 | |
| 991 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 992 | * Boolean built in java wrapper type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 993 | */ |
| 994 | public static final String BOOLEAN_WRAPPER = "Boolean"; |
| 995 | |
| 996 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 997 | * Byte java built in wrapper type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 998 | */ |
| 999 | public static final String BYTE_WRAPPER = "Byte"; |
| 1000 | |
| 1001 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1002 | * Short java built in wrapper type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1003 | */ |
| 1004 | public static final String SHORT_WRAPPER = "Short"; |
| 1005 | |
| 1006 | /** |
| 1007 | * Integer java built in wrapper type. |
| 1008 | */ |
| 1009 | public static final String INTEGER_WRAPPER = "Integer"; |
| 1010 | |
| 1011 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1012 | * Long java built in wrapper type. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1013 | */ |
| 1014 | public static final String LONG_WRAPPER = "Long"; |
| 1015 | |
| 1016 | /** |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 1017 | * Static varibale for question mark. |
Vinod Kumar S | 0871098 | 2016-03-03 19:55:30 +0530 | [diff] [blame] | 1018 | */ |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 1019 | public static final String QUESTION_MARK = "?"; |
Mahesh Poojary Huawei | 2cd4433 | 2016-07-14 12:38:17 +0530 | [diff] [blame] | 1020 | |
| 1021 | /** |
Bharat saraswal | 84366c5 | 2016-03-23 19:40:35 +0530 | [diff] [blame] | 1022 | * 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] | 1023 | */ |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1024 | public static final List<String> JAVA_KEY_WORDS = Arrays.asList( |
| 1025 | "abstract", "assert", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", |
| 1026 | "default", "do", "double", "else", "extends", "false", "final", "finally", "float", "for", "goto", "if", |
| 1027 | "implements", "import", "instanceof", "int", "interface", "long", "native", "new", "null", "package", |
| 1028 | "private", "protected", "public", "return", "short", "static", "strictfp", "super", "switch", |
| 1029 | "synchronized", "this", "throw", "throws", "transient", "true", "try", "void", "volatile", "while"); |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 1030 | |
| 1031 | /** |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 1032 | * Static attribute for regex for all the special characters. |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 1033 | */ |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 1034 | public static final String REGEX_WITH_ALL_SPECIAL_CHAR = "\\p{Punct}+"; |
| 1035 | |
| 1036 | /** |
| 1037 | * Static attribute for regex for three special characters used in identifier. |
| 1038 | */ |
| 1039 | public static final String REGEX_FOR_IDENTIFIER_SPECIAL_CHAR = "[. _ -]+"; |
| 1040 | |
| 1041 | /** |
| 1042 | * Static attribute for regex for period. |
| 1043 | */ |
| 1044 | public static final String REGEX_FOR_PERIOD = "[.]"; |
| 1045 | |
| 1046 | /** |
| 1047 | * Static attribute for regex for underscore. |
| 1048 | */ |
| 1049 | public static final String REGEX_FOR_UNDERSCORE = "[_]"; |
| 1050 | |
| 1051 | /** |
| 1052 | * Static attribute for regex for hyphen. |
| 1053 | */ |
| 1054 | public static final String REGEX_FOR_HYPHEN = "[-]"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1055 | |
| 1056 | /** |
| 1057 | * Static attribute for regex for digits. |
| 1058 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 1059 | public static final String REGEX_FOR_FIRST_DIGIT = "\\d.*"; |
| 1060 | |
| 1061 | /** |
janani b | 703cfe4 | 2016-05-17 13:12:22 +0530 | [diff] [blame] | 1062 | * Static attribute for regex with digits. |
| 1063 | */ |
| 1064 | public static final String REGEX_WITH_DIGITS = "(?=\\d+)"; |
| 1065 | |
| 1066 | /** |
janani b | 1c6acc4 | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 1067 | * Static attribute for regex for single letter. |
| 1068 | */ |
| 1069 | public static final String REGEX_FOR_SINGLE_LETTER = "[a-zA-Z]"; |
| 1070 | |
| 1071 | /** |
| 1072 | * Static attribute for regex for digits with single letter. |
| 1073 | */ |
| 1074 | public static final String REGEX_FOR_DIGITS_WITH_SINGLE_LETTER = "[0-9]+[a-zA-Z]"; |
| 1075 | |
| 1076 | /** |
janani b | 703cfe4 | 2016-05-17 13:12:22 +0530 | [diff] [blame] | 1077 | * Static attribute for regex with uppercase. |
| 1078 | */ |
| 1079 | public static final String REGEX_WITH_UPPERCASE = "(?=\\p{Upper})"; |
| 1080 | |
| 1081 | /** |
| 1082 | * Static attribute for regex for single capital case letter. |
| 1083 | */ |
| 1084 | public static final String REGEX_WITH_SINGLE_CAPITAL_CASE = "[A-Z]"; |
| 1085 | |
| 1086 | /** |
| 1087 | * Static attribute for regex for capital case letter with any number of digits and small case letters. |
| 1088 | */ |
| 1089 | public static final String REGEX_WITH_SINGLE_CAPITAL_CASE_AND_DIGITS_SMALL_CASES = "[A-Z][0-9a-z]+"; |
| 1090 | |
| 1091 | /** |
janani b | 3e357f6 | 2016-05-19 17:39:50 +0530 | [diff] [blame] | 1092 | * Static attribute for regex for any string ending with service. |
| 1093 | */ |
| 1094 | public static final String REGEX_FOR_ANY_STRING_ENDING_WITH_SERVICE = ".+Service"; |
| 1095 | |
| 1096 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1097 | * Static attribute for class syntax. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 1098 | */ |
| 1099 | public static final String CLASS = "class"; |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 1100 | |
| 1101 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1102 | * Static attribute for builder syntax. |
| 1103 | */ |
| 1104 | public static final String BUILDER = "Builder"; |
| 1105 | |
| 1106 | /** |
VinodKumarS-Huawei | 6266db3 | 2016-05-10 17:58:57 +0530 | [diff] [blame] | 1107 | * Static attribute for manager syntax. |
| 1108 | */ |
| 1109 | public static final String MANAGER = "Manager"; |
| 1110 | |
| 1111 | /** |
| 1112 | * Static attribute for service syntax. |
| 1113 | */ |
| 1114 | public static final String SERVICE = "Service"; |
| 1115 | |
VinodKumarS-Huawei | 6266db3 | 2016-05-10 17:58:57 +0530 | [diff] [blame] | 1116 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1117 | * Static attribute for interface syntax. |
| 1118 | */ |
| 1119 | public static final String INTERFACE = "interface"; |
| 1120 | |
| 1121 | /** |
| 1122 | * Static attribute for enum syntax. |
| 1123 | */ |
| 1124 | public static final String ENUM = "enum"; |
| 1125 | |
| 1126 | /** |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 1127 | * Static attribute for type syntax. |
| 1128 | */ |
| 1129 | public static final String TYPE = "Type"; |
| 1130 | |
| 1131 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1132 | * Static attribute for static syntax. |
| 1133 | */ |
| 1134 | public static final String STATIC = "static"; |
| 1135 | |
| 1136 | /** |
| 1137 | * Static attribute for final syntax. |
| 1138 | */ |
| 1139 | public static final String FINAL = "final"; |
| 1140 | |
| 1141 | /** |
| 1142 | * Static attribute for package syntax. |
| 1143 | */ |
| 1144 | public static final String PACKAGE = "package"; |
| 1145 | |
| 1146 | /** |
| 1147 | * Static attribute for import syntax. |
| 1148 | */ |
| 1149 | public static final String IMPORT = "import "; |
| 1150 | |
| 1151 | /** |
| 1152 | * Static attribute for null syntax. |
| 1153 | */ |
| 1154 | public static final String NULL = "null"; |
| 1155 | |
| 1156 | /** |
| 1157 | * Static attribute for return syntax. |
| 1158 | */ |
| 1159 | public static final String RETURN = "return"; |
| 1160 | |
| 1161 | /** |
| 1162 | * Static attribute for java new syntax. |
| 1163 | */ |
| 1164 | public static final String NEW = "new"; |
| 1165 | |
| 1166 | /** |
| 1167 | * Static attribute for this syntax. |
| 1168 | */ |
| 1169 | public static final String THIS = "this"; |
| 1170 | |
| 1171 | /** |
| 1172 | * Static attribute for implements syntax. |
| 1173 | */ |
| 1174 | public static final String IMPLEMENTS = "implements"; |
| 1175 | |
| 1176 | /** |
| 1177 | * Static attribute for extends syntax. |
| 1178 | */ |
| 1179 | public static final String EXTEND = "extends"; |
| 1180 | |
| 1181 | /** |
Gaurav Agrawal | 02a60de | 2016-04-20 15:49:17 +0530 | [diff] [blame] | 1182 | * Static attribute for service interface suffix syntax. |
| 1183 | */ |
| 1184 | public static final String SERVICE_METHOD_STRING = "Service"; |
| 1185 | |
| 1186 | /** |
VinodKumarS-Huawei | 6266db3 | 2016-05-10 17:58:57 +0530 | [diff] [blame] | 1187 | * For event file generation. |
| 1188 | */ |
| 1189 | public static final String EVENT_STRING = "Event"; |
| 1190 | |
| 1191 | /** |
| 1192 | * For event listener file generation. |
| 1193 | */ |
| 1194 | public static final String EVENT_LISTENER_STRING = "Listener"; |
| 1195 | |
| 1196 | /** |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 1197 | * For event subject file generation. |
| 1198 | */ |
| 1199 | public static final String EVENT_SUBJECT_NAME_SUFFIX = "EventSubject"; |
| 1200 | |
| 1201 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1202 | * Static attribute for impl syntax. |
| 1203 | */ |
| 1204 | public static final String IMPL = "Impl"; |
| 1205 | |
| 1206 | /** |
| 1207 | * Static attribute for build method syntax. |
| 1208 | */ |
| 1209 | public static final String BUILD = "build"; |
| 1210 | |
| 1211 | /** |
| 1212 | * Static attribute for object. |
| 1213 | */ |
| 1214 | public static final String OBJECT = "Object"; |
| 1215 | |
| 1216 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 1217 | * Static attribute for app instance. |
| 1218 | */ |
| 1219 | public static final String APP_INSTANCE = "appInstance"; |
| 1220 | |
| 1221 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1222 | * Static attribute for override annotation. |
| 1223 | */ |
| 1224 | public static final String OVERRIDE = "@Override"; |
| 1225 | |
| 1226 | /** |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 1227 | * Static attribute for collections. |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 1228 | */ |
b.janani | e6d43af | 2016-03-04 12:29:05 +0530 | [diff] [blame] | 1229 | public static final String COLLECTION_IMPORTS = "java.util"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1230 | |
| 1231 | /** |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 1232 | * Static attribute for map. |
| 1233 | */ |
| 1234 | public static final String MAP = "Map"; |
| 1235 | |
| 1236 | /** |
| 1237 | * Static attribute for hash map. |
| 1238 | */ |
| 1239 | public static final String HASH_MAP = "HashMap"; |
| 1240 | |
| 1241 | |
| 1242 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1243 | * Static attribute for more object import package. |
| 1244 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 1245 | 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] | 1246 | |
| 1247 | /** |
| 1248 | * Static attribute for more object import class. |
| 1249 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 1250 | public static final String GOOGLE_MORE_OBJECT_IMPORT_CLASS = "MoreObjects;\n"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1251 | |
| 1252 | /** |
| 1253 | * Static attribute for to string method. |
| 1254 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 1255 | public static final String GOOGLE_MORE_OBJECT_METHOD_STRING = " MoreObjects.toStringHelper(getClass())"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1256 | |
| 1257 | /** |
| 1258 | * Static attribute for java utilities import package. |
| 1259 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 1260 | public static final String JAVA_UTIL_OBJECTS_IMPORT_PKG = "java.util"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1261 | |
| 1262 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 1263 | * Static attribute for bitset. |
| 1264 | */ |
| 1265 | public static final String BITSET = "BitSet"; |
| 1266 | |
| 1267 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1268 | * Static attribute for java utilities objects import class. |
| 1269 | */ |
Vinod Kumar S | 9f26ae5 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 1270 | public static final String JAVA_UTIL_OBJECTS_IMPORT_CLASS = "Objects;\n"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1271 | |
| 1272 | /** |
Mahesh Poojary Huawei | 41547ad | 2016-07-14 17:49:50 +0530 | [diff] [blame] | 1273 | * Static attribute for java utilities import base64 class. |
| 1274 | */ |
| 1275 | public static final String JAVA_UTIL_IMPORT_BASE64_CLASS = "Base64;\n"; |
| 1276 | |
| 1277 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1278 | * Static attribute for AugmentedInfo class import package. |
| 1279 | */ |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 1280 | public static final String YANG_AUGMENTED_INFO_CLASS_IMPORT_PKG = "org.onosproject.yangutils.datamodel"; |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1281 | |
| 1282 | /** |
| 1283 | * Static attribute for AugmentedInfo class import class. |
| 1284 | */ |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 1285 | public static final String YANG_AUGMENTED_INFO_CLASS_IMPORT_CLASS = "YangAugmentedInfo;\n"; |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1286 | |
| 1287 | /** |
| 1288 | * Static attribute for augmentation class. |
| 1289 | */ |
Bharat saraswal | 039f59c | 2016-07-14 21:57:13 +0530 | [diff] [blame] | 1290 | public static final String AUGMENTED_INFO = "AugmentedInfo"; |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1291 | |
| 1292 | /** |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1293 | * Static attribute for AugmentedInfo class. |
| 1294 | */ |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 1295 | public static final String YANG_AUGMENTED_INFO = "YangAugmentedInfo"; |
Bharat saraswal | e2bc60d | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 1296 | |
| 1297 | /** |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 1298 | * Static attribute for augmented. |
Bharat saraswal | 4aaab4d | 2016-05-17 14:19:38 +0530 | [diff] [blame] | 1299 | */ |
Bharat saraswal | af413b8 | 2016-07-14 15:18:20 +0530 | [diff] [blame] | 1300 | public static final String AUGMENTED = "Augmented"; |
VinodKumarS-Huawei | d81eccb | 2016-06-01 14:30:22 +0530 | [diff] [blame] | 1301 | |
Bharat saraswal | 4aaab4d | 2016-05-17 14:19:38 +0530 | [diff] [blame] | 1302 | /** |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1303 | * Static attribute for list. |
| 1304 | */ |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 1305 | public static final String LIST = "List"; |
Bharat saraswal | d532a4c | 2016-03-25 18:19:46 +0530 | [diff] [blame] | 1306 | |
| 1307 | /** |
Bharat saraswal | 250a747 | 2016-05-12 13:16:57 +0530 | [diff] [blame] | 1308 | * Comment to be added for autogenerated impl methods. |
VinodKumarS-Huawei | 6266db3 | 2016-05-10 17:58:57 +0530 | [diff] [blame] | 1309 | */ |
| 1310 | public static final String YANG_UTILS_TODO = "//TODO: YANG utils generated code"; |
| 1311 | |
| 1312 | /** |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 1313 | * Static attribute for activate annotation. |
| 1314 | */ |
| 1315 | public static final String ACTIVATE_ANNOTATION = "@Activate\n"; |
| 1316 | |
| 1317 | /** |
| 1318 | * Static attribute for activate. |
| 1319 | */ |
| 1320 | public static final String ACTIVATE = "activate"; |
| 1321 | |
| 1322 | /** |
| 1323 | * Static attribute for activate annotation import. |
| 1324 | */ |
| 1325 | public static final String ACTIVATE_ANNOTATION_IMPORT = "import org.apache.felix.scr.annotations.Activate;\n"; |
| 1326 | |
| 1327 | /** |
| 1328 | * Static attribute for deactivate annotation. |
| 1329 | */ |
| 1330 | public static final String DEACTIVATE_ANNOTATION = "@Deactivate\n"; |
| 1331 | |
| 1332 | /** |
| 1333 | * Static attribute for deactivate. |
| 1334 | */ |
| 1335 | public static final String DEACTIVATE = "deactivate"; |
| 1336 | |
| 1337 | /** |
| 1338 | * Static attribute for deactivate annotation import. |
| 1339 | */ |
| 1340 | public static final String DEACTIVATE_ANNOTATION_IMPORT = |
| 1341 | "import org.apache.felix.scr.annotations.Deactivate;\n"; |
| 1342 | |
| 1343 | /** |
| 1344 | * Static attribute for component annotation. |
| 1345 | */ |
| 1346 | public static final String COMPONENT_ANNOTATION = "@Component"; |
| 1347 | |
| 1348 | /** |
VinodKumarS-Huawei | d81eccb | 2016-06-01 14:30:22 +0530 | [diff] [blame] | 1349 | * Static attribute for component. |
| 1350 | */ |
| 1351 | public static final String COMPONENT = "Component"; |
| 1352 | |
| 1353 | /** |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 1354 | * Static attribute for immediate. |
| 1355 | */ |
| 1356 | public static final String IMMEDIATE = "immediate"; |
| 1357 | |
| 1358 | /** |
| 1359 | * Static attribute for component annotation import. |
| 1360 | */ |
| 1361 | public static final String COMPONENT_ANNOTATION_IMPORT = |
| 1362 | "import org.apache.felix.scr.annotations.Component;\n"; |
| 1363 | |
| 1364 | /** |
| 1365 | * Static attribute for service annotation. |
| 1366 | */ |
| 1367 | public static final String SERVICE_ANNOTATION = "@Service\n"; |
| 1368 | |
| 1369 | /** |
| 1370 | * Static attribute for service annotation import. |
| 1371 | */ |
| 1372 | public static final String SERVICE_ANNOTATION_IMPORT = |
| 1373 | "import org.apache.felix.scr.annotations.Service;\n"; |
| 1374 | |
| 1375 | /** |
| 1376 | * Static attribute for logger factory import. |
| 1377 | */ |
| 1378 | public static final String LOGGER_FACTORY_IMPORT = |
| 1379 | "import static org.slf4j.LoggerFactory.getLogger;\n"; |
| 1380 | |
| 1381 | /** |
| 1382 | * Static attribute for logger import. |
| 1383 | */ |
| 1384 | public static final String LOGGER_IMPORT = |
| 1385 | "import org.slf4j.Logger;\n"; |
| 1386 | |
| 1387 | /** |
| 1388 | * Static attribute for logger statement. |
| 1389 | */ |
| 1390 | public static final String LOGGER_STATEMENT = |
| 1391 | "\n private final Logger log = getLogger(getClass());\n"; |
| 1392 | |
| 1393 | /** |
| 1394 | * Static attribute for logger statement for started. |
| 1395 | */ |
| 1396 | public static final String STARTED_LOG_INFO = |
| 1397 | "log.info(\"Started\");\n"; |
| 1398 | |
| 1399 | /** |
| 1400 | * Static attribute for logger statement for stopped. |
| 1401 | */ |
| 1402 | public static final String STOPPED_LOG_INFO = |
| 1403 | "log.info(\"Stopped\");\n"; |
| 1404 | |
| 1405 | /** |
| 1406 | * Static attribute for AbstractEvent. |
| 1407 | */ |
| 1408 | public static final String ABSTRACT_EVENT = "AbstractEvent"; |
| 1409 | |
| 1410 | /** |
| 1411 | * Static attribute for EventListener. |
| 1412 | */ |
| 1413 | public static final String EVENT_LISTENER = "EventListener"; |
| 1414 | |
| 1415 | /** |
Shankara-Huawei | a1039e5 | 2016-07-14 16:53:09 +0530 | [diff] [blame] | 1416 | * Static attribute for or operator. |
| 1417 | */ |
| 1418 | public static final String OR_OPERATION = "||"; |
| 1419 | |
| 1420 | /** |
Vidyashree Rama | b624817 | 2016-05-17 16:16:15 +0530 | [diff] [blame] | 1421 | * Static attribute for YANG file error. |
| 1422 | */ |
| 1423 | public static final String YANG_FILE_ERROR = "YANG file error : "; |
| 1424 | |
| 1425 | /** |
| 1426 | * Static attribute for unsupported error information. |
| 1427 | */ |
| 1428 | public static final String UNSUPPORTED_YANG_CONSTRUCT = " is not supported."; |
| 1429 | |
| 1430 | /** |
| 1431 | * Static attribute for currently unsupported error information. |
| 1432 | */ |
| 1433 | public static final String CURRENTLY_UNSUPPORTED = " is not supported in current version, please check wiki" + |
| 1434 | " for YANG utils road map."; |
| 1435 | |
| 1436 | /** |
Vidyashree Rama | 5daea74 | 2016-05-20 16:29:25 +0530 | [diff] [blame] | 1437 | * Static attribute for typedef linker error information. |
| 1438 | */ |
| 1439 | public static final String TYPEDEF_LINKER_ERROR = "YANG file error: Unable to find base " |
| 1440 | + "typedef for given type"; |
| 1441 | |
| 1442 | /** |
| 1443 | * Static attribute for grouping linker error information. |
| 1444 | */ |
| 1445 | public static final String GROUPING_LINKER_ERROR = "YANG file error: Unable to find base " |
| 1446 | + "grouping for given uses"; |
| 1447 | |
| 1448 | /** |
janani b | 0e4e8ae | 2016-07-13 21:06:41 +0530 | [diff] [blame] | 1449 | * Static attribute for if-feature linker error information. |
Vidyashree Rama | 13b4c55 | 2016-06-20 15:12:43 +0530 | [diff] [blame] | 1450 | */ |
| 1451 | public static final String FEATURE_LINKER_ERROR = "YANG file error: Unable to find feature " |
| 1452 | + "for given if-feature"; |
| 1453 | |
| 1454 | /** |
janani b | 0e4e8ae | 2016-07-13 21:06:41 +0530 | [diff] [blame] | 1455 | * Static attribute for leafref linker error information. |
| 1456 | */ |
| 1457 | public static final String LEAFREF_LINKER_ERROR = "YANG file error: Unable to find base " |
| 1458 | + "leaf/leaf-list for given leafref"; |
| 1459 | |
| 1460 | /** |
Shankara-Huawei | 234cd09 | 2016-07-14 11:35:34 +0530 | [diff] [blame] | 1461 | * Static attribute for base linker error information. |
| 1462 | */ |
| 1463 | public static final String BASE_LINKER_ERROR = "YANG file error: Unable to find base " |
| 1464 | + "identity for given base"; |
| 1465 | |
| 1466 | /** |
| 1467 | * Static attribute for identityref linker error information. |
| 1468 | */ |
| 1469 | public static final String IDENTITYREF_LINKER_ERROR = "YANG file error: Unable to find base " |
| 1470 | + "identity for given base"; |
| 1471 | |
| 1472 | /** |
VinodKumarS-Huawei | d81eccb | 2016-06-01 14:30:22 +0530 | [diff] [blame] | 1473 | * Static attribute for reference. |
| 1474 | */ |
| 1475 | public static final String REFERENCE = "Reference"; |
| 1476 | |
| 1477 | /** |
| 1478 | * Static attribute for ReferenceCardinality. |
| 1479 | */ |
| 1480 | public static final String REFERENCE_CARDINALITY = "ReferenceCardinality"; |
| 1481 | |
| 1482 | /** |
Bharat saraswal | c2d3be1 | 2016-06-16 00:29:12 +0530 | [diff] [blame] | 1483 | * Static attribute for jar. |
| 1484 | */ |
| 1485 | public static final String JAR = "jar"; |
| 1486 | |
| 1487 | /** |
Bharat saraswal | 039f59c | 2016-07-14 21:57:13 +0530 | [diff] [blame] | 1488 | * Static attribute for for. |
| 1489 | */ |
| 1490 | public static final String FOR = "for"; |
| 1491 | |
| 1492 | /** |
| 1493 | * Static attribute for YangAugmentedOpParamInfo. |
| 1494 | */ |
| 1495 | public static final String YANG_AUGMENTED_OP_PARAM_INFO = "YangAugmentedOpParamInfo"; |
| 1496 | |
| 1497 | /** |
| 1498 | * Static attribute for YangAugmentedOpParamInfo. |
| 1499 | */ |
| 1500 | public static final String YANG_AUGMENTED_OP_PARAM_INFO_CLASS = "YangAugmentedOpParamInfo;\n"; |
| 1501 | |
| 1502 | /** |
| 1503 | * Static attribute for IllegalArgumentException. |
| 1504 | */ |
| 1505 | public static final String ILLEGAL_ARGUMENT_EXCEPTION = "IllegalArgumentException"; |
| 1506 | |
| 1507 | /** |
| 1508 | * Static attribute for IllegalArgumentException. |
| 1509 | */ |
| 1510 | public static final String ILLEGAL_ARGUMENT_EXCEPTION_MSG = "\"provided augmented info is invalid for content " + |
| 1511 | "match.\""; |
| 1512 | |
| 1513 | /** |
| 1514 | * Static attribute for throw. |
| 1515 | */ |
| 1516 | public static final String THROW = "throw"; |
| 1517 | |
| 1518 | /** |
| 1519 | * Static attribute for baseClass(). |
| 1520 | */ |
| 1521 | public static final String BASE_CLASS = "BaseClass()"; |
| 1522 | |
| 1523 | |
| 1524 | /** |
Vidyashree Rama | 1396065 | 2016-04-26 15:06:06 +0530 | [diff] [blame] | 1525 | * Creates an instance of util constants. |
| 1526 | */ |
| 1527 | private UtilConstants() { |
| 1528 | } |
Bharat saraswal | dedf9f8 | 2016-02-12 20:48:30 +0530 | [diff] [blame] | 1529 | } |