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; |
| 19 | import org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfoContainer; |
| 20 | import org.onosproject.yangutils.translator.tojava.utils.YangToJavaNamingConflictUtil; |
| 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 | /** |
| 28 | * Retreives the data type of the leaf. |
| 29 | * |
| 30 | * @return data type of the leaf |
| 31 | */ |
| 32 | YangType<?> getDataType(); |
| 33 | |
| 34 | /** |
| 35 | * Retreives the name of the leaf. |
| 36 | * |
| 37 | * @return name of the leaf |
| 38 | */ |
| 39 | String getName(); |
| 40 | |
| 41 | /** |
| 42 | * Retreives the java name of the leaf. |
| 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(); |
| 60 | } |