2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.binding.yang.types;
10 import java.util.Optional;
11 import org.opendaylight.yangtools.yang.common.QName;
12 import org.opendaylight.yangtools.yang.model.api.PathExpression;
13 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
14 import org.opendaylight.yangtools.yang.model.api.Status;
15 import org.opendaylight.yangtools.yang.model.api.type.LeafrefTypeDefinition;
18 * Mock LeafrefDypeDefinition implementation with RevisionAwareXPath null reference.
20 * @author Lukas Sedlak <lsedlak@cisco.com>
22 public class LeafrefTypeWithNullXpath implements LeafrefTypeDefinition {
24 public PathExpression getPathStatement() {
29 public LeafrefTypeDefinition getBaseType() {
34 public Optional<String> getUnits() {
35 return Optional.empty();
39 public Optional<? extends Object> getDefaultValue() {
40 return Optional.empty();
44 public QName getQName() {
45 throw new UnsupportedOperationException();
50 public SchemaPath getPath() {
51 throw new UnsupportedOperationException();
55 public Optional<String> getDescription() {
56 return Optional.empty();
60 public Optional<String> getReference() {
61 return Optional.empty();
65 public Status getStatus() {
66 return Status.CURRENT;
70 public boolean requireInstance() {