Correct argument type documentation 05/97405/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 6 Sep 2021 14:43:20 +0000 (16:43 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 6 Sep 2021 15:23:57 +0000 (17:23 +0200)
We have switched to using yang.common.Empty instead of java.lang.Void
due to nullability. Unfortunately not all javadocs were correct updated,
this corrects that mistake.

Change-Id: I1c183fa45374907401c22107e00452184137b43a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2d0d3dc452df9c94462ddeca4192291fc378b951)

model/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/meta/DeclaredStatement.java
model/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/meta/AbstractDeclaredEffectiveStatement.java
model/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/meta/AbstractEffectiveStatement.java
model/yang-model-spi/src/main/java/org/opendaylight/yangtools/yang/model/spi/meta/AbstractUndeclaredEffectiveStatement.java

index 11e5bb12651fa78dfa90c068fb8a4b7a9a3053be..0f45ed79ae3fd964a96c3e628146d97e2eb20cac 100644 (file)
@@ -16,11 +16,12 @@ import java.util.Optional;
 import java.util.stream.Stream;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
+import org.opendaylight.yangtools.yang.common.Empty;
 
 /**
  * Represents declared statement.
  *
- * @param <A> Argument type ({@link Void} if statement does not have argument.)
+ * @param <A> Argument type ({@link Empty} if statement does not have argument.)
  */
 public interface DeclaredStatement<A> extends ModelStatement<A> {
     /**
index 3d0490b2b37046c91186ef821107635f367bee7b..6848d989c65ca2fedda0822843bd318d149969e5 100644 (file)
@@ -17,6 +17,7 @@ import java.util.Map;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
+import org.opendaylight.yangtools.yang.common.Empty;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
@@ -38,7 +39,7 @@ import org.opendaylight.yangtools.yang.model.api.stmt.SchemaTreeEffectiveStateme
  * {@link UnsupportedOperationException} from {@link #getDeclared()}, rendering any services relying on declared
  * statement to be not available.
  *
- * @param <A> Argument type ({@link Void} if statement does not have argument.)
+ * @param <A> Argument type ({@link Empty} if statement does not have argument.)
  * @param <D> Class representing declared version of this statement.
  */
 @Beta
@@ -56,7 +57,7 @@ public abstract class AbstractDeclaredEffectiveStatement<A, D extends DeclaredSt
      * Base stateless superclass form {@link SchemaTreeAwareEffectiveStatement}s. It maintains the contents of schema
      * tree namespace based of effective substatements.
      *
-     * @param <A> Argument type ({@link Void} if statement does not have argument.)
+     * @param <A> Argument type ({@link Empty} if statement does not have argument.)
      * @param <D> Class representing declared version of this statement.
      * @param <E> Class representing effective version of this statement.
      */
@@ -89,7 +90,7 @@ public abstract class AbstractDeclaredEffectiveStatement<A, D extends DeclaredSt
      * Base stateless superclass form {@link DataTreeAwareEffectiveStatement}s. It maintains the contents of data tree
      * namespace based of effective substatements.
      *
-     * @param <A> Argument type ({@link Void} if statement does not have argument.)
+     * @param <A> Argument type ({@link Empty} if statement does not have argument.)
      * @param <D> Class representing declared version of this statement.
      * @param <E> Class representing effective version of this statement.
      */
@@ -112,7 +113,7 @@ public abstract class AbstractDeclaredEffectiveStatement<A, D extends DeclaredSt
      * A stateful version of {@link AbstractDeclaredEffectiveStatement}, which holds (and requires) a declared
      * statement.
      *
-     * @param <A> Argument type ({@link Void} if statement does not have argument.)
+     * @param <A> Argument type ({@link Empty} if statement does not have argument.)
      * @param <D> Class representing declared version of this statement.
      */
     public abstract static class Default<A, D extends DeclaredStatement<A>>
@@ -139,7 +140,7 @@ public abstract class AbstractDeclaredEffectiveStatement<A, D extends DeclaredSt
      * {@code description}, etc. This explicitly is not true of statements which underwent namespace binding via
      * {@code uses} or similar.
      *
-     * @param <A> Argument type ({@link Void} if statement does not have argument.)
+     * @param <A> Argument type ({@link Empty} if statement does not have argument.)
      * @param <D> Class representing declared version of this statement.
      */
     public abstract static class DefaultArgument<A, D extends DeclaredStatement<A>> extends Default<A, D> {
@@ -182,7 +183,7 @@ public abstract class AbstractDeclaredEffectiveStatement<A, D extends DeclaredSt
      * A building block on top of {@link Default}, which adds an explicit argument value, which is not related to the
      * context. This is mostly useful when the effective argument value reflects additional statements and similar.
      *
-     * @param <A> Argument type ({@link Void} if statement does not have argument.)
+     * @param <A> Argument type ({@link Empty} if statement does not have argument.)
      * @param <D> Class representing declared version of this statement.
      */
     public abstract static class DefaultWithArgument<A, D extends DeclaredStatement<A>> extends Default<A, D> {
@@ -218,7 +219,7 @@ public abstract class AbstractDeclaredEffectiveStatement<A, D extends DeclaredSt
     /**
      * Stateful version of {@link WithSchemaTree}. Schema tree namespace is eagerly instantiated (and checked).
      *
-     * @param <A> Argument type ({@link Void} if statement does not have argument.)
+     * @param <A> Argument type ({@link Empty} if statement does not have argument.)
      * @param <D> Class representing declared version of this statement.
      * @param <E> Class representing effective version of this statement.
      */
@@ -274,7 +275,7 @@ public abstract class AbstractDeclaredEffectiveStatement<A, D extends DeclaredSt
      * Stateful version of {@link WithDataTree}. Schema tree and data tree namespaces are eagerly instantiated
      * (and checked).
      *
-     * @param <A> Argument type ({@link Void} if statement does not have argument.)
+     * @param <A> Argument type ({@link Empty} if statement does not have argument.)
      * @param <D> Class representing declared version of this statement.
      * @param <E> Class representing effective version of this statement.
      */
index d46dbebbe7fbe42558cffddc00e2b3841f8a549f..8f523381af1b5f11041adae70f6f06699b227e9e 100644 (file)
@@ -16,6 +16,7 @@ import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
+import org.opendaylight.yangtools.yang.common.Empty;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
@@ -34,7 +35,7 @@ import org.opendaylight.yangtools.yang.model.api.stmt.SchemaTreeEffectiveStateme
  * This finds immense value in catering the common case, for example effective statements which can, but typically
  * do not, contain substatements.
  *
- * @param <A> Argument type ({@link Void} if statement does not have argument.)
+ * @param <A> Argument type ({@link Empty} if statement does not have argument.)
  * @param <D> Class representing declared version of this statement.
  */
 abstract class AbstractEffectiveStatement<A, D extends DeclaredStatement<A>>
index a8799594a31f53dba11f6addfdaf4368ec50a0c8..895f545b8d77fa299dd65faab75d940a8df9b7e1 100644 (file)
@@ -17,6 +17,7 @@ import java.util.Map;
 import java.util.Optional;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
+import org.opendaylight.yangtools.yang.common.Empty;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
@@ -46,7 +47,7 @@ public abstract class AbstractUndeclaredEffectiveStatement<A, D extends Declared
      * Base stateless superclass form {@link SchemaTreeAwareEffectiveStatement}s. It maintains the contents of schema
      * tree namespace based of effective substatements.
      *
-     * @param <A> Argument type ({@link Void} if statement does not have argument.)
+     * @param <A> Argument type ({@link Empty} if statement does not have argument.)
      * @param <D> Class representing declared version of this statement.
      * @param <E> Class representing effective version of this statement.
      */
@@ -79,7 +80,7 @@ public abstract class AbstractUndeclaredEffectiveStatement<A, D extends Declared
      * Base stateless superclass form {@link DataTreeAwareEffectiveStatement}s. It maintains the contents of data tree
      * namespace based of effective substatements.
      *
-     * @param <A> Argument type ({@link Void} if statement does not have argument.)
+     * @param <A> Argument type ({@link Empty} if statement does not have argument.)
      * @param <D> Class representing declared version of this statement.
      * @param <E> Class representing effective version of this statement.
      */
@@ -101,7 +102,7 @@ public abstract class AbstractUndeclaredEffectiveStatement<A, D extends Declared
     /**
      * Stateful version of {@link WithSchemaTree}. Schema tree namespace is eagerly instantiated (and checked).
      *
-     * @param <A> Argument type ({@link Void} if statement does not have argument.)
+     * @param <A> Argument type ({@link Empty} if statement does not have argument.)
      * @param <D> Class representing declared version of this statement.
      * @param <E> Class representing effective version of this statement.
      */
@@ -147,7 +148,7 @@ public abstract class AbstractUndeclaredEffectiveStatement<A, D extends Declared
      * Stateful version of {@link WithDataTree}. Schema tree and data tree namespaces are eagerly instantiated
      * (and checked).
      *
-     * @param <A> Argument type ({@link Void} if statement does not have argument.)
+     * @param <A> Argument type ({@link Empty} if statement does not have argument.)
      * @param <D> Class representing declared version of this statement.
      * @param <E> Class representing effective version of this statement.
      */