blob: 21f2723dc64c13704d7490f40874cd7639103e94 [file] [log] [blame]
Bharat saraswal708abc02016-02-12 20:48:30 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Bharat saraswal708abc02016-02-12 20:48:30 +05303 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.yangutils.utils;
18
Vinod Kumar S38046502016-03-23 15:30:27 +053019import java.io.File;
b.janani1fef2732016-03-04 12:29:05 +053020import java.util.Arrays;
21import java.util.List;
22
Bharat saraswal708abc02016-02-12 20:48:30 +053023/**
Bharat saraswald9822e92016-04-05 15:13:44 +053024 * Represents utilities constants which are used while generating java files.
Bharat saraswal708abc02016-02-12 20:48:30 +053025 */
26public final class UtilConstants {
27
28 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +053029 * JavaDocs for impl class.
Bharat saraswal708abc02016-02-12 20:48:30 +053030 */
Gaurav Agrawal338735b2016-04-18 18:53:11 +053031 public static final String IMPL_CLASS_JAVA_DOC = " * Represents the implementation of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053032
33 /**
34 * JavaDocs for builder class.
35 */
Gaurav Agrawal338735b2016-04-18 18:53:11 +053036 public static final String BUILDER_CLASS_JAVA_DOC = " * Represents the builder implementation of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053037
38 /**
39 * JavaDocs for interface class.
40 */
Gaurav Agrawal338735b2016-04-18 18:53:11 +053041 public static final String INTERFACE_JAVA_DOC = " * Abstraction of an entity which represents the"
42 + " functionality of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053043
VinodKumarS-Huaweicb3a1f52016-05-10 17:58:57 +053044 /**
45 * JavaDocs for event.
46 */
47 public static final String EVENT_JAVA_DOC = " * Represents event implementation of ";
48
49 /**
Shankara-Huaweib9999eb2016-07-14 16:53:09 +053050 * JavaDocs for op param class.
51 */
52 public static final String OP_PARAM_JAVA_DOC = " * Represents operation parameter implementation of ";
53
54 /**
VinodKumarS-Huaweicb3a1f52016-05-10 17:58:57 +053055 * JavaDocs for event listener.
56 */
57 public static final String EVENT_LISTENER_JAVA_DOC = " * Abstraction for event listener of ";
58
Bharat saraswal2f11f652016-03-25 18:19:46 +053059 /**
60 * JavaDocs for builder interface class.
61 */
Bharat saraswal708abc02016-02-12 20:48:30 +053062 public static final String BUILDER_INTERFACE_JAVA_DOC = " * Builder for ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053063
64 /**
Bharat saraswald72411a2016-04-19 01:00:16 +053065 * 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 saraswal2f11f652016-03-25 18:19:46 +053075 * JavaDocs for package info class.
76 */
Bharat saraswald72411a2016-04-19 01:00:16 +053077 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 saraswal2f11f652016-03-25 18:19:46 +053083
84 /**
85 * JavaDocs's first line.
86 */
Bharat saraswal708abc02016-02-12 20:48:30 +053087 public static final String JAVA_DOC_FIRST_LINE = "/**\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +053088
89 /**
90 * JavaDocs's last line.
91 */
Bharat saraswal708abc02016-02-12 20:48:30 +053092 public static final String JAVA_DOC_END_LINE = " */\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +053093
94 /**
95 * JavaDocs's param annotation.
96 */
Bharat saraswal708abc02016-02-12 20:48:30 +053097 public static final String JAVA_DOC_PARAM = " * @param ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053098
99 /**
100 * JavaDocs's return annotation.
101 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530102 public static final String JAVA_DOC_RETURN = " * @return ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530103
104 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530105 * JavaDocs's description for setter method.
106 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530107 public static final String JAVA_DOC_SETTERS = " * Returns the builder object of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530108
109 /**
Bharat saraswal2d90b0c2016-08-04 02:00:03 +0530110 * 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-Huaweicb3a1f52016-05-10 17:58:57 +0530115 * JavaDocs's description for setter method.
116 */
117 public static final String JAVA_DOC_MANAGER_SETTERS = " * Sets the value to attribute ";
118
119 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530120 * JavaDocs's description for OF method.
121 */
b.janani1fef2732016-03-04 12:29:05 +0530122 public static final String JAVA_DOC_OF = " * Returns the object of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530123
124 /**
125 * JavaDocs's description for typedef' setter method.
126 */
b.janani1fef2732016-03-04 12:29:05 +0530127 public static final String JAVA_DOC_SETTERS_COMMON = " * Sets the value of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530128
129 /**
130 * JavaDocs's description for getter method.
131 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530132 public static final String JAVA_DOC_GETTERS = " * Returns the attribute ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530133
134 /**
Bharat saraswale707f032016-07-14 23:33:55 +0530135 * 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 saraswal2f11f652016-03-25 18:19:46 +0530145 * JavaDocs's description for constructor.
146 */
Bharat saraswal6ef0b762016-04-05 12:45:45 +0530147 public static final String JAVA_DOC_CONSTRUCTOR = " * Creates an instance of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530148
149 /**
150 * JavaDocs's description for build method.
151 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530152 public static final String JAVA_DOC_BUILD = " * Builds object of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530153
154 /**
155 * JavaDocs's return statement for build method.
156 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530157 public static final String JAVA_DOC_BUILD_RETURN = "object of ";
158
159 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530160 * JavaDocs's statement for builder object.
161 */
162 public static final String BUILDER_OBJECT = "builder object of ";
163
164 /**
Gaurav Agrawal56527662016-04-20 15:49:17 +0530165 * 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 saraswal2f11f652016-03-25 18:19:46 +0530180 * Static attribute for new line.
Bharat saraswal708abc02016-02-12 20:48:30 +0530181 */
182 public static final String NEW_LINE = "\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530183
184 /**
Bharat saraswalc0e04842016-05-12 13:16:57 +0530185 * Static attribute for default.
186 */
187 public static final String DEFAULT = "default";
188
189 /**
Shankara-Huaweib9999eb2016-07-14 16:53:09 +0530190 * Static attribute for op param class.
191 */
192 public static final String OPERATION = "OpParam";
193
194 /**
Shankara-Huaweib9999eb2016-07-14 16:53:09 +0530195 * Static attribute for java code generation for sbi.
196 */
197 public static final String SBI = "sbi";
198
199 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530200 * Static attribute for multiple new line.
201 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530202 public static final String MULTIPLE_NEW_LINE = "\n\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530203
204 /**
205 * Static attribute for empty line.
206 */
b.janani1fef2732016-03-04 12:29:05 +0530207 public static final String EMPTY_STRING = "";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530208
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 saraswal708abc02016-02-12 20:48:30 +0530217 public static final String PERIOD = ".";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530218
219 /**
Bharat saraswal2d90b0c2016-08-04 02:00:03 +0530220 * Static attribute for period.
221 */
222 public static final String INVOKE = "invoke";
223
224 /**
Gaurav Agrawal338735b2016-04-18 18:53:11 +0530225 * Static attribute for parse byte.
226 */
227 public static final String PARSE_BYTE = "parseByte";
228
229 /**
Bharat saraswal33dfa012016-05-17 19:59:16 +0530230 * Static attribute for parse boolean.
231 */
232 public static final String PARSE_BOOLEAN = "parseBoolean";
233
234 /**
Gaurav Agrawal338735b2016-04-18 18:53:11 +0530235 * 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 Huawei30c116a2016-07-14 17:49:50 +0530250 * 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 Agrawal338735b2016-04-18 18:53:11 +0530275 * Static attribute for omit null value.
276 */
277 public static final String OMIT_NULL_VALUE_STRING = "omitNullValues()";
278
279 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530280 * Static attribute for colan.
281 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530282 public static final String COLAN = ":";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530283
284 /**
285 * Static attribute for underscore.
286 */
b.janani1fef2732016-03-04 12:29:05 +0530287 public static final String UNDER_SCORE = "_";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530288
289 /**
290 * Static attribute for semi-colan.
291 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530292 public static final String SEMI_COLAN = ";";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530293
294 /**
295 * Static attribute for hyphen.
296 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530297 public static final String HYPHEN = "-";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530298
299 /**
300 * Static attribute for space.
301 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530302 public static final String SPACE = " ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530303
304 /**
Bharat saraswale707f032016-07-14 23:33:55 +0530305 * 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 saraswal33dfa012016-05-17 19:59:16 +0530407 * Static attribute for subject.
408 */
409 public static final String SUBJECT = "Subject";
410
411 /**
Bharat saraswalab4c6ba2016-05-17 14:19:38 +0530412 * 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 saraswal33dfa012016-05-17 19:59:16 +0530424 public static final String ONOS_EVENT_PKG = "org.onosproject.event";
Bharat saraswalab4c6ba2016-05-17 14:19:38 +0530425
426 /**
Vidyashree Rama1db15562016-05-17 16:16:15 +0530427 * 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 Agrawal338735b2016-04-18 18:53:11 +0530437 * Static attribute for input string.
Bharat saraswal2f11f652016-03-25 18:19:46 +0530438 */
Gaurav Agrawal338735b2016-04-18 18:53:11 +0530439 public static final String INPUT = "input";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530440
441 /**
janani be18b5342016-07-13 21:06:41 +0530442 * 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 b6240d292016-05-17 18:20:33 +0530452 * 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 Agrawal56527662016-04-20 15:49:17 +0530462 * Static attribute for output variable of rpc.
463 */
464 public static final String RPC_INPUT_VAR_NAME = "inputVar";
465
466 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530467 * Static attribute for new line.
468 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530469 public static final String EQUAL = "=";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530470
471 /**
472 * Static attribute for slash syntax.
473 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530474 public static final String SLASH = File.separator;
Bharat saraswal2f11f652016-03-25 18:19:46 +0530475
476 /**
477 * Static attribute for add syntax.
478 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530479 public static final String ADD = "+";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530480
481 /**
Mahesh Poojary Huawei30c116a2016-07-14 17:49:50 +0530482 * Static attribute for single quote.
483 */
484 public static final String SINGLE_QUOTE = "\'";
485
486 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530487 * Static attribute for quotes.
488 */
b.janani1fef2732016-03-04 12:29:05 +0530489 public static final String QUOTES = "\"";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530490
491 /**
Mahesh Poojary Huawei30c116a2016-07-14 17:49:50 +0530492 * Static attribute for zero.
493 */
494 public static final String ZERO = "0";
495
496 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530497 * Static attribute for ampersand.
498 */
b.janani1fef2732016-03-04 12:29:05 +0530499 public static final String AND = "&";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530500
501 /**
502 * Static attribute for comma.
503 */
b.janani1fef2732016-03-04 12:29:05 +0530504 public static final String COMMA = ",";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530505
506 /**
Bharat saraswalb551aae2016-07-14 15:18:20 +0530507 * 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 be18b5342016-07-13 21:06:41 +0530522 * 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 saraswal2f11f652016-03-25 18:19:46 +0530557 * Static attribute for add syntax.
558 */
b.janani1fef2732016-03-04 12:29:05 +0530559 public static final String ADD_STRING = "add";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530560
561 /**
Mahesh Poojary Huawei30c116a2016-07-14 17:49:50 +0530562 * 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 Agrawal338735b2016-04-18 18:53:11 +0530577 * Static attribute for from syntax.
578 */
579 public static final String FROM_STRING_METHOD_NAME = "fromString";
580
581 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530582 * Static attribute for check not null syntax.
583 */
b.janani1fef2732016-03-04 12:29:05 +0530584 public static final String CHECK_NOT_NULL_STRING = "checkNotNull";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530585
586 /**
587 * Static attribute for hash code syntax.
588 */
b.janani1fef2732016-03-04 12:29:05 +0530589 public static final String HASH_CODE_STRING = "hashCode";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530590
591 /**
592 * Static attribute for equals syntax.
593 */
b.janani1fef2732016-03-04 12:29:05 +0530594 public static final String EQUALS_STRING = "equals";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530595
596 /**
597 * Static attribute for object.
598 */
b.janani1fef2732016-03-04 12:29:05 +0530599 public static final String OBJECT_STRING = "Object";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530600
601 /**
602 * Static attribute for instance of syntax.
603 */
b.janani1fef2732016-03-04 12:29:05 +0530604 public static final String INSTANCE_OF = " instanceof ";
605
Bharat saraswal2f11f652016-03-25 18:19:46 +0530606 /**
607 * Static attribute for value syntax.
608 */
b.janani1fef2732016-03-04 12:29:05 +0530609 public static final String VALUE = "value";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530610
611 /**
612 * Static attribute for suffix s.
613 */
Bharat saraswale2d51d62016-03-23 19:40:35 +0530614 public static final String SUFFIX_S = "s";
b.janani1fef2732016-03-04 12:29:05 +0530615
Bharat saraswal2f11f652016-03-25 18:19:46 +0530616 /**
617 * Static attribute for if.
618 */
b.janani1fef2732016-03-04 12:29:05 +0530619 public static final String IF = "if";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530620
621 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530622 * Static attribute for of.
623 */
b.janani1fef2732016-03-04 12:29:05 +0530624 public static final String OF = "of";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530625
626 /**
627 * Static attribute for other.
628 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530629 public static final String OTHER = "other";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530630
631 /**
632 * Static attribute for obj syntax.
633 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530634 public static final String OBJ = "obj";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530635
636 /**
637 * Static attribute for hash syntax.
638 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530639 public static final String HASH = "hash";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530640
641 /**
642 * Static attribute for to syntax.
643 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530644 public static final String TO = "to";
b.janani1fef2732016-03-04 12:29:05 +0530645
Bharat saraswal2f11f652016-03-25 18:19:46 +0530646 /**
647 * Static attribute for true syntax.
648 */
b.janani1fef2732016-03-04 12:29:05 +0530649 public static final String TRUE = "true";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530650
651 /**
652 * Static attribute for false syntax.
653 */
b.janani1fef2732016-03-04 12:29:05 +0530654 public static final String FALSE = "false";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530655
656 /**
657 * Static attribute for org.
658 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530659 public static final String ORG = "org";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530660
661 /**
662 * Static attribute for temp.
663 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530664 public static final String TEMP = "temp";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530665
666 /**
667 * Static attribute for YANG file directory.
668 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530669 public static final String YANG_RESOURCES = "yang/resources";
Bharat saraswal708abc02016-02-12 20:48:30 +0530670
671 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530672 * Static attribute for diamond close bracket syntax.
Bharat saraswal708abc02016-02-12 20:48:30 +0530673 */
674 public static final String DIAMOND_OPEN_BRACKET = "<";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530675
676 /**
677 * Static attribute for diamond close bracket syntax.
678 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530679 public static final String DIAMOND_CLOSE_BRACKET = ">";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530680
681 /**
Gaurav Agrawal338735b2016-04-18 18:53:11 +0530682 * Static attribute for exception syntax.
Bharat saraswal2f11f652016-03-25 18:19:46 +0530683 */
Gaurav Agrawal338735b2016-04-18 18:53:11 +0530684 public static final String EXCEPTION = "Exception";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530685
686 /**
Gaurav Agrawal338735b2016-04-18 18:53:11 +0530687 * Static attribute for exception variable syntax.
Bharat saraswal2f11f652016-03-25 18:19:46 +0530688 */
Gaurav Agrawal338735b2016-04-18 18:53:11 +0530689 public static final String EXCEPTION_VAR = "e";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530690
691 /**
692 * Static attribute for open parenthesis syntax.
693 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530694 public static final String OPEN_PARENTHESIS = "(";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530695
696 /**
Bharat saraswalc0e04842016-05-12 13:16:57 +0530697 * Static attribute for switch syntax.
698 */
699 public static final String SWITCH = "switch";
700
701 /**
702 * Static attribute for case syntax.
703 */
704 public static final String CASE = "case";
705
706 /**
Gaurav Agrawal338735b2016-04-18 18:53:11 +0530707 * Static attribute for temp val syntax.
708 */
709 public static final String TMP_VAL = "tmpVal";
710
711 /**
Bharat saraswale707f032016-07-14 23:33:55 +0530712 * Static attribute for close curly bracket syntax.
713 */
714 public static final String ELSE = "else";
715
716 /**
Gaurav Agrawal338735b2016-04-18 18:53:11 +0530717 * From string parameter name.
718 */
719 public static final String FROM_STRING_PARAM_NAME = "valInString";
720
721 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530722 * Static attribute for close parenthesis syntax.
723 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530724 public static final String CLOSE_PARENTHESIS = ")";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530725
726 /**
727 * Static attribute for open curly bracket syntax.
728 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530729 public static final String OPEN_CURLY_BRACKET = "{";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530730
731 /**
732 * Static attribute for close curly bracket syntax.
733 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530734 public static final String CLOSE_CURLY_BRACKET = "}";
735
736 /**
Mahesh Poojary Huawei46fb4db2016-07-14 12:38:17 +0530737 * Static attribute for square brackets syntax.
738 */
739 public static final String SQUARE_BRACKETS = "[]";
740
741 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530742 * Static attribute for getter method prefix.
Bharat saraswal708abc02016-02-12 20:48:30 +0530743 */
744 public static final String GET_METHOD_PREFIX = "get";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530745
746 /**
Bharat saraswal2d90b0c2016-08-04 02:00:03 +0530747 * Static attribute for getter method prefix.
748 */
749 public static final String GET_METHOD = "getMethod";
750
751 /**
752 * Static attribute for getter method prefix.
753 */
754 public static final String GET_CLASS = "getClass()";
755
756 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530757 * Static attribute for setter method prefix.
758 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530759 public static final String SET_METHOD_PREFIX = "set";
760
761 /**
Shankara-Huaweib9999eb2016-07-14 16:53:09 +0530762 * Static attribute for get filter leaf flags.
763 */
Bharat saraswal2d90b0c2016-08-04 02:00:03 +0530764 public static final String GET_FILTER_LEAF = "get_valueLeafFlags";
Shankara-Huaweib9999eb2016-07-14 16:53:09 +0530765
766 /**
Bharat saraswal2d90b0c2016-08-04 02:00:03 +0530767 * Static attribute for getLeafIndex.
Shankara-Huaweib9999eb2016-07-14 16:53:09 +0530768 */
Bharat saraswal2d90b0c2016-08-04 02:00:03 +0530769 public static final String GET_LEAF_INDEX = "getLeafIndex()";
Shankara-Huaweib9999eb2016-07-14 16:53:09 +0530770
771 /**
Bharat saraswal2d90b0c2016-08-04 02:00:03 +0530772 * Static attribute for op param.
Shankara-Huaweib9999eb2016-07-14 16:53:09 +0530773 */
Bharat saraswal2d90b0c2016-08-04 02:00:03 +0530774 public static final String OP_PARAM = "OpParam";
Shankara-Huaweib9999eb2016-07-14 16:53:09 +0530775
Shankara-Huaweib9999eb2016-07-14 16:53:09 +0530776
777 /**
778 * Static attribute for is filter content match method prefix.
779 */
780 public static final String FILTER_CONTENT_MATCH = "isFilterContentMatch";
781
782 /**
Bharat saraswal2d90b0c2016-08-04 02:00:03 +0530783 * Static attribute for flag prefix.
784 */
785 public static final String FLAG = "flag";
786
787 /**
788 * Static attribute for break prefix.
789 */
790 public static final String BREAK = "break";
791
792 /**
793 * Static attribute for break prefix.
794 */
795 public static final String IS_EMPTY = "isEmpty()";
796
797 /**
798 * Static attribute for is isLeafValueSet method prefix.
799 */
800 public static final String VALUE_LEAF_SET = "isLeafValueSet";
801
802 /**
803 * Static attribute for is isSelectLeaf method prefix.
804 */
805 public static final String IS_SELECT_LEAF = "isSelectLeaf";
806
807 /**
808 * Static attribute for is selectLeaf method prefix.
809 */
810 public static final String SET_SELECT_LEAF = "selectLeaf";
811
812 /**
813 * Static attribute for is LeafIdentifier enum prefix.
814 */
815 public static final String LEAF_IDENTIFIER = "LeafIdentifier";
816
817 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530818 * Static attribute for four space indentation.
Bharat saraswal708abc02016-02-12 20:48:30 +0530819 */
820 public static final String FOUR_SPACE_INDENTATION = " ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530821
822 /**
Shankara-Huaweib9999eb2016-07-14 16:53:09 +0530823 * Static attribute for not syntax.
824 */
825 public static final String NOT = "!";
826
827 /**
Gaurav Agrawal338735b2016-04-18 18:53:11 +0530828 * Static attribute for try syntax.
829 */
830 public static final String TRY = "try";
831
832 /**
833 * Static attribute for catch syntax.
834 */
835 public static final String CATCH = "catch";
836
837 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530838 * Static attribute for eight space indentation.
839 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530840 public static final String EIGHT_SPACE_INDENTATION = FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswal2f11f652016-03-25 18:19:46 +0530841
842 /**
843 * Static attribute for twelve space indentation.
844 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530845 public static final String TWELVE_SPACE_INDENTATION = FOUR_SPACE_INDENTATION + EIGHT_SPACE_INDENTATION;
Bharat saraswal2f11f652016-03-25 18:19:46 +0530846
847 /**
848 * Static attribute for sixteen space indentation.
849 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530850 public static final String SIXTEEN_SPACE_INDENTATION = EIGHT_SPACE_INDENTATION + EIGHT_SPACE_INDENTATION;
851
852 /**
Bharat saraswal2d90b0c2016-08-04 02:00:03 +0530853 * Static attribute for twenty space indentation.
854 */
855 public static final String TWENTY_SPACE_INDENTATION = FOUR_SPACE_INDENTATION + SIXTEEN_SPACE_INDENTATION;
856
857 /**
858 * Static attribute for twenty four space indentation.
859 */
860 public static final String TWENTY_FOUR_SPACE_INDENTATION = EIGHT_SPACE_INDENTATION + SIXTEEN_SPACE_INDENTATION;
861
862 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530863 * Static attribute for generated code path.
Bharat saraswal708abc02016-02-12 20:48:30 +0530864 */
Bharat saraswal8f2a6c52016-03-09 18:34:56 +0530865 public static final String YANG_GEN_DIR = "src/main/java/";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530866
867 /**
868 * Static attribute for base package.
869 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530870 public static final String DEFAULT_BASE_PKG = "org.onosproject.yang.gen";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530871
872 /**
873 * Static attribute for YANG date prefix.
874 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530875 public static final String REVISION_PREFIX = "rev";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530876
877 /**
janani bde4ffab2016-04-15 16:18:30 +0530878 * Static attribute for YANG automatic prefix for identifiers with keywords and beginning with digits.
879 */
880 public static final String YANG_AUTO_PREFIX = "yangAutoPrefix";
881
882 /**
Bharat saraswal2d90b0c2016-08-04 02:00:03 +0530883 * Static attribute for YANG version prefix.
Bharat saraswal2f11f652016-03-25 18:19:46 +0530884 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530885 public static final String VERSION_PREFIX = "v";
886
887 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530888 * Static attribute for private modifier.
Bharat saraswal708abc02016-02-12 20:48:30 +0530889 */
890 public static final String PRIVATE = "private";
Bharat saraswal708abc02016-02-12 20:48:30 +0530891
892 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530893 * Static attribute for public modifier.
Bharat saraswal708abc02016-02-12 20:48:30 +0530894 */
Bharat saraswal2f11f652016-03-25 18:19:46 +0530895 public static final String PUBLIC = "public";
896
897 /**
Shankara-Huaweidf7b9ca2016-07-14 11:35:34 +0530898 * Static attribute for abstract modifier.
899 */
900 public static final String ABSTRACT = "abstract";
901
902 /**
Shankara-Huaweib9999eb2016-07-14 16:53:09 +0530903 * Static attribute for protected modifier.
904 */
905 public static final String PROTECTED = "protected";
906
907 /**
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530908 * Void java type.
909 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530910 public static final String VOID = "void";
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530911
912 /**
913 * String built in java type.
914 */
Bharat saraswale2d51d62016-03-23 19:40:35 +0530915 public static final String STRING_DATA_TYPE = "String";
Bharat saraswalcc1cdab2016-04-16 02:28:25 +0530916
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530917 /**
Bharat saraswalcc1cdab2016-04-16 02:28:25 +0530918 * Java.lang.* packages.
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530919 */
920 public static final String JAVA_LANG = "java.lang";
921
922 /**
Bharat saraswalcc1cdab2016-04-16 02:28:25 +0530923 * Java.math.* packages.
924 */
925 public static final String JAVA_MATH = "java.math";
926
927 /**
928 * Boolean built in java type.
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530929 */
Bharat saraswale2d51d62016-03-23 19:40:35 +0530930 public static final String BOOLEAN_DATA_TYPE = "boolean";
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530931
932 /**
Bharat saraswalcc1cdab2016-04-16 02:28:25 +0530933 * BigInteger built in java type.
934 */
935 public static final String BIG_INTEGER = "BigInteger";
936
937 /**
Mahesh Poojary Huawei46fb4db2016-07-14 12:38:17 +0530938 * BigDecimal built in java type.
939 */
940 public static final String BIG_DECIMAL = "BigDecimal";
941
942 /**
943 * BitSet built in java type.
944 */
945 public static final String BIT_SET = "BitSet";
946
947 /**
Bharat saraswalcc1cdab2016-04-16 02:28:25 +0530948 * Byte java built in type.
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530949 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530950 public static final String BYTE = "byte";
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530951
952 /**
Bharat saraswalcc1cdab2016-04-16 02:28:25 +0530953 * Short java built in type.
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530954 */
955 public static final String SHORT = "short";
956
957 /**
Bharat saraswalcc1cdab2016-04-16 02:28:25 +0530958 * Int java built in type.
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530959 */
960 public static final String INT = "int";
961
962 /**
Bharat saraswalcc1cdab2016-04-16 02:28:25 +0530963 * Long java built in type.
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530964 */
965 public static final String LONG = "long";
966
967 /**
Bharat saraswalcc1cdab2016-04-16 02:28:25 +0530968 * Double java built in type.
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530969 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530970 public static final String DOUBLE = "double";
971
972 /**
Bharat saraswalcc1cdab2016-04-16 02:28:25 +0530973 * Boolean built in java wrapper type.
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530974 */
975 public static final String BOOLEAN_WRAPPER = "Boolean";
976
977 /**
Bharat saraswalcc1cdab2016-04-16 02:28:25 +0530978 * Byte java built in wrapper type.
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530979 */
980 public static final String BYTE_WRAPPER = "Byte";
981
982 /**
Bharat saraswalcc1cdab2016-04-16 02:28:25 +0530983 * Short java built in wrapper type.
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530984 */
985 public static final String SHORT_WRAPPER = "Short";
986
987 /**
988 * Integer java built in wrapper type.
989 */
990 public static final String INTEGER_WRAPPER = "Integer";
991
992 /**
Bharat saraswalcc1cdab2016-04-16 02:28:25 +0530993 * Long java built in wrapper type.
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530994 */
995 public static final String LONG_WRAPPER = "Long";
996
997 /**
Bharat saraswal2d90b0c2016-08-04 02:00:03 +0530998 * Static variable for question mark.
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530999 */
Bharat saraswalb551aae2016-07-14 15:18:20 +05301000 public static final String QUESTION_MARK = "?";
Mahesh Poojary Huawei46fb4db2016-07-14 12:38:17 +05301001
1002 /**
Bharat saraswale2d51d62016-03-23 19:40:35 +05301003 * List of keywords in java, this is used for checking if the input does not contain these keywords.
b.janani1fef2732016-03-04 12:29:05 +05301004 */
Bharat saraswal2f11f652016-03-25 18:19:46 +05301005 public static final List<String> JAVA_KEY_WORDS = Arrays.asList(
Bharat saraswal2d90b0c2016-08-04 02:00:03 +05301006 "abstract", "assert", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue",
1007 "default", "do", "double", "else", "extends", "false", "final", "finally", "float", "for", "goto", "if",
1008 "implements", "import", "instanceof", "enum", "int", "interface", "long", "native", "new", "null",
1009 "package", "private", "protected", "public", "return", "short", "static", "strictfp", "super", "switch",
1010 "synchronized", "this", "throw", "throws", "transient", "true", "try", "void", "volatile", "while");
b.janani1fef2732016-03-04 12:29:05 +05301011
1012 /**
janani bde4ffab2016-04-15 16:18:30 +05301013 * Static attribute for regex for all the special characters.
b.janani1fef2732016-03-04 12:29:05 +05301014 */
janani bde4ffab2016-04-15 16:18:30 +05301015 public static final String REGEX_WITH_ALL_SPECIAL_CHAR = "\\p{Punct}+";
1016
1017 /**
1018 * Static attribute for regex for three special characters used in identifier.
1019 */
1020 public static final String REGEX_FOR_IDENTIFIER_SPECIAL_CHAR = "[. _ -]+";
1021
1022 /**
1023 * Static attribute for regex for period.
1024 */
1025 public static final String REGEX_FOR_PERIOD = "[.]";
1026
1027 /**
1028 * Static attribute for regex for underscore.
1029 */
1030 public static final String REGEX_FOR_UNDERSCORE = "[_]";
1031
1032 /**
1033 * Static attribute for regex for hyphen.
1034 */
1035 public static final String REGEX_FOR_HYPHEN = "[-]";
Bharat saraswal2f11f652016-03-25 18:19:46 +05301036
1037 /**
1038 * Static attribute for regex for digits.
1039 */
b.janani1fef2732016-03-04 12:29:05 +05301040 public static final String REGEX_FOR_FIRST_DIGIT = "\\d.*";
1041
1042 /**
janani b4a6711a2016-05-17 13:12:22 +05301043 * Static attribute for regex with digits.
1044 */
1045 public static final String REGEX_WITH_DIGITS = "(?=\\d+)";
1046
1047 /**
janani bde4ffab2016-04-15 16:18:30 +05301048 * Static attribute for regex for single letter.
1049 */
1050 public static final String REGEX_FOR_SINGLE_LETTER = "[a-zA-Z]";
1051
1052 /**
1053 * Static attribute for regex for digits with single letter.
1054 */
1055 public static final String REGEX_FOR_DIGITS_WITH_SINGLE_LETTER = "[0-9]+[a-zA-Z]";
1056
1057 /**
janani b4a6711a2016-05-17 13:12:22 +05301058 * Static attribute for regex with uppercase.
1059 */
1060 public static final String REGEX_WITH_UPPERCASE = "(?=\\p{Upper})";
1061
1062 /**
1063 * Static attribute for regex for single capital case letter.
1064 */
1065 public static final String REGEX_WITH_SINGLE_CAPITAL_CASE = "[A-Z]";
1066
1067 /**
1068 * Static attribute for regex for capital case letter with any number of digits and small case letters.
1069 */
1070 public static final String REGEX_WITH_SINGLE_CAPITAL_CASE_AND_DIGITS_SMALL_CASES = "[A-Z][0-9a-z]+";
1071
1072 /**
janani bdd1314f2016-05-19 17:39:50 +05301073 * Static attribute for regex for any string ending with service.
1074 */
1075 public static final String REGEX_FOR_ANY_STRING_ENDING_WITH_SERVICE = ".+Service";
1076
1077 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +05301078 * Static attribute for class syntax.
Bharat saraswal708abc02016-02-12 20:48:30 +05301079 */
1080 public static final String CLASS = "class";
Bharat saraswal708abc02016-02-12 20:48:30 +05301081
1082 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +05301083 * Static attribute for builder syntax.
1084 */
1085 public static final String BUILDER = "Builder";
1086
1087 /**
VinodKumarS-Huaweicb3a1f52016-05-10 17:58:57 +05301088 * Static attribute for manager syntax.
1089 */
1090 public static final String MANAGER = "Manager";
1091
1092 /**
1093 * Static attribute for service syntax.
1094 */
1095 public static final String SERVICE = "Service";
1096
VinodKumarS-Huaweicb3a1f52016-05-10 17:58:57 +05301097 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +05301098 * Static attribute for interface syntax.
1099 */
1100 public static final String INTERFACE = "interface";
1101
1102 /**
1103 * Static attribute for enum syntax.
1104 */
1105 public static final String ENUM = "enum";
1106
1107 /**
Bharat saraswal33dfa012016-05-17 19:59:16 +05301108 * Static attribute for type syntax.
1109 */
1110 public static final String TYPE = "Type";
1111
1112 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +05301113 * Static attribute for static syntax.
1114 */
1115 public static final String STATIC = "static";
1116
1117 /**
1118 * Static attribute for final syntax.
1119 */
1120 public static final String FINAL = "final";
1121
1122 /**
1123 * Static attribute for package syntax.
1124 */
1125 public static final String PACKAGE = "package";
1126
1127 /**
1128 * Static attribute for import syntax.
1129 */
1130 public static final String IMPORT = "import ";
1131
1132 /**
1133 * Static attribute for null syntax.
1134 */
1135 public static final String NULL = "null";
1136
1137 /**
1138 * Static attribute for return syntax.
1139 */
1140 public static final String RETURN = "return";
1141
1142 /**
1143 * Static attribute for java new syntax.
1144 */
1145 public static final String NEW = "new";
1146
1147 /**
1148 * Static attribute for this syntax.
1149 */
1150 public static final String THIS = "this";
1151
1152 /**
1153 * Static attribute for implements syntax.
1154 */
1155 public static final String IMPLEMENTS = "implements";
1156
1157 /**
1158 * Static attribute for extends syntax.
1159 */
1160 public static final String EXTEND = "extends";
1161
1162 /**
Gaurav Agrawal56527662016-04-20 15:49:17 +05301163 * Static attribute for service interface suffix syntax.
1164 */
1165 public static final String SERVICE_METHOD_STRING = "Service";
1166
1167 /**
VinodKumarS-Huaweicb3a1f52016-05-10 17:58:57 +05301168 * For event file generation.
1169 */
1170 public static final String EVENT_STRING = "Event";
1171
1172 /**
1173 * For event listener file generation.
1174 */
Bharat saraswal6a5911f2016-08-02 18:43:16 +05301175 public static final String EVENT_LISTENER_STRING = "EventListener";
VinodKumarS-Huaweicb3a1f52016-05-10 17:58:57 +05301176
1177 /**
Bharat saraswal33dfa012016-05-17 19:59:16 +05301178 * For event subject file generation.
1179 */
1180 public static final String EVENT_SUBJECT_NAME_SUFFIX = "EventSubject";
1181
1182 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +05301183 * Static attribute for build method syntax.
1184 */
1185 public static final String BUILD = "build";
1186
1187 /**
1188 * Static attribute for object.
1189 */
1190 public static final String OBJECT = "Object";
1191
1192 /**
Shankara-Huaweib9999eb2016-07-14 16:53:09 +05301193 * Static attribute for app instance.
1194 */
1195 public static final String APP_INSTANCE = "appInstance";
1196
1197 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +05301198 * Static attribute for override annotation.
1199 */
1200 public static final String OVERRIDE = "@Override";
1201
1202 /**
Bharat saraswalb551aae2016-07-14 15:18:20 +05301203 * Static attribute for collections.
Bharat saraswal708abc02016-02-12 20:48:30 +05301204 */
b.janani1fef2732016-03-04 12:29:05 +05301205 public static final String COLLECTION_IMPORTS = "java.util";
Bharat saraswal2f11f652016-03-25 18:19:46 +05301206
1207 /**
Bharat saraswalb551aae2016-07-14 15:18:20 +05301208 * Static attribute for map.
1209 */
1210 public static final String MAP = "Map";
1211
1212 /**
1213 * Static attribute for hash map.
1214 */
1215 public static final String HASH_MAP = "HashMap";
1216
1217
1218 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +05301219 * Static attribute for more object import package.
1220 */
Vinod Kumar S38046502016-03-23 15:30:27 +05301221 public static final String GOOGLE_MORE_OBJECT_IMPORT_PKG = "com.google.common.base";
Bharat saraswal2f11f652016-03-25 18:19:46 +05301222
1223 /**
1224 * Static attribute for more object import class.
1225 */
Vinod Kumar S38046502016-03-23 15:30:27 +05301226 public static final String GOOGLE_MORE_OBJECT_IMPORT_CLASS = "MoreObjects;\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +05301227
1228 /**
1229 * Static attribute for to string method.
1230 */
Vinod Kumar S38046502016-03-23 15:30:27 +05301231 public static final String GOOGLE_MORE_OBJECT_METHOD_STRING = " MoreObjects.toStringHelper(getClass())";
Bharat saraswal2f11f652016-03-25 18:19:46 +05301232
1233 /**
1234 * Static attribute for java utilities import package.
1235 */
Vinod Kumar S38046502016-03-23 15:30:27 +05301236 public static final String JAVA_UTIL_OBJECTS_IMPORT_PKG = "java.util";
Bharat saraswal2f11f652016-03-25 18:19:46 +05301237
1238 /**
Shankara-Huaweib9999eb2016-07-14 16:53:09 +05301239 * Static attribute for bitset.
1240 */
1241 public static final String BITSET = "BitSet";
1242
1243 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +05301244 * Static attribute for java utilities objects import class.
1245 */
Vinod Kumar S38046502016-03-23 15:30:27 +05301246 public static final String JAVA_UTIL_OBJECTS_IMPORT_CLASS = "Objects;\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +05301247
1248 /**
Mahesh Poojary Huawei30c116a2016-07-14 17:49:50 +05301249 * Static attribute for java utilities import base64 class.
1250 */
1251 public static final String JAVA_UTIL_IMPORT_BASE64_CLASS = "Base64;\n";
1252
1253 /**
Bharat saraswalcc1cdab2016-04-16 02:28:25 +05301254 * Static attribute for AugmentedInfo class.
1255 */
Bharat saraswalb551aae2016-07-14 15:18:20 +05301256 public static final String YANG_AUGMENTED_INFO = "YangAugmentedInfo";
Bharat saraswalcc1cdab2016-04-16 02:28:25 +05301257
1258 /**
Bharat saraswalb551aae2016-07-14 15:18:20 +05301259 * Static attribute for augmented.
Bharat saraswalab4c6ba2016-05-17 14:19:38 +05301260 */
Bharat saraswalb551aae2016-07-14 15:18:20 +05301261 public static final String AUGMENTED = "Augmented";
VinodKumarS-Huawei2ee9e7e2016-06-01 14:30:22 +05301262
Bharat saraswalab4c6ba2016-05-17 14:19:38 +05301263 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +05301264 * Static attribute for list.
1265 */
Bharat saraswal708abc02016-02-12 20:48:30 +05301266 public static final String LIST = "List";
Bharat saraswal2f11f652016-03-25 18:19:46 +05301267
1268 /**
Bharat saraswal2d90b0c2016-08-04 02:00:03 +05301269 * Comment to be added for auto generated impl methods.
VinodKumarS-Huaweicb3a1f52016-05-10 17:58:57 +05301270 */
1271 public static final String YANG_UTILS_TODO = "//TODO: YANG utils generated code";
1272
1273 /**
Bharat saraswal33dfa012016-05-17 19:59:16 +05301274 * Static attribute for AbstractEvent.
1275 */
1276 public static final String ABSTRACT_EVENT = "AbstractEvent";
1277
1278 /**
1279 * Static attribute for EventListener.
1280 */
1281 public static final String EVENT_LISTENER = "EventListener";
1282
1283 /**
Shankara-Huaweib9999eb2016-07-14 16:53:09 +05301284 * Static attribute for or operator.
1285 */
1286 public static final String OR_OPERATION = "||";
1287
1288 /**
Vidyashree Rama1db15562016-05-17 16:16:15 +05301289 * Static attribute for YANG file error.
1290 */
1291 public static final String YANG_FILE_ERROR = "YANG file error : ";
1292
1293 /**
1294 * Static attribute for unsupported error information.
1295 */
1296 public static final String UNSUPPORTED_YANG_CONSTRUCT = " is not supported.";
1297
1298 /**
1299 * Static attribute for currently unsupported error information.
1300 */
1301 public static final String CURRENTLY_UNSUPPORTED = " is not supported in current version, please check wiki" +
1302 " for YANG utils road map.";
1303
1304 /**
Vidyashree Rama210c01d2016-05-20 16:29:25 +05301305 * Static attribute for typedef linker error information.
1306 */
1307 public static final String TYPEDEF_LINKER_ERROR = "YANG file error: Unable to find base "
1308 + "typedef for given type";
1309
1310 /**
1311 * Static attribute for grouping linker error information.
1312 */
1313 public static final String GROUPING_LINKER_ERROR = "YANG file error: Unable to find base "
1314 + "grouping for given uses";
1315
1316 /**
janani be18b5342016-07-13 21:06:41 +05301317 * Static attribute for if-feature linker error information.
Vidyashree Ramadeac28b2016-06-20 15:12:43 +05301318 */
1319 public static final String FEATURE_LINKER_ERROR = "YANG file error: Unable to find feature "
1320 + "for given if-feature";
1321
1322 /**
janani be18b5342016-07-13 21:06:41 +05301323 * Static attribute for leafref linker error information.
1324 */
1325 public static final String LEAFREF_LINKER_ERROR = "YANG file error: Unable to find base "
1326 + "leaf/leaf-list for given leafref";
1327
1328 /**
Shankara-Huaweidf7b9ca2016-07-14 11:35:34 +05301329 * Static attribute for base linker error information.
1330 */
1331 public static final String BASE_LINKER_ERROR = "YANG file error: Unable to find base "
1332 + "identity for given base";
1333
1334 /**
1335 * Static attribute for identityref linker error information.
1336 */
1337 public static final String IDENTITYREF_LINKER_ERROR = "YANG file error: Unable to find base "
1338 + "identity for given base";
1339
1340 /**
Bharat saraswal96dfef02016-06-16 00:29:12 +05301341 * Static attribute for jar.
1342 */
1343 public static final String JAR = "jar";
1344
1345 /**
Bharat saraswald50c6382016-07-14 21:57:13 +05301346 * Static attribute for for.
1347 */
1348 public static final String FOR = "for";
1349
1350 /**
1351 * Static attribute for YangAugmentedOpParamInfo.
1352 */
1353 public static final String YANG_AUGMENTED_OP_PARAM_INFO = "YangAugmentedOpParamInfo";
1354
1355 /**
Bharat saraswal2d90b0c2016-08-04 02:00:03 +05301356 * Static attribute for NoSuchMethodException.
Bharat saraswald50c6382016-07-14 21:57:13 +05301357 */
Bharat saraswal2d90b0c2016-08-04 02:00:03 +05301358 public static final String NO_SUCH_METHOD_EXCEPTION = "NoSuchMethodException";
Bharat saraswald50c6382016-07-14 21:57:13 +05301359
1360 /**
Bharat saraswal2d90b0c2016-08-04 02:00:03 +05301361 * Static attribute for InvocationTargetException.
Bharat saraswald50c6382016-07-14 21:57:13 +05301362 */
Bharat saraswal2d90b0c2016-08-04 02:00:03 +05301363 public static final String INVOCATION_TARGET_EXCEPTION = "InvocationTargetException";
Bharat saraswald50c6382016-07-14 21:57:13 +05301364
1365 /**
Bharat saraswal2d90b0c2016-08-04 02:00:03 +05301366 * Static attribute for InvocationTargetException.
Bharat saraswald50c6382016-07-14 21:57:13 +05301367 */
Bharat saraswal2d90b0c2016-08-04 02:00:03 +05301368 public static final String INVOCATION_TARGET_EXCEPTION_IMPORT = "import" +
1369 " java.lang.reflect.InvocationTargetException;\n";
1370 /**
1371 * Static attribute for IllegalAccessException.
1372 */
1373 public static final String ILLEGAL_ACCESS_EXCEPTION = "IllegalAccessException";
Bharat saraswald50c6382016-07-14 21:57:13 +05301374
1375 /**
Bharat saraswal2d90b0c2016-08-04 02:00:03 +05301376 * Static attribute for arrayList.
Bharat saraswald50c6382016-07-14 21:57:13 +05301377 */
Bharat saraswal2d90b0c2016-08-04 02:00:03 +05301378 public static final String ARRAY_LIST = "ArrayList<>()";
Bharat saraswald50c6382016-07-14 21:57:13 +05301379
1380 /**
Bharat saraswal2d90b0c2016-08-04 02:00:03 +05301381 * Static attribute for arrayList import.
Bharat saraswald50c6382016-07-14 21:57:13 +05301382 */
Bharat saraswal2d90b0c2016-08-04 02:00:03 +05301383 public static final String ARRAY_LIST_IMPORT = IMPORT + COLLECTION_IMPORTS + ".ArrayList;\n";
Bharat saraswald50c6382016-07-14 21:57:13 +05301384
1385 /**
Vidyashree Rama7142d9c2016-04-26 15:06:06 +05301386 * Creates an instance of util constants.
1387 */
1388 private UtilConstants() {
1389 }
Bharat saraswal708abc02016-02-12 20:48:30 +05301390}