2 * Copyright (c) 2019 PANTHEON.tech, s.r.o. 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.yangtools.yang.binding;
10 import com.google.common.annotations.Beta;
13 * Base marker interface implemented by all YANG-defined annotations through the facilities provided by
14 * <a href="https://tools.ietf.org/html/rfc7952">RFC7952</a>. This interface is not meant to be directly implemented,
15 * but rather serves as a hook for generated code.
18 * An Annotation is a cross between a {@link TypeObject}, a {@link DataObject} and an {@link Augmentation}:
20 * <li>Similar to a {@code TypeObject} it can only hold a single scalar value, which has to be present.</li>
21 * <li>Similar to most {@code TypeObject}s, the value is available through {@link #getValue()} method</li>
22 * <li>Similar to a {@code DataObject}, the return type of {@link #getValue()} can point to a generated
23 * {@code TypeObject}, not only a base YANG type</li>
24 * <li>Similar to an {@code Augmentation} it can be attached to other objects via {@link AnnotationAware} interface.
25 * Unlike augmentations, though, annotations do not have a strict tie to the object they attach to.</li>
28 * @param <T> Value type
31 public interface Annotation<T> extends BindingObject, ValueAware<T> {