blob: c1c6e6041b237f539d3fd40555659ba7a0300215 [file] [log] [blame]
Vinod Kumar S79a374b2016-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
Bharat saraswale3175d32016-08-31 17:50:11 +053018import org.onosproject.yangutils.datamodel.LocationInfo;
Vinod Kumar S79a374b2016-04-30 21:09:15 +053019import org.onosproject.yangutils.datamodel.YangType;
Bharat saraswal2da23bf2016-08-25 15:28:39 +053020import org.onosproject.yangutils.datamodel.javadatamodel.JavaQualifiedTypeInfoContainer;
Bharat saraswale3175d32016-08-31 17:50:11 +053021import org.onosproject.yangutils.utils.io.YangToJavaNamingConflictUtil;
Vinod Kumar S79a374b2016-04-30 21:09:15 +053022
Vinod Kumar S79a374b2016-04-30 21:09:15 +053023/**
24 * Represent java based identification of the YANG leaves.
25 */
26public interface JavaLeafInfoContainer
Bharat saraswale3175d32016-08-31 17:50:11 +053027 extends JavaQualifiedTypeInfoContainer, LocationInfo {
Vinod Kumar S79a374b2016-04-30 21:09:15 +053028 /**
Bharat saraswal8beac342016-08-04 02:00:03 +053029 * Retrieves the data type of the leaf.
Vinod Kumar S79a374b2016-04-30 21:09:15 +053030 *
31 * @return data type of the leaf
32 */
33 YangType<?> getDataType();
34
35 /**
Bharat saraswal8beac342016-08-04 02:00:03 +053036 * Retrieves the name of the leaf.
Vinod Kumar S79a374b2016-04-30 21:09:15 +053037 *
38 * @return name of the leaf
39 */
40 String getName();
41
42 /**
Bharat saraswal8beac342016-08-04 02:00:03 +053043 * Retrieves the java name of the leaf.
Vinod Kumar S79a374b2016-04-30 21:09:15 +053044 *
45 * @param conflictResolveConfig user config to resolve conflicts
46 * @return name of the leaf
47 */
48 String getJavaName(YangToJavaNamingConflictUtil conflictResolveConfig);
49
Vinod Kumar S79a374b2016-04-30 21:09:15 +053050 /**
51 * Identifies if object is a leaf-list.
52 *
53 * @return true if leaf-list false otherwise
54 */
55 boolean isLeafList();
56
57 /**
58 * updates the qualified info.
59 */
60 void updateJavaQualifiedInfo();
Bharat saraswal715d3fc2016-05-17 19:59:16 +053061
62 /**
63 * Returns java naming conflict resolver.
64 *
Bharat saraswal8beac342016-08-04 02:00:03 +053065 * @return java naming conflict resolver
Bharat saraswal715d3fc2016-05-17 19:59:16 +053066 */
67 YangToJavaNamingConflictUtil getConflictResolveConfig();
68
69 /**
70 * Sets java naming conflict resolver.
71 *
Bharat saraswal8beac342016-08-04 02:00:03 +053072 * @param conflictResolveConfig java naming conflict resolver
Bharat saraswal715d3fc2016-05-17 19:59:16 +053073 */
74 void setConflictResolveConfig(YangToJavaNamingConflictUtil conflictResolveConfig);
75
Vinod Kumar S79a374b2016-04-30 21:09:15 +053076}