blob: 809323c4c9a84c22438556fb84b143de5f8a53b3 [file] [log] [blame]
Vinod Kumar Se4b9b0c2016-04-30 21:09:15 +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 */
16package org.onosproject.yangutils.translator.tojava.javamodel;
17
18import org.onosproject.yangutils.datamodel.YangType;
19import org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfoContainer;
Shankara-Huaweibdf24bb2016-08-02 18:13:13 +053020import org.onosproject.yangutils.datamodel.javadatamodel.YangToJavaNamingConflictUtil;
Vinod Kumar Se4b9b0c2016-04-30 21:09:15 +053021
Vinod Kumar Se4b9b0c2016-04-30 21:09:15 +053022/**
23 * Represent java based identification of the YANG leaves.
24 */
25public 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 Se4b9b0c2016-04-30 21:09:15 +053049 /**
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 saraswal33dfa012016-05-17 19:59:16 +053060
61 /**
62 * Returns java naming conflict resolver.
63 *
64 * @return java naming conflict resolver
65 */
66 YangToJavaNamingConflictUtil getConflictResolveConfig();
67
68 /**
69 * Sets java naming conflict resolver.
70 *
71 * @param conflictResolveConfig java naming conflict resolver
72 */
73 void setConflictResolveConfig(YangToJavaNamingConflictUtil conflictResolveConfig);
74
Vinod Kumar Se4b9b0c2016-04-30 21:09:15 +053075}