Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.yangutils.translator.tojava; |
| 18 | |
| 19 | import org.onosproject.yangutils.datamodel.YangNode; |
| 20 | import org.onosproject.yangutils.datamodel.YangType; |
Bharat saraswal | 6ef0b76 | 2016-04-05 12:45:45 +0530 | [diff] [blame] | 21 | import org.onosproject.yangutils.translator.exception.TranslatorException; |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 22 | |
| 23 | import static org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfo.getIsQualifiedAccessOrAddToImportList; |
Gaurav Agrawal | 338735b | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 24 | import static org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfo.getQualifiedInfoOfFromString; |
| 25 | import static org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfo.getQualifiedTypeInfoOfAttribute; |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 26 | import static org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfo.getQualifiedTypeInfoOfCurNode; |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 27 | import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.getCamelCase; |
| 28 | |
| 29 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 30 | * Represents the attribute info corresponding to class/interface generated. |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 31 | */ |
| 32 | public final class JavaAttributeInfo { |
| 33 | |
| 34 | /** |
| 35 | * The data type info of attribute. |
| 36 | */ |
| 37 | private YangType<?> attrType; |
| 38 | |
| 39 | /** |
| 40 | * Name of the attribute. |
| 41 | */ |
| 42 | private String name; |
| 43 | |
| 44 | /** |
| 45 | * If the added attribute is a list of info. |
| 46 | */ |
| 47 | private boolean isListAttr = false; |
| 48 | |
| 49 | /** |
| 50 | * If the added attribute has to be accessed in a fully qualified manner. |
| 51 | */ |
| 52 | private boolean isQualifiedName = false; |
| 53 | |
| 54 | /** |
| 55 | * The class info will be used to set the attribute type and package info |
| 56 | * will be use for qualified name. |
| 57 | */ |
| 58 | private JavaQualifiedTypeInfo importInfo; |
| 59 | |
| 60 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 61 | * Creates a java attribute info object. |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 62 | */ |
| 63 | private JavaAttributeInfo() { |
| 64 | } |
| 65 | |
| 66 | /** |
Bharat saraswal | 6ef0b76 | 2016-04-05 12:45:45 +0530 | [diff] [blame] | 67 | * Creates object of java attribute info. |
Bharat saraswal | d6f1241 | 2016-03-28 15:50:13 +0530 | [diff] [blame] | 68 | * |
Gaurav Agrawal | 338735b | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 69 | * @param attrType YANG type |
| 70 | * @param name attribute name |
| 71 | * @param isListAttr is list attribute |
Bharat saraswal | d6f1241 | 2016-03-28 15:50:13 +0530 | [diff] [blame] | 72 | * @param isQualifiedName is qualified name |
| 73 | */ |
| 74 | public JavaAttributeInfo(YangType<?> attrType, String name, boolean isListAttr, boolean isQualifiedName) { |
| 75 | this.attrType = attrType; |
| 76 | this.name = name; |
| 77 | this.isListAttr = isListAttr; |
| 78 | this.isQualifiedName = isQualifiedName; |
| 79 | } |
| 80 | |
| 81 | /** |
Gaurav Agrawal | 338735b | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 82 | * Creates an attribute info object corresponding to the passed type's attribute |
| 83 | * information and return it. |
| 84 | * |
| 85 | * @param curNode current data model node for which the java file is being generated |
| 86 | * @param referredTypesAttrInfo attribute of referred type |
| 87 | * @return JavaAttributeInfo attribute details required to add in temporary files |
| 88 | */ |
| 89 | public static JavaAttributeInfo getFromStringAttributeInfo(YangNode curNode, |
| 90 | JavaAttributeInfo referredTypesAttrInfo) { |
| 91 | |
| 92 | JavaQualifiedTypeInfo qualifiedInfoOfFromString = getQualifiedInfoOfFromString(referredTypesAttrInfo); |
| 93 | /* |
| 94 | * Create a new java attribute info with qualified information of |
| 95 | * wrapper classes. |
| 96 | */ |
| 97 | return getAttributeInfoForTheData(qualifiedInfoOfFromString, referredTypesAttrInfo.getAttributeName(), |
| 98 | referredTypesAttrInfo.getAttributeType(), curNode, false); |
| 99 | } |
| 100 | |
| 101 | /** |
| 102 | * Creates an attribute info object corresponding to the passed type attribute |
| 103 | * information and return it. |
| 104 | * |
| 105 | * @param curNode current data model node for which the java file is being |
| 106 | * generated |
| 107 | * @param attributeType leaf data type |
| 108 | * @param attributeName leaf name |
| 109 | * @param isListAttribute is the current added attribute needs to be a list |
| 110 | * @return AttributeInfo attribute details required to add in temporary |
| 111 | * files |
| 112 | */ |
| 113 | public static JavaAttributeInfo getAttributeInfoOfType(YangNode curNode, |
| 114 | YangType<?> attributeType, String attributeName, |
| 115 | boolean isListAttribute) { |
| 116 | /* |
| 117 | * Get the import info corresponding to the attribute for import in |
| 118 | * generated java files or qualified access |
| 119 | */ |
| 120 | JavaQualifiedTypeInfo importInfo = getQualifiedTypeInfoOfAttribute(curNode, |
| 121 | attributeType, attributeName, isListAttribute); |
| 122 | |
| 123 | return getAttributeInfoForTheData(importInfo, attributeName, attributeType, curNode, isListAttribute); |
| 124 | } |
| 125 | |
| 126 | /** |
Bharat saraswal | d72411a | 2016-04-19 01:00:16 +0530 | [diff] [blame] | 127 | * Creates an attribute info object corresponding to the passed enumeration attribute |
| 128 | * information and return it. |
| 129 | * |
Gaurav Agrawal | 5652766 | 2016-04-20 15:49:17 +0530 | [diff] [blame^] | 130 | * @param curNode current data model node for which the java file is being |
| 131 | * generated |
Bharat saraswal | d72411a | 2016-04-19 01:00:16 +0530 | [diff] [blame] | 132 | * @param attributeName attribute name |
| 133 | * @return AttributeInfo attribute details required to add in temporary |
Gaurav Agrawal | 5652766 | 2016-04-20 15:49:17 +0530 | [diff] [blame^] | 134 | * files |
Bharat saraswal | d72411a | 2016-04-19 01:00:16 +0530 | [diff] [blame] | 135 | */ |
| 136 | public static JavaAttributeInfo getAttributeInfoOfEnumAttribute(YangNode curNode, String attributeName) { |
| 137 | |
| 138 | String curNodeName = ((HasJavaFileInfo) curNode).getJavaFileInfo().getJavaName(); |
| 139 | |
| 140 | /* |
| 141 | * Get the import info corresponding to the attribute for import in |
| 142 | * generated java files or qualified access |
| 143 | */ |
| 144 | JavaQualifiedTypeInfo qualifiedTypeInfo = getQualifiedTypeInfoOfCurNode(curNode, |
| 145 | curNodeName, false); |
| 146 | |
| 147 | return getAttributeInfoForTheData(qualifiedTypeInfo, attributeName, null, curNode, false); |
| 148 | } |
Gaurav Agrawal | 5652766 | 2016-04-20 15:49:17 +0530 | [diff] [blame^] | 149 | |
Bharat saraswal | d72411a | 2016-04-19 01:00:16 +0530 | [diff] [blame] | 150 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 151 | * Returns the data type info of attribute. |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 152 | * |
| 153 | * @return the data type info of attribute |
| 154 | */ |
| 155 | public YangType<?> getAttributeType() { |
| 156 | |
| 157 | if (attrType == null) { |
Bharat saraswal | 6ef0b76 | 2016-04-05 12:45:45 +0530 | [diff] [blame] | 158 | throw new TranslatorException("Expected java attribute type is null"); |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 159 | } |
| 160 | return attrType; |
| 161 | } |
| 162 | |
| 163 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 164 | * Sets the data type info of attribute. |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 165 | * |
| 166 | * @param type the data type info of attribute |
| 167 | */ |
| 168 | public void setAttributeType(YangType<?> type) { |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 169 | attrType = type; |
| 170 | } |
| 171 | |
| 172 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 173 | * Returns name of the attribute. |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 174 | * |
| 175 | * @return name of the attribute |
| 176 | */ |
| 177 | public String getAttributeName() { |
| 178 | |
| 179 | if (name == null) { |
Bharat saraswal | 6ef0b76 | 2016-04-05 12:45:45 +0530 | [diff] [blame] | 180 | throw new TranslatorException("Expected java attribute name is null"); |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 181 | } |
| 182 | return name; |
| 183 | } |
| 184 | |
| 185 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 186 | * Sets name of the attribute. |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 187 | * |
| 188 | * @param attrName name of the attribute |
| 189 | */ |
| 190 | public void setAttributeName(String attrName) { |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 191 | name = attrName; |
| 192 | } |
| 193 | |
| 194 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 195 | * Returns if the added attribute is a list of info. |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 196 | * |
| 197 | * @return the if the added attribute is a list of info |
| 198 | */ |
| 199 | public boolean isListAttr() { |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 200 | return isListAttr; |
| 201 | } |
| 202 | |
| 203 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 204 | * Sets if the added attribute is a list of info. |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 205 | * |
| 206 | * @param isList if the added attribute is a list of info |
| 207 | */ |
| 208 | public void setListAttr(boolean isList) { |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 209 | isListAttr = isList; |
| 210 | } |
| 211 | |
| 212 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 213 | * Returns if the added attribute has to be accessed in a fully qualified |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 214 | * manner. |
| 215 | * |
| 216 | * @return the if the added attribute has to be accessed in a fully |
Gaurav Agrawal | 338735b | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 217 | * qualified manner. |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 218 | */ |
| 219 | public boolean isQualifiedName() { |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 220 | return isQualifiedName; |
| 221 | } |
| 222 | |
| 223 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 224 | * Sets if the added attribute has to be accessed in a fully qualified |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 225 | * manner. |
| 226 | * |
| 227 | * @param isQualified if the added attribute has to be accessed in a fully |
Gaurav Agrawal | 338735b | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 228 | * qualified manner |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 229 | */ |
| 230 | public void setIsQualifiedAccess(boolean isQualified) { |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 231 | isQualifiedName = isQualified; |
| 232 | } |
| 233 | |
| 234 | /** |
Bharat saraswal | cc1cdab | 2016-04-16 02:28:25 +0530 | [diff] [blame] | 235 | * Returns the import info for the attribute type. It will be null, if the type |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 236 | * is basic built-in java type. |
| 237 | * |
| 238 | * @return import info |
| 239 | */ |
| 240 | public JavaQualifiedTypeInfo getImportInfo() { |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 241 | return importInfo; |
| 242 | } |
| 243 | |
| 244 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 245 | * Sets the import info for the attribute type. |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 246 | * |
| 247 | * @param importInfo import info for the attribute type |
| 248 | */ |
| 249 | public void setImportInfo(JavaQualifiedTypeInfo importInfo) { |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 250 | this.importInfo = importInfo; |
| 251 | } |
| 252 | |
| 253 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 254 | * Creates an attribute info object corresponding to the passed leaf |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 255 | * information and return it. |
| 256 | * |
Gaurav Agrawal | 338735b | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 257 | * @param curNode current data model node for which the java file is being |
| 258 | * generated |
| 259 | * @param attributeType leaf data type |
| 260 | * @param attributeName leaf name |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 261 | * @param isListAttribute is the current added attribute needs to be a list |
| 262 | * @return AttributeInfo attribute details required to add in temporary |
Gaurav Agrawal | 338735b | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 263 | * files |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 264 | */ |
| 265 | public static JavaAttributeInfo getAttributeInfoOfLeaf(YangNode curNode, |
Gaurav Agrawal | 338735b | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 266 | YangType<?> attributeType, String attributeName, |
| 267 | boolean isListAttribute) { |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 268 | |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 269 | /* |
| 270 | * Get the import info corresponding to the attribute for import in |
| 271 | * generated java files or qualified access |
| 272 | */ |
Gaurav Agrawal | 338735b | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 273 | JavaQualifiedTypeInfo importInfo = getQualifiedTypeInfoOfAttribute(curNode, |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 274 | attributeType, attributeName, isListAttribute); |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 275 | |
Bharat saraswal | 6ef0b76 | 2016-04-05 12:45:45 +0530 | [diff] [blame] | 276 | return getAttributeInfoForTheData(importInfo, attributeName, attributeType, curNode, isListAttribute); |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 277 | } |
| 278 | |
| 279 | /** |
Bharat saraswal | d9822e9 | 2016-04-05 15:13:44 +0530 | [diff] [blame] | 280 | * Creates an attribute info object corresponding to a data model node and |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 281 | * return it. |
| 282 | * |
Gaurav Agrawal | 338735b | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 283 | * @param curNode current data model node for which the java code generation |
| 284 | * is being handled |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 285 | * @param parentNode parent node in which the current node is an attribute |
| 286 | * @param isListNode is the current added attribute needs to be a list |
| 287 | * @return AttributeInfo attribute details required to add in temporary |
Gaurav Agrawal | 338735b | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 288 | * files |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 289 | */ |
| 290 | public static JavaAttributeInfo getCurNodeAsAttributeInParent( |
| 291 | YangNode curNode, YangNode parentNode, boolean isListNode) { |
| 292 | |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 293 | String curNodeName = ((HasJavaFileInfo) curNode).getJavaFileInfo().getJavaName(); |
| 294 | |
| 295 | /* |
| 296 | * Get the import info corresponding to the attribute for import in |
| 297 | * generated java files or qualified access |
| 298 | */ |
| 299 | JavaQualifiedTypeInfo qualifiedTypeInfo = getQualifiedTypeInfoOfCurNode(parentNode, |
| 300 | curNodeName, isListNode); |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 301 | |
Bharat saraswal | 6ef0b76 | 2016-04-05 12:45:45 +0530 | [diff] [blame] | 302 | return getAttributeInfoForTheData(qualifiedTypeInfo, curNodeName, null, parentNode, isListNode); |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 303 | } |
Bharat saraswal | e2d51d6 | 2016-03-23 19:40:35 +0530 | [diff] [blame] | 304 | |
| 305 | /** |
Gaurav Agrawal | 5652766 | 2016-04-20 15:49:17 +0530 | [diff] [blame^] | 306 | * Creates an attribute info object corresponding to a data model node and |
| 307 | * return it. |
| 308 | * |
| 309 | * @param parentNode parent node in which the current node is an attribute |
| 310 | * @param isListNode is the current added attribute needs to be a list |
| 311 | * @param curNodeName is the current added attribute needs to be a list |
| 312 | * @return AttributeInfo attribute details required to add in temporary |
| 313 | * files |
| 314 | */ |
| 315 | public static JavaAttributeInfo getCurNodeAsAttributeInParent(YangNode parentNode, boolean isListNode, |
| 316 | String curNodeName) { |
| 317 | |
| 318 | /* |
| 319 | * Get the import info corresponding to the attribute for import in |
| 320 | * generated java files or qualified access |
| 321 | */ |
| 322 | JavaQualifiedTypeInfo qualifiedTypeInfo = getQualifiedTypeInfoOfCurNode(parentNode, |
| 323 | curNodeName, isListNode); |
| 324 | |
| 325 | return getAttributeInfoForTheData(qualifiedTypeInfo, curNodeName, null, parentNode, isListNode); |
| 326 | } |
| 327 | |
| 328 | |
| 329 | /** |
Bharat saraswal | 6ef0b76 | 2016-04-05 12:45:45 +0530 | [diff] [blame] | 330 | * Returns java attribute info. |
| 331 | * |
Gaurav Agrawal | 338735b | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 332 | * @param importInfo java qualified type info |
| 333 | * @param attributeName attribute name |
| 334 | * @param attributeType attribute type |
| 335 | * @param curNode current YANG node |
Bharat saraswal | 6ef0b76 | 2016-04-05 12:45:45 +0530 | [diff] [blame] | 336 | * @param isListAttribute is list attribute |
| 337 | * @return java attribute info. |
| 338 | */ |
| 339 | private static JavaAttributeInfo getAttributeInfoForTheData(JavaQualifiedTypeInfo importInfo, String attributeName, |
Gaurav Agrawal | 338735b | 2016-04-18 18:53:11 +0530 | [diff] [blame] | 340 | YangType<?> attributeType, YangNode curNode, |
| 341 | boolean isListAttribute) { |
Bharat saraswal | 6ef0b76 | 2016-04-05 12:45:45 +0530 | [diff] [blame] | 342 | |
| 343 | JavaAttributeInfo newAttr = new JavaAttributeInfo(); |
Bharat saraswal | e2d51d6 | 2016-03-23 19:40:35 +0530 | [diff] [blame] | 344 | newAttr.setImportInfo(importInfo); |
Bharat saraswal | 6ef0b76 | 2016-04-05 12:45:45 +0530 | [diff] [blame] | 345 | newAttr.setIsQualifiedAccess(getIsQualifiedAccessOrAddToImportList(curNode, importInfo)); |
janani b | de4ffab | 2016-04-15 16:18:30 +0530 | [diff] [blame] | 346 | newAttr.setAttributeName(getCamelCase(attributeName, null)); |
Bharat saraswal | e2d51d6 | 2016-03-23 19:40:35 +0530 | [diff] [blame] | 347 | newAttr.setListAttr(isListAttribute); |
| 348 | newAttr.setImportInfo(importInfo); |
| 349 | newAttr.setAttributeType(attributeType); |
| 350 | |
| 351 | return newAttr; |
| 352 | } |
Vinod Kumar S | 3804650 | 2016-03-23 15:30:27 +0530 | [diff] [blame] | 353 | } |