blob: 4f701b6c977b78173631ebca5dc8090f6a109721 [file] [log] [blame]
janani bde4ffab2016-04-15 16:18:30 +05301/*
2 * Copyright 2016-present 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.translator.tojava.utils;
18
19/**
20 * Representation of YANG to java naming conflict resolver util.
21 */
22public final class YangToJavaNamingConflictUtil {
23
24 /**
25 * Contains the replacement value for a period.
26 */
27 private static String replacementForPeriodInIdentifier;
28
29 /**
30 * Contains the replacement value for an underscore.
31 */
32 private static String replacementForUnderscoreInIdentifier;
33
34 /**
35 * Contains the replacement value for a hyphen.
36 */
37 private static String replacementForHyphenInIdentifier;
38
39 /**
janani bdd1314f2016-05-19 17:39:50 +053040 * Contains the prefix value for adding with the identifier.
41 */
42 private static String prefixForIdentifier;
43
44 /**
janani bde4ffab2016-04-15 16:18:30 +053045 * Creates an object for YANG to java naming conflict util.
46 */
47 public YangToJavaNamingConflictUtil() {
48 }
49
50 /**
51 * Sets the replacement value for a period.
52 *
53 * @param periodReplacement replacement value for period
54 */
55 public void setReplacementForPeriod(String periodReplacement) {
56 replacementForPeriodInIdentifier = periodReplacement;
57 }
58
59 /**
60 * Returns the replaced period value.
61 *
62 * @return replaced period
63 */
64 public String getReplacementForPeriod() {
65 return replacementForPeriodInIdentifier;
66 }
67
68 /**
69 * Sets the replacement value for a hyphen.
70 *
71 * @param hyphenReplacement replacement value for hyphen
72 */
73 public void setReplacementForHyphen(String hyphenReplacement) {
74 replacementForHyphenInIdentifier = hyphenReplacement;
75 }
76
77 /**
78 * Returns the replaced hyphen value.
79 *
80 * @return replaced hyphen
81 */
82 public String getReplacementForHyphen() {
83 return replacementForHyphenInIdentifier;
84 }
85
86 /**
87 * Sets the replacement value for an underscore.
88 *
89 * @param underscoreReplacement replacement value for underscore
90 */
91 public void setReplacementForUnderscore(String underscoreReplacement) {
92 replacementForUnderscoreInIdentifier = underscoreReplacement;
93 }
94
95 /**
96 * Returns the replaced underscore value.
97 *
98 * @return replaced underscore
99 */
100 public String getReplacementForUnderscore() {
101 return replacementForUnderscoreInIdentifier;
102 }
janani bdd1314f2016-05-19 17:39:50 +0530103
104 /**
105 * Sets the prefix value for adding with the identifier.
106 *
107 * @param prefix prefix for identifier
108 */
109 public void setPrefixForIdentifier(String prefix) {
110 prefixForIdentifier = prefix;
111 }
112
113 /**
114 * Returns the prefix for identifier.
115 *
116 * @return prefix for identifier
117 */
118 public String getPrefixForIdentifier() {
119 return prefixForIdentifier;
120 }
janani bde4ffab2016-04-15 16:18:30 +0530121}