X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-model-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fmodel%2Fapi%2Fmeta%2FDeclarationReference.java;fp=yang%2Fyang-model-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fmodel%2Fapi%2Fmeta%2FDeclarationReference.java;h=deca701cbaa443975f75f7fa25f62e8fd05fa0ea;hb=e4d18a98a261c277589f1270676c03233c79a4a6;hp=0000000000000000000000000000000000000000;hpb=a10cb9551ddd43dac64c00fc4d8d55fb10e4011c;p=yangtools.git diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/meta/DeclarationReference.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/meta/DeclarationReference.java new file mode 100644 index 0000000000..deca701cba --- /dev/null +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/meta/DeclarationReference.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.yangtools.yang.model.api.meta; + +import com.google.common.annotations.Beta; +import org.eclipse.jdt.annotation.NonNull; +import org.opendaylight.yangtools.concepts.Immutable; + +/** + * Reference to a statement declaration. This interface serves to provide additional information as to where a + * particular statement comes from. More accurate information may be available through further subclasses of this + * interface such as {@link DeclarationInText} and/or {@link DeclarationInFile}. + */ +@Beta +public interface DeclarationReference extends Immutable { + /** + * Returns human readable representation of this reference. This method does not prescribe any format of the + * returned string. + * + * @return human readable representation of this reference. + */ + @NonNull String toHumanReadable(); +}