blob: 6a994c95890f6a30f5a57adee93587eb988cb7f0 [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 saraswald9822e92016-04-05 15:13:44 +053029 * Creates an instance of util constants.
Bharat saraswal708abc02016-02-12 20:48:30 +053030 */
31 private UtilConstants() {
32 }
33
34 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +053035 * JavaDocs for impl class.
Bharat saraswal708abc02016-02-12 20:48:30 +053036 */
Bharat saraswal6ef0b762016-04-05 12:45:45 +053037 public static final String IMPL_CLASS_JAVA_DOC = " * Reperesents the implementation of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053038
39 /**
40 * JavaDocs for builder class.
41 */
Bharat saraswal6ef0b762016-04-05 12:45:45 +053042 public static final String BUILDER_CLASS_JAVA_DOC = " * Reperesents the builder implementation of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053043
44 /**
45 * JavaDocs for interface class.
46 */
Bharat saraswal6ef0b762016-04-05 12:45:45 +053047 public static final String INTERFACE_JAVA_DOC = " * Abstraction of an entity which Reperesents the"
48 + " functionalities of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053049
50 /**
51 * JavaDocs for builder interface class.
52 */
Bharat saraswal708abc02016-02-12 20:48:30 +053053 public static final String BUILDER_INTERFACE_JAVA_DOC = " * Builder for ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053054
55 /**
56 * JavaDocs for package info class.
57 */
Vinod Kumar S38046502016-03-23 15:30:27 +053058 public static final String PACKAGE_INFO_JAVADOC = " * Implementation of YANG file ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053059
60 /**
61 * JavaDocs's first line.
62 */
Bharat saraswal708abc02016-02-12 20:48:30 +053063 public static final String JAVA_DOC_FIRST_LINE = "/**\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +053064
65 /**
66 * JavaDocs's last line.
67 */
Bharat saraswal708abc02016-02-12 20:48:30 +053068 public static final String JAVA_DOC_END_LINE = " */\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +053069
70 /**
71 * JavaDocs's param annotation.
72 */
Bharat saraswal708abc02016-02-12 20:48:30 +053073 public static final String JAVA_DOC_PARAM = " * @param ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053074
75 /**
76 * JavaDocs's return annotation.
77 */
Bharat saraswal708abc02016-02-12 20:48:30 +053078 public static final String JAVA_DOC_RETURN = " * @return ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053079
80 /**
81 * JavaDocs's throw annotation.
82 */
Bharat saraswal708abc02016-02-12 20:48:30 +053083 public static final String JAVA_DOC_THROWS = " * @throws ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053084
85 /**
86 * JavaDocs's description for setter method.
87 */
Bharat saraswal708abc02016-02-12 20:48:30 +053088 public static final String JAVA_DOC_SETTERS = " * Returns the builder object of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053089
90 /**
91 * JavaDocs's description for OF method.
92 */
b.janani1fef2732016-03-04 12:29:05 +053093 public static final String JAVA_DOC_OF = " * Returns the object of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053094
95 /**
96 * JavaDocs's description for typedef' setter method.
97 */
b.janani1fef2732016-03-04 12:29:05 +053098 public static final String JAVA_DOC_SETTERS_COMMON = " * Sets the value of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053099
100 /**
101 * JavaDocs's description for getter method.
102 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530103 public static final String JAVA_DOC_GETTERS = " * Returns the attribute ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530104
105 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530106 * JavaDocs's description for constructor.
107 */
Bharat saraswal6ef0b762016-04-05 12:45:45 +0530108 public static final String JAVA_DOC_CONSTRUCTOR = " * Creates an instance of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530109
110 /**
111 * JavaDocs's description for build method.
112 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530113 public static final String JAVA_DOC_BUILD = " * Builds object of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530114
115 /**
116 * JavaDocs's return statement for build method.
117 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530118 public static final String JAVA_DOC_BUILD_RETURN = "object of ";
119
120 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530121 * JavaDocs's statement for builder object.
122 */
123 public static final String BUILDER_OBJECT = "builder object of ";
124
125 /**
126 * Static attribute for new line.
Bharat saraswal708abc02016-02-12 20:48:30 +0530127 */
128 public static final String NEW_LINE = "\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530129
130 /**
131 * Static attribute for multiple new line.
132 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530133 public static final String MULTIPLE_NEW_LINE = "\n\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530134
135 /**
136 * Static attribute for empty line.
137 */
b.janani1fef2732016-03-04 12:29:05 +0530138 public static final String EMPTY_STRING = "";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530139
140 /**
141 * Static attribute for new line with asterisk.
142 */
143 public static final String NEW_LINE_ASTERISK = " *\n";
144
145 /**
146 * Static attribute for period.
147 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530148 public static final String PERIOD = ".";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530149
150 /**
151 * Static attribute for colan.
152 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530153 public static final String COLAN = ":";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530154
155 /**
156 * Static attribute for underscore.
157 */
b.janani1fef2732016-03-04 12:29:05 +0530158 public static final String UNDER_SCORE = "_";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530159
160 /**
161 * Static attribute for semi-colan.
162 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530163 public static final String SEMI_COLAN = ";";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530164
165 /**
166 * Static attribute for hyphen.
167 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530168 public static final String HYPHEN = "-";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530169
170 /**
171 * Static attribute for space.
172 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530173 public static final String SPACE = " ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530174
175 /**
176 * Static attribute for tab.
177 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530178 public static final String TAB = "\t";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530179
180 /**
181 * Static attribute for new line.
182 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530183 public static final String EQUAL = "=";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530184
185 /**
186 * Static attribute for slash syntax.
187 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530188 public static final String SLASH = File.separator;
Bharat saraswal2f11f652016-03-25 18:19:46 +0530189
190 /**
191 * Static attribute for add syntax.
192 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530193 public static final String ADD = "+";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530194
195 /**
196 * Static attribute for asterisk.
197 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530198 public static final String ASTERISK = "*";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530199
200 /**
201 * Static attribute for at.
202 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530203 public static final String AT = "@";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530204
205 /**
206 * Static attribute for quotes.
207 */
b.janani1fef2732016-03-04 12:29:05 +0530208 public static final String QUOTES = "\"";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530209
210 /**
211 * Static attribute for ampersand.
212 */
b.janani1fef2732016-03-04 12:29:05 +0530213 public static final String AND = "&";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530214
215 /**
216 * Static attribute for comma.
217 */
b.janani1fef2732016-03-04 12:29:05 +0530218 public static final String COMMA = ",";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530219
220 /**
221 * Static attribute for add syntax.
222 */
b.janani1fef2732016-03-04 12:29:05 +0530223 public static final String ADD_STRING = "add";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530224
225 /**
226 * Static attribute for check not null syntax.
227 */
b.janani1fef2732016-03-04 12:29:05 +0530228 public static final String CHECK_NOT_NULL_STRING = "checkNotNull";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530229
230 /**
231 * Static attribute for hash code syntax.
232 */
b.janani1fef2732016-03-04 12:29:05 +0530233 public static final String HASH_CODE_STRING = "hashCode";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530234
235 /**
236 * Static attribute for equals syntax.
237 */
b.janani1fef2732016-03-04 12:29:05 +0530238 public static final String EQUALS_STRING = "equals";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530239
240 /**
241 * Static attribute for object.
242 */
b.janani1fef2732016-03-04 12:29:05 +0530243 public static final String OBJECT_STRING = "Object";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530244
245 /**
246 * Static attribute for instance of syntax.
247 */
b.janani1fef2732016-03-04 12:29:05 +0530248 public static final String INSTANCE_OF = " instanceof ";
249
Bharat saraswal2f11f652016-03-25 18:19:46 +0530250 /**
251 * Static attribute for value syntax.
252 */
b.janani1fef2732016-03-04 12:29:05 +0530253 public static final String VALUE = "value";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530254
255 /**
256 * Static attribute for suffix s.
257 */
Bharat saraswale2d51d62016-03-23 19:40:35 +0530258 public static final String SUFFIX_S = "s";
b.janani1fef2732016-03-04 12:29:05 +0530259
Bharat saraswal2f11f652016-03-25 18:19:46 +0530260 /**
261 * Static attribute for if.
262 */
b.janani1fef2732016-03-04 12:29:05 +0530263 public static final String IF = "if";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530264
265 /**
266 * Static attribute for for.
267 */
b.janani1fef2732016-03-04 12:29:05 +0530268 public static final String FOR = "for";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530269
270 /**
271 * Static attribute for while.
272 */
b.janani1fef2732016-03-04 12:29:05 +0530273 public static final String WHILE = "while";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530274
275 /**
276 * Static attribute for of.
277 */
b.janani1fef2732016-03-04 12:29:05 +0530278 public static final String OF = "of";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530279
280 /**
281 * Static attribute for other.
282 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530283 public static final String OTHER = "other";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530284
285 /**
286 * Static attribute for obj syntax.
287 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530288 public static final String OBJ = "obj";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530289
290 /**
291 * Static attribute for hash syntax.
292 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530293 public static final String HASH = "hash";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530294
295 /**
296 * Static attribute for to syntax.
297 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530298 public static final String TO = "to";
b.janani1fef2732016-03-04 12:29:05 +0530299
Bharat saraswal2f11f652016-03-25 18:19:46 +0530300 /**
301 * Static attribute for true syntax.
302 */
b.janani1fef2732016-03-04 12:29:05 +0530303 public static final String TRUE = "true";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530304
305 /**
306 * Static attribute for false syntax.
307 */
b.janani1fef2732016-03-04 12:29:05 +0530308 public static final String FALSE = "false";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530309
310 /**
311 * Static attribute for org.
312 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530313 public static final String ORG = "org";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530314
315 /**
316 * Static attribute for temp.
317 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530318 public static final String TEMP = "temp";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530319
320 /**
321 * Static attribute for YANG file directory.
322 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530323 public static final String YANG_RESOURCES = "yang/resources";
Bharat saraswal708abc02016-02-12 20:48:30 +0530324
325 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530326 * Static attribute for diamond close bracket syntax.
Bharat saraswal708abc02016-02-12 20:48:30 +0530327 */
328 public static final String DIAMOND_OPEN_BRACKET = "<";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530329
330 /**
331 * Static attribute for diamond close bracket syntax.
332 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530333 public static final String DIAMOND_CLOSE_BRACKET = ">";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530334
335 /**
336 * Static attribute for square open bracket syntax.
337 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530338 public static final String SQUARE_OPEN_BRACKET = "[";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530339
340 /**
341 * Static attribute for square close bracket syntax.
342 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530343 public static final String SQUARE_CLOSE_BRACKET = "]";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530344
345 /**
346 * Static attribute for open parenthesis syntax.
347 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530348 public static final String OPEN_PARENTHESIS = "(";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530349
350 /**
351 * Static attribute for close parenthesis syntax.
352 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530353 public static final String CLOSE_PARENTHESIS = ")";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530354
355 /**
356 * Static attribute for open curly bracket syntax.
357 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530358 public static final String OPEN_CURLY_BRACKET = "{";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530359
360 /**
361 * Static attribute for close curly bracket syntax.
362 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530363 public static final String CLOSE_CURLY_BRACKET = "}";
364
365 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530366 * Static attribute for getter method prefix.
Bharat saraswal708abc02016-02-12 20:48:30 +0530367 */
368 public static final String GET_METHOD_PREFIX = "get";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530369
370 /**
371 * Static attribute for setter method prefix.
372 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530373 public static final String SET_METHOD_PREFIX = "set";
374
375 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530376 * Static attribute for four space indentation.
Bharat saraswal708abc02016-02-12 20:48:30 +0530377 */
378 public static final String FOUR_SPACE_INDENTATION = " ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530379
380 /**
381 * Static attribute for eight space indentation.
382 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530383 public static final String EIGHT_SPACE_INDENTATION = FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswal2f11f652016-03-25 18:19:46 +0530384
385 /**
386 * Static attribute for twelve space indentation.
387 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530388 public static final String TWELVE_SPACE_INDENTATION = FOUR_SPACE_INDENTATION + EIGHT_SPACE_INDENTATION;
Bharat saraswal2f11f652016-03-25 18:19:46 +0530389
390 /**
391 * Static attribute for sixteen space indentation.
392 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530393 public static final String SIXTEEN_SPACE_INDENTATION = EIGHT_SPACE_INDENTATION + EIGHT_SPACE_INDENTATION;
394
395 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530396 * Static attribute for generated code path.
Bharat saraswal708abc02016-02-12 20:48:30 +0530397 */
Bharat saraswal8f2a6c52016-03-09 18:34:56 +0530398 public static final String YANG_GEN_DIR = "src/main/java/";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530399
400 /**
401 * Static attribute for base package.
402 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530403 public static final String DEFAULT_BASE_PKG = "org.onosproject.yang.gen";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530404
405 /**
406 * Static attribute for YANG date prefix.
407 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530408 public static final String REVISION_PREFIX = "rev";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530409
410 /**
411 * Static attribute for YANG version perifx.
412 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530413 public static final String VERSION_PREFIX = "v";
414
415 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530416 * Static attribute for private modifier.
Bharat saraswal708abc02016-02-12 20:48:30 +0530417 */
418 public static final String PRIVATE = "private";
Bharat saraswal708abc02016-02-12 20:48:30 +0530419
420 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530421 * Static attribute for public modifier.
Bharat saraswal708abc02016-02-12 20:48:30 +0530422 */
Bharat saraswal2f11f652016-03-25 18:19:46 +0530423 public static final String PUBLIC = "public";
424
425 /**
426 * Static attribute for protected modifier.
427 */
428 public static final String PROTECTED = "protected";
429
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530430 /**
431 * Void java type.
432 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530433 public static final String VOID = "void";
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530434
435 /**
436 * String built in java type.
437 */
Bharat saraswale2d51d62016-03-23 19:40:35 +0530438 public static final String STRING_DATA_TYPE = "String";
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530439 /**
440 * java.lang.* packages.
441 */
442 public static final String JAVA_LANG = "java.lang";
443
444 /**
445 * boolean built in java type.
446 */
Bharat saraswale2d51d62016-03-23 19:40:35 +0530447 public static final String BOOLEAN_DATA_TYPE = "boolean";
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530448
449 /**
450 * byte java built in type.
451 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530452 public static final String BYTE = "byte";
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530453
454 /**
455 * short java built in type.
456 */
457 public static final String SHORT = "short";
458
459 /**
460 * int java built in type.
461 */
462 public static final String INT = "int";
463
464 /**
465 * long java built in type.
466 */
467 public static final String LONG = "long";
468
469 /**
470 * float java built in type.
471 */
472 public static final String FLOAT = "float";
473
474 /**
475 * double java built in type.
476 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530477 public static final String DOUBLE = "double";
478
479 /**
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530480 * boolean built in java wrapper type.
481 */
482 public static final String BOOLEAN_WRAPPER = "Boolean";
483
484 /**
485 * byte java built in wrapper type.
486 */
487 public static final String BYTE_WRAPPER = "Byte";
488
489 /**
490 * short java built in wrapper type.
491 */
492 public static final String SHORT_WRAPPER = "Short";
493
494 /**
495 * Integer java built in wrapper type.
496 */
497 public static final String INTEGER_WRAPPER = "Integer";
498
499 /**
500 * long java built in wrapper type.
501 */
502 public static final String LONG_WRAPPER = "Long";
503
504 /**
505 * float java built in wrapper type.
506 */
507 public static final String FLOAT_WRAPPER = "Float";
508
509 /**
510 * double java built in wrapper type.
511 */
512 public static final String DOUBLE_WRAPPER = "Double";
513
514 /**
Bharat saraswale2d51d62016-03-23 19:40:35 +0530515 * 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 +0530516 */
Bharat saraswal2f11f652016-03-25 18:19:46 +0530517 public static final List<String> JAVA_KEY_WORDS = Arrays.asList(
518 "abstract", "assert", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue",
519 "default", "do", "double", "else", "extends", "false", "final", "finally", "float", "for", "goto", "if",
520 "implements", "import", "instanceof", "int", "interface", "long", "native", "new", "null", "package",
521 "private", "protected", "public", "return", "short", "static", "strictfp", "super", "switch",
522 "synchronized", "this", "throw", "throws", "transient", "true", "try", "void", "volatile", "while");
b.janani1fef2732016-03-04 12:29:05 +0530523
524 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530525 * Static attribute for regex for special char.
b.janani1fef2732016-03-04 12:29:05 +0530526 */
527 public static final String REGEX_WITH_SPECIAL_CHAR = "[ : / - @ $ # ' * + , ; = ]+";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530528
529 /**
530 * Static attribute for regex for digits.
531 */
b.janani1fef2732016-03-04 12:29:05 +0530532 public static final String REGEX_FOR_FIRST_DIGIT = "\\d.*";
533
534 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530535 * Static attribute for class syntax.
Bharat saraswal708abc02016-02-12 20:48:30 +0530536 */
537 public static final String CLASS = "class";
Bharat saraswal708abc02016-02-12 20:48:30 +0530538
539 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530540 * Static attribute for builder syntax.
541 */
542 public static final String BUILDER = "Builder";
543
544 /**
545 * Static attribute for interface syntax.
546 */
547 public static final String INTERFACE = "interface";
548
549 /**
550 * Static attribute for enum syntax.
551 */
552 public static final String ENUM = "enum";
553
554 /**
555 * Static attribute for static syntax.
556 */
557 public static final String STATIC = "static";
558
559 /**
560 * Static attribute for final syntax.
561 */
562 public static final String FINAL = "final";
563
564 /**
565 * Static attribute for package syntax.
566 */
567 public static final String PACKAGE = "package";
568
569 /**
570 * Static attribute for import syntax.
571 */
572 public static final String IMPORT = "import ";
573
574 /**
575 * Static attribute for null syntax.
576 */
577 public static final String NULL = "null";
578
579 /**
580 * Static attribute for return syntax.
581 */
582 public static final String RETURN = "return";
583
584 /**
585 * Static attribute for java new syntax.
586 */
587 public static final String NEW = "new";
588
589 /**
590 * Static attribute for this syntax.
591 */
592 public static final String THIS = "this";
593
594 /**
595 * Static attribute for implements syntax.
596 */
597 public static final String IMPLEMENTS = "implements";
598
599 /**
600 * Static attribute for extends syntax.
601 */
602 public static final String EXTEND = "extends";
603
604 /**
605 * Static attribute for impl syntax.
606 */
607 public static final String IMPL = "Impl";
608
609 /**
610 * Static attribute for build method syntax.
611 */
612 public static final String BUILD = "build";
613
614 /**
615 * Static attribute for object.
616 */
617 public static final String OBJECT = "Object";
618
619 /**
620 * Static attribute for override annotation.
621 */
622 public static final String OVERRIDE = "@Override";
623
624 /**
625 * Static attribute for new line.
Bharat saraswal708abc02016-02-12 20:48:30 +0530626 */
b.janani1fef2732016-03-04 12:29:05 +0530627 public static final String COLLECTION_IMPORTS = "java.util";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530628
629 /**
630 * Static attribute for more object import package.
631 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530632 public static final String GOOGLE_MORE_OBJECT_IMPORT_PKG = "com.google.common.base";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530633
634 /**
635 * Static attribute for more object import class.
636 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530637 public static final String GOOGLE_MORE_OBJECT_IMPORT_CLASS = "MoreObjects;\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530638
639 /**
640 * Static attribute for to string method.
641 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530642 public static final String GOOGLE_MORE_OBJECT_METHOD_STRING = " MoreObjects.toStringHelper(getClass())";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530643
644 /**
645 * Static attribute for java utilities import package.
646 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530647 public static final String JAVA_UTIL_OBJECTS_IMPORT_PKG = "java.util";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530648
649 /**
650 * Static attribute for java utilities objects import class.
651 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530652 public static final String JAVA_UTIL_OBJECTS_IMPORT_CLASS = "Objects;\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530653
654 /**
655 * Static attribute for abstract collection.
656 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530657 public static final String ABSTRACT_COLLECTION = "AbstractCollection";
658
Bharat saraswal2f11f652016-03-25 18:19:46 +0530659 /**
660 * Static attribute for list.
661 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530662 public static final String LIST = "List";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530663
664 /**
665 * Static attribute for linked list.
666 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530667 public static final String LINKED_LIST = "LinkedList";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530668
669 /**
670 * Static attribute for array list.
671 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530672 public static final String ARRAY_LIST = "ArrayList";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530673
674 /**
675 * Static attribute for abstract list.
676 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530677 public static final String ABSTRACT_LIST = "AbstractList";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530678
679 /**
680 * Static attribute for abstract sequential list.
681 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530682 public static final String ABSTRACT_SEQUENTAIL_LIST = "AbstractSequentialList";
683
Bharat saraswal2f11f652016-03-25 18:19:46 +0530684 /**
685 * Static attribute for set.
686 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530687 public static final String SET = "Set";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530688
689 /**
690 * Static attribute for hash set.
691 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530692 public static final String HASH_SET = "HashSet";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530693
694 /**
695 * Static attribute for abstract set.
696 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530697 public static final String ABSTRACT_SET = "AbstractSet";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530698
699 /**
700 * Static attribute for linked has set.
701 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530702 public static final String LINKED_HASH_SET = "LinkedHashSet";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530703
704 /**
705 * Static attribute for tree set.
706 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530707 public static final String TREE_SET = "TreeSet";
708
Bharat saraswal2f11f652016-03-25 18:19:46 +0530709 /**
710 * Static attribute for map.
711 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530712 public static final String MAP = "Map";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530713
714 /**
715 * Static attribute for abstract map.
716 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530717 public static final String ABSTRACT_MAP = "AbstractMap";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530718
719 /**
720 * Static attribute for hash map.
721 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530722 public static final String HASH_MAP = "HashMap";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530723
724 /**
725 * Static attribute for tree map.
726 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530727 public static final String TREE_MAP = "TreeMap";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530728
729 /**
730 * Static attribute for concurrent map.
731 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530732 public static final String CONCURRENT_MAP = "ConcurrentMap";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530733
734 /**
735 * Static attribute for eventually consistent map.
736 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530737 public static final String EVENTUALLY_CONSISTENT_MAP = "EventuallyConsitentMap";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530738
739 /**
740 * Static attribute for stack syntax.
741 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530742 public static final String STACK = "stack";
743}