Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 1 | /* |
| 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 | package org.onosproject.yangutils.translator.tojava.javamodel; |
| 17 | |
| 18 | import org.onosproject.yangutils.datamodel.YangType; |
Bharat saraswal | e50edca | 2016-08-05 01:58:25 +0530 | [diff] [blame] | 19 | import org.onosproject.yangutils.utils.io.YangToJavaNamingConflictUtil; |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 20 | import org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfoContainer; |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 21 | |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 22 | /** |
| 23 | * Represent java based identification of the YANG leaves. |
| 24 | */ |
| 25 | public interface JavaLeafInfoContainer |
| 26 | extends JavaQualifiedTypeInfoContainer { |
| 27 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 28 | * Retrieves the data type of the leaf. |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 29 | * |
| 30 | * @return data type of the leaf |
| 31 | */ |
| 32 | YangType<?> getDataType(); |
| 33 | |
| 34 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 35 | * Retrieves the name of the leaf. |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 36 | * |
| 37 | * @return name of the leaf |
| 38 | */ |
| 39 | String getName(); |
| 40 | |
| 41 | /** |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 42 | * Retrieves the java name of the leaf. |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 43 | * |
| 44 | * @param conflictResolveConfig user config to resolve conflicts |
| 45 | * @return name of the leaf |
| 46 | */ |
| 47 | String getJavaName(YangToJavaNamingConflictUtil conflictResolveConfig); |
| 48 | |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 49 | /** |
| 50 | * Identifies if object is a leaf-list. |
| 51 | * |
| 52 | * @return true if leaf-list false otherwise |
| 53 | */ |
| 54 | boolean isLeafList(); |
| 55 | |
| 56 | /** |
| 57 | * updates the qualified info. |
| 58 | */ |
| 59 | void updateJavaQualifiedInfo(); |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 60 | |
| 61 | /** |
| 62 | * Returns java naming conflict resolver. |
| 63 | * |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 64 | * @return java naming conflict resolver |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 65 | */ |
| 66 | YangToJavaNamingConflictUtil getConflictResolveConfig(); |
| 67 | |
| 68 | /** |
| 69 | * Sets java naming conflict resolver. |
| 70 | * |
Bharat saraswal | 8beac34 | 2016-08-04 02:00:03 +0530 | [diff] [blame] | 71 | * @param conflictResolveConfig java naming conflict resolver |
Bharat saraswal | 715d3fc | 2016-05-17 19:59:16 +0530 | [diff] [blame] | 72 | */ |
| 73 | void setConflictResolveConfig(YangToJavaNamingConflictUtil conflictResolveConfig); |
| 74 | |
Vinod Kumar S | 79a374b | 2016-04-30 21:09:15 +0530 | [diff] [blame] | 75 | } |