blob: 369b08a809f02fac0615aa13a472c9e04b591f92 [file] [log] [blame]
Bharat saraswal708abc02016-02-12 20:48:30 +05301/*
2 * Copyright 2016 Open Networking Laboratory
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
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/**
24 * Provides utility constants while generating java files.
25 */
26public final class UtilConstants {
27
28 /**
29 * Default constructor.
30 */
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 */
37 public static final String IMPL_CLASS_JAVA_DOC = " * Provides the implementation of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053038
39 /**
40 * JavaDocs for builder class.
41 */
Bharat saraswal708abc02016-02-12 20:48:30 +053042 public static final String BUILDER_CLASS_JAVA_DOC = " * Provides the builder implementation of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053043
44 /**
45 * JavaDocs for interface class.
46 */
Bharat saraswal708abc02016-02-12 20:48:30 +053047 public static final String INTERFACE_JAVA_DOC = " * Abstraction of an entity which provides functionalities of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053048
49 /**
50 * JavaDocs for builder interface class.
51 */
Bharat saraswal708abc02016-02-12 20:48:30 +053052 public static final String BUILDER_INTERFACE_JAVA_DOC = " * Builder for ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053053
54 /**
55 * JavaDocs for package info class.
56 */
Vinod Kumar S38046502016-03-23 15:30:27 +053057 public static final String PACKAGE_INFO_JAVADOC = " * Implementation of YANG file ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053058
59 /**
60 * JavaDocs's first line.
61 */
Bharat saraswal708abc02016-02-12 20:48:30 +053062 public static final String JAVA_DOC_FIRST_LINE = "/**\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +053063
64 /**
65 * JavaDocs's last line.
66 */
Bharat saraswal708abc02016-02-12 20:48:30 +053067 public static final String JAVA_DOC_END_LINE = " */\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +053068
69 /**
70 * JavaDocs's param annotation.
71 */
Bharat saraswal708abc02016-02-12 20:48:30 +053072 public static final String JAVA_DOC_PARAM = " * @param ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053073
74 /**
75 * JavaDocs's return annotation.
76 */
Bharat saraswal708abc02016-02-12 20:48:30 +053077 public static final String JAVA_DOC_RETURN = " * @return ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053078
79 /**
80 * JavaDocs's throw annotation.
81 */
Bharat saraswal708abc02016-02-12 20:48:30 +053082 public static final String JAVA_DOC_THROWS = " * @throws ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053083
84 /**
85 * JavaDocs's description for setter method.
86 */
Bharat saraswal708abc02016-02-12 20:48:30 +053087 public static final String JAVA_DOC_SETTERS = " * Returns the builder object of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053088
89 /**
90 * JavaDocs's description for OF method.
91 */
b.janani1fef2732016-03-04 12:29:05 +053092 public static final String JAVA_DOC_OF = " * Returns the object of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053093
94 /**
95 * JavaDocs's description for typedef' setter method.
96 */
b.janani1fef2732016-03-04 12:29:05 +053097 public static final String JAVA_DOC_SETTERS_COMMON = " * Sets the value of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +053098
99 /**
100 * JavaDocs's description for getter method.
101 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530102 public static final String JAVA_DOC_GETTERS = " * Returns the attribute ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530103
104 /**
105 * JavaDocs's description for default constructor.
106 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530107 public static final String JAVA_DOC_DEFAULT_CONSTRUCTOR = " * Default Constructor.\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530108
109 /**
110 * JavaDocs's description for constructor.
111 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530112 public static final String JAVA_DOC_CONSTRUCTOR = " * Construct the object of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530113
114 /**
115 * JavaDocs's description for build method.
116 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530117 public static final String JAVA_DOC_BUILD = " * Builds object of ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530118
119 /**
120 * JavaDocs's return statement for build method.
121 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530122 public static final String JAVA_DOC_BUILD_RETURN = "object of ";
123
124 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530125 * JavaDocs's statement for builder object.
126 */
127 public static final String BUILDER_OBJECT = "builder object of ";
128
129 /**
130 * Static attribute for new line.
Bharat saraswal708abc02016-02-12 20:48:30 +0530131 */
132 public static final String NEW_LINE = "\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530133
134 /**
135 * Static attribute for multiple new line.
136 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530137 public static final String MULTIPLE_NEW_LINE = "\n\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530138
139 /**
140 * Static attribute for empty line.
141 */
b.janani1fef2732016-03-04 12:29:05 +0530142 public static final String EMPTY_STRING = "";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530143
144 /**
145 * Static attribute for new line with asterisk.
146 */
147 public static final String NEW_LINE_ASTERISK = " *\n";
148
149 /**
150 * Static attribute for period.
151 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530152 public static final String PERIOD = ".";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530153
154 /**
155 * Static attribute for colan.
156 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530157 public static final String COLAN = ":";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530158
159 /**
160 * Static attribute for underscore.
161 */
b.janani1fef2732016-03-04 12:29:05 +0530162 public static final String UNDER_SCORE = "_";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530163
164 /**
165 * Static attribute for semi-colan.
166 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530167 public static final String SEMI_COLAN = ";";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530168
169 /**
170 * Static attribute for hyphen.
171 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530172 public static final String HYPHEN = "-";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530173
174 /**
175 * Static attribute for space.
176 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530177 public static final String SPACE = " ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530178
179 /**
180 * Static attribute for tab.
181 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530182 public static final String TAB = "\t";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530183
184 /**
185 * Static attribute for new line.
186 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530187 public static final String EQUAL = "=";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530188
189 /**
190 * Static attribute for slash syntax.
191 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530192 public static final String SLASH = File.separator;
Bharat saraswal2f11f652016-03-25 18:19:46 +0530193
194 /**
195 * Static attribute for add syntax.
196 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530197 public static final String ADD = "+";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530198
199 /**
200 * Static attribute for asterisk.
201 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530202 public static final String ASTERISK = "*";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530203
204 /**
205 * Static attribute for at.
206 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530207 public static final String AT = "@";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530208
209 /**
210 * Static attribute for quotes.
211 */
b.janani1fef2732016-03-04 12:29:05 +0530212 public static final String QUOTES = "\"";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530213
214 /**
215 * Static attribute for ampersand.
216 */
b.janani1fef2732016-03-04 12:29:05 +0530217 public static final String AND = "&";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530218
219 /**
220 * Static attribute for comma.
221 */
b.janani1fef2732016-03-04 12:29:05 +0530222 public static final String COMMA = ",";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530223
224 /**
225 * Static attribute for add syntax.
226 */
b.janani1fef2732016-03-04 12:29:05 +0530227 public static final String ADD_STRING = "add";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530228
229 /**
230 * Static attribute for check not null syntax.
231 */
b.janani1fef2732016-03-04 12:29:05 +0530232 public static final String CHECK_NOT_NULL_STRING = "checkNotNull";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530233
234 /**
235 * Static attribute for hash code syntax.
236 */
b.janani1fef2732016-03-04 12:29:05 +0530237 public static final String HASH_CODE_STRING = "hashCode";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530238
239 /**
240 * Static attribute for equals syntax.
241 */
b.janani1fef2732016-03-04 12:29:05 +0530242 public static final String EQUALS_STRING = "equals";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530243
244 /**
245 * Static attribute for object.
246 */
b.janani1fef2732016-03-04 12:29:05 +0530247 public static final String OBJECT_STRING = "Object";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530248
249 /**
250 * Static attribute for instance of syntax.
251 */
b.janani1fef2732016-03-04 12:29:05 +0530252 public static final String INSTANCE_OF = " instanceof ";
253
Bharat saraswal2f11f652016-03-25 18:19:46 +0530254 /**
255 * Static attribute for value syntax.
256 */
b.janani1fef2732016-03-04 12:29:05 +0530257 public static final String VALUE = "value";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530258
259 /**
260 * Static attribute for suffix s.
261 */
Bharat saraswale2d51d62016-03-23 19:40:35 +0530262 public static final String SUFFIX_S = "s";
b.janani1fef2732016-03-04 12:29:05 +0530263
Bharat saraswal2f11f652016-03-25 18:19:46 +0530264 /**
265 * Static attribute for if.
266 */
b.janani1fef2732016-03-04 12:29:05 +0530267 public static final String IF = "if";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530268
269 /**
270 * Static attribute for for.
271 */
b.janani1fef2732016-03-04 12:29:05 +0530272 public static final String FOR = "for";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530273
274 /**
275 * Static attribute for while.
276 */
b.janani1fef2732016-03-04 12:29:05 +0530277 public static final String WHILE = "while";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530278
279 /**
280 * Static attribute for of.
281 */
b.janani1fef2732016-03-04 12:29:05 +0530282 public static final String OF = "of";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530283
284 /**
285 * Static attribute for other.
286 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530287 public static final String OTHER = "other";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530288
289 /**
290 * Static attribute for obj syntax.
291 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530292 public static final String OBJ = "obj";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530293
294 /**
295 * Static attribute for hash syntax.
296 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530297 public static final String HASH = "hash";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530298
299 /**
300 * Static attribute for to syntax.
301 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530302 public static final String TO = "to";
b.janani1fef2732016-03-04 12:29:05 +0530303
Bharat saraswal2f11f652016-03-25 18:19:46 +0530304 /**
305 * Static attribute for true syntax.
306 */
b.janani1fef2732016-03-04 12:29:05 +0530307 public static final String TRUE = "true";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530308
309 /**
310 * Static attribute for false syntax.
311 */
b.janani1fef2732016-03-04 12:29:05 +0530312 public static final String FALSE = "false";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530313
314 /**
315 * Static attribute for org.
316 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530317 public static final String ORG = "org";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530318
319 /**
320 * Static attribute for temp.
321 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530322 public static final String TEMP = "temp";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530323
324 /**
325 * Static attribute for YANG file directory.
326 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530327 public static final String YANG_RESOURCES = "yang/resources";
Bharat saraswal708abc02016-02-12 20:48:30 +0530328
329 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530330 * Static attribute for diamond close bracket syntax.
Bharat saraswal708abc02016-02-12 20:48:30 +0530331 */
332 public static final String DIAMOND_OPEN_BRACKET = "<";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530333
334 /**
335 * Static attribute for diamond close bracket syntax.
336 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530337 public static final String DIAMOND_CLOSE_BRACKET = ">";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530338
339 /**
340 * Static attribute for square open bracket syntax.
341 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530342 public static final String SQUARE_OPEN_BRACKET = "[";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530343
344 /**
345 * Static attribute for square close bracket syntax.
346 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530347 public static final String SQUARE_CLOSE_BRACKET = "]";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530348
349 /**
350 * Static attribute for open parenthesis syntax.
351 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530352 public static final String OPEN_PARENTHESIS = "(";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530353
354 /**
355 * Static attribute for close parenthesis syntax.
356 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530357 public static final String CLOSE_PARENTHESIS = ")";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530358
359 /**
360 * Static attribute for open curly bracket syntax.
361 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530362 public static final String OPEN_CURLY_BRACKET = "{";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530363
364 /**
365 * Static attribute for close curly bracket syntax.
366 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530367 public static final String CLOSE_CURLY_BRACKET = "}";
368
369 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530370 * Static attribute for getter method prefix.
Bharat saraswal708abc02016-02-12 20:48:30 +0530371 */
372 public static final String GET_METHOD_PREFIX = "get";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530373
374 /**
375 * Static attribute for setter method prefix.
376 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530377 public static final String SET_METHOD_PREFIX = "set";
378
379 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530380 * Static attribute for four space indentation.
Bharat saraswal708abc02016-02-12 20:48:30 +0530381 */
382 public static final String FOUR_SPACE_INDENTATION = " ";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530383
384 /**
385 * Static attribute for eight space indentation.
386 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530387 public static final String EIGHT_SPACE_INDENTATION = FOUR_SPACE_INDENTATION + FOUR_SPACE_INDENTATION;
Bharat saraswal2f11f652016-03-25 18:19:46 +0530388
389 /**
390 * Static attribute for twelve space indentation.
391 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530392 public static final String TWELVE_SPACE_INDENTATION = FOUR_SPACE_INDENTATION + EIGHT_SPACE_INDENTATION;
Bharat saraswal2f11f652016-03-25 18:19:46 +0530393
394 /**
395 * Static attribute for sixteen space indentation.
396 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530397 public static final String SIXTEEN_SPACE_INDENTATION = EIGHT_SPACE_INDENTATION + EIGHT_SPACE_INDENTATION;
398
399 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530400 * Static attribute for generated code path.
Bharat saraswal708abc02016-02-12 20:48:30 +0530401 */
Bharat saraswal8f2a6c52016-03-09 18:34:56 +0530402 public static final String YANG_GEN_DIR = "src/main/java/";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530403
404 /**
405 * Static attribute for base package.
406 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530407 public static final String DEFAULT_BASE_PKG = "org.onosproject.yang.gen";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530408
409 /**
410 * Static attribute for YANG date prefix.
411 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530412 public static final String REVISION_PREFIX = "rev";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530413
414 /**
415 * Static attribute for YANG version perifx.
416 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530417 public static final String VERSION_PREFIX = "v";
418
419 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530420 * Static attribute for private modifier.
Bharat saraswal708abc02016-02-12 20:48:30 +0530421 */
422 public static final String PRIVATE = "private";
Bharat saraswal708abc02016-02-12 20:48:30 +0530423
424 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530425 * Static attribute for public modifier.
Bharat saraswal708abc02016-02-12 20:48:30 +0530426 */
Bharat saraswal2f11f652016-03-25 18:19:46 +0530427 public static final String PUBLIC = "public";
428
429 /**
430 * Static attribute for protected modifier.
431 */
432 public static final String PROTECTED = "protected";
433
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530434 /**
435 * Void java type.
436 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530437 public static final String VOID = "void";
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530438
439 /**
440 * String built in java type.
441 */
Bharat saraswale2d51d62016-03-23 19:40:35 +0530442 public static final String STRING_DATA_TYPE = "String";
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530443 /**
444 * java.lang.* packages.
445 */
446 public static final String JAVA_LANG = "java.lang";
447
448 /**
449 * boolean built in java type.
450 */
Bharat saraswale2d51d62016-03-23 19:40:35 +0530451 public static final String BOOLEAN_DATA_TYPE = "boolean";
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530452
453 /**
454 * byte java built in type.
455 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530456 public static final String BYTE = "byte";
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530457
458 /**
459 * short java built in type.
460 */
461 public static final String SHORT = "short";
462
463 /**
464 * int java built in type.
465 */
466 public static final String INT = "int";
467
468 /**
469 * long java built in type.
470 */
471 public static final String LONG = "long";
472
473 /**
474 * float java built in type.
475 */
476 public static final String FLOAT = "float";
477
478 /**
479 * double java built in type.
480 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530481 public static final String DOUBLE = "double";
482
483 /**
Vinod Kumar Sc4216002016-03-03 19:55:30 +0530484 * boolean built in java wrapper type.
485 */
486 public static final String BOOLEAN_WRAPPER = "Boolean";
487
488 /**
489 * byte java built in wrapper type.
490 */
491 public static final String BYTE_WRAPPER = "Byte";
492
493 /**
494 * short java built in wrapper type.
495 */
496 public static final String SHORT_WRAPPER = "Short";
497
498 /**
499 * Integer java built in wrapper type.
500 */
501 public static final String INTEGER_WRAPPER = "Integer";
502
503 /**
504 * long java built in wrapper type.
505 */
506 public static final String LONG_WRAPPER = "Long";
507
508 /**
509 * float java built in wrapper type.
510 */
511 public static final String FLOAT_WRAPPER = "Float";
512
513 /**
514 * double java built in wrapper type.
515 */
516 public static final String DOUBLE_WRAPPER = "Double";
517
518 /**
Bharat saraswale2d51d62016-03-23 19:40:35 +0530519 * 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 +0530520 */
Bharat saraswal2f11f652016-03-25 18:19:46 +0530521 public static final List<String> JAVA_KEY_WORDS = Arrays.asList(
522 "abstract", "assert", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue",
523 "default", "do", "double", "else", "extends", "false", "final", "finally", "float", "for", "goto", "if",
524 "implements", "import", "instanceof", "int", "interface", "long", "native", "new", "null", "package",
525 "private", "protected", "public", "return", "short", "static", "strictfp", "super", "switch",
526 "synchronized", "this", "throw", "throws", "transient", "true", "try", "void", "volatile", "while");
b.janani1fef2732016-03-04 12:29:05 +0530527
528 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530529 * Static attribute for regex for special char.
b.janani1fef2732016-03-04 12:29:05 +0530530 */
531 public static final String REGEX_WITH_SPECIAL_CHAR = "[ : / - @ $ # ' * + , ; = ]+";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530532
533 /**
534 * Static attribute for regex for digits.
535 */
b.janani1fef2732016-03-04 12:29:05 +0530536 public static final String REGEX_FOR_FIRST_DIGIT = "\\d.*";
537
538 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530539 * Static attribute for class syntax.
Bharat saraswal708abc02016-02-12 20:48:30 +0530540 */
541 public static final String CLASS = "class";
Bharat saraswal708abc02016-02-12 20:48:30 +0530542
543 /**
Bharat saraswal2f11f652016-03-25 18:19:46 +0530544 * Static attribute for builder syntax.
545 */
546 public static final String BUILDER = "Builder";
547
548 /**
549 * Static attribute for interface syntax.
550 */
551 public static final String INTERFACE = "interface";
552
553 /**
554 * Static attribute for enum syntax.
555 */
556 public static final String ENUM = "enum";
557
558 /**
559 * Static attribute for static syntax.
560 */
561 public static final String STATIC = "static";
562
563 /**
564 * Static attribute for final syntax.
565 */
566 public static final String FINAL = "final";
567
568 /**
569 * Static attribute for package syntax.
570 */
571 public static final String PACKAGE = "package";
572
573 /**
574 * Static attribute for import syntax.
575 */
576 public static final String IMPORT = "import ";
577
578 /**
579 * Static attribute for null syntax.
580 */
581 public static final String NULL = "null";
582
583 /**
584 * Static attribute for return syntax.
585 */
586 public static final String RETURN = "return";
587
588 /**
589 * Static attribute for java new syntax.
590 */
591 public static final String NEW = "new";
592
593 /**
594 * Static attribute for this syntax.
595 */
596 public static final String THIS = "this";
597
598 /**
599 * Static attribute for implements syntax.
600 */
601 public static final String IMPLEMENTS = "implements";
602
603 /**
604 * Static attribute for extends syntax.
605 */
606 public static final String EXTEND = "extends";
607
608 /**
609 * Static attribute for impl syntax.
610 */
611 public static final String IMPL = "Impl";
612
613 /**
614 * Static attribute for build method syntax.
615 */
616 public static final String BUILD = "build";
617
618 /**
619 * Static attribute for object.
620 */
621 public static final String OBJECT = "Object";
622
623 /**
624 * Static attribute for override annotation.
625 */
626 public static final String OVERRIDE = "@Override";
627
628 /**
629 * Static attribute for new line.
Bharat saraswal708abc02016-02-12 20:48:30 +0530630 */
b.janani1fef2732016-03-04 12:29:05 +0530631 public static final String COLLECTION_IMPORTS = "java.util";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530632
633 /**
634 * Static attribute for more object import package.
635 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530636 public static final String GOOGLE_MORE_OBJECT_IMPORT_PKG = "com.google.common.base";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530637
638 /**
639 * Static attribute for more object import class.
640 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530641 public static final String GOOGLE_MORE_OBJECT_IMPORT_CLASS = "MoreObjects;\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530642
643 /**
644 * Static attribute for to string method.
645 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530646 public static final String GOOGLE_MORE_OBJECT_METHOD_STRING = " MoreObjects.toStringHelper(getClass())";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530647
648 /**
649 * Static attribute for java utilities import package.
650 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530651 public static final String JAVA_UTIL_OBJECTS_IMPORT_PKG = "java.util";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530652
653 /**
654 * Static attribute for java utilities objects import class.
655 */
Vinod Kumar S38046502016-03-23 15:30:27 +0530656 public static final String JAVA_UTIL_OBJECTS_IMPORT_CLASS = "Objects;\n";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530657
658 /**
659 * Static attribute for abstract collection.
660 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530661 public static final String ABSTRACT_COLLECTION = "AbstractCollection";
662
Bharat saraswal2f11f652016-03-25 18:19:46 +0530663 /**
664 * Static attribute for list.
665 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530666 public static final String LIST = "List";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530667
668 /**
669 * Static attribute for linked list.
670 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530671 public static final String LINKED_LIST = "LinkedList";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530672
673 /**
674 * Static attribute for array list.
675 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530676 public static final String ARRAY_LIST = "ArrayList";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530677
678 /**
679 * Static attribute for abstract list.
680 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530681 public static final String ABSTRACT_LIST = "AbstractList";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530682
683 /**
684 * Static attribute for abstract sequential list.
685 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530686 public static final String ABSTRACT_SEQUENTAIL_LIST = "AbstractSequentialList";
687
Bharat saraswal2f11f652016-03-25 18:19:46 +0530688 /**
689 * Static attribute for set.
690 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530691 public static final String SET = "Set";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530692
693 /**
694 * Static attribute for hash set.
695 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530696 public static final String HASH_SET = "HashSet";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530697
698 /**
699 * Static attribute for abstract set.
700 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530701 public static final String ABSTRACT_SET = "AbstractSet";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530702
703 /**
704 * Static attribute for linked has set.
705 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530706 public static final String LINKED_HASH_SET = "LinkedHashSet";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530707
708 /**
709 * Static attribute for tree set.
710 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530711 public static final String TREE_SET = "TreeSet";
712
Bharat saraswal2f11f652016-03-25 18:19:46 +0530713 /**
714 * Static attribute for map.
715 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530716 public static final String MAP = "Map";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530717
718 /**
719 * Static attribute for abstract map.
720 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530721 public static final String ABSTRACT_MAP = "AbstractMap";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530722
723 /**
724 * Static attribute for hash map.
725 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530726 public static final String HASH_MAP = "HashMap";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530727
728 /**
729 * Static attribute for tree map.
730 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530731 public static final String TREE_MAP = "TreeMap";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530732
733 /**
734 * Static attribute for concurrent map.
735 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530736 public static final String CONCURRENT_MAP = "ConcurrentMap";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530737
738 /**
739 * Static attribute for eventually consistent map.
740 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530741 public static final String EVENTUALLY_CONSISTENT_MAP = "EventuallyConsitentMap";
Bharat saraswal2f11f652016-03-25 18:19:46 +0530742
743 /**
744 * Static attribute for stack syntax.
745 */
Bharat saraswal708abc02016-02-12 20:48:30 +0530746 public static final String STACK = "stack";
747}