Vinod Kumar S | f677daf | 2016-04-15 18:08:57 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 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.YangLeaf; |
| 19 | import org.onosproject.yangutils.translator.tojava.HasJavaQualifiedTypeInfo; |
| 20 | import org.onosproject.yangutils.translator.tojava.JavaQualifiedTypeInfo; |
| 21 | |
| 22 | /** |
| 23 | * Maintains java information corresponding to the YANG leaf. |
| 24 | */ |
| 25 | public class YangJavaLeaf extends YangLeaf |
| 26 | implements HasJavaQualifiedTypeInfo { |
| 27 | |
| 28 | private JavaQualifiedTypeInfo javaQualifiedAccess; |
| 29 | |
| 30 | /** |
| 31 | * Create a YANG leaf object with java qualified access details. |
| 32 | */ |
| 33 | public YangJavaLeaf() { |
| 34 | super(); |
| 35 | setJavaQualifiedInfo(new JavaQualifiedTypeInfo()); |
| 36 | } |
| 37 | |
| 38 | @Override |
| 39 | public JavaQualifiedTypeInfo getJavaQualifiedInfo() { |
| 40 | return javaQualifiedAccess; |
| 41 | } |
| 42 | |
| 43 | @Override |
| 44 | public void setJavaQualifiedInfo(JavaQualifiedTypeInfo typeInfo) { |
| 45 | javaQualifiedAccess = typeInfo; |
| 46 | |
| 47 | } |
| 48 | |
| 49 | } |