X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-data-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fdata%2Fapi%2Fschema%2Ftree%2FDataTreeFactory.java;h=2a3055ae57694305d700b6923d6316b6988cb484;hb=11f324d00534f75932df67ba737efe261271cb47;hp=f7becfe3f88c98bca6cddd2d30e3a3827cba1fd2;hpb=19efe56f8f20f5692a100e765a581fbc8f0b4aca;p=yangtools.git diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeFactory.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeFactory.java index f7becfe3f8..2a3055ae57 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeFactory.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/tree/DataTreeFactory.java @@ -7,8 +7,9 @@ */ package org.opendaylight.yangtools.yang.data.api.schema.tree; +import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodeContainer; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; /** * Factory interface for creating data trees. @@ -22,7 +23,7 @@ public interface DataTreeFactory { *

* Correctness note: this method may not accurately initialize the root node in certain non-root scenarios due to * the impossibility to accurately derive root type from plain YangInstanceIdentifier. Using - * {@link #create(DataTreeConfiguration, SchemaContext)} is recommended, as it does not suffer from this + * {@link #create(DataTreeConfiguration, EffectiveModelContext)} is recommended, as it does not suffer from this * shortcoming. * * @param treeConfig @@ -30,7 +31,7 @@ public interface DataTreeFactory { * @return A data tree instance. * @throws NullPointerException if treeConfig is null */ - DataTree create(DataTreeConfiguration treeConfig); + @NonNull DataTree create(DataTreeConfiguration treeConfig); /** * Create a new data tree based on specified configuration, with a root node derived from the schema context lookup @@ -44,7 +45,7 @@ public interface DataTreeFactory { * @throws IllegalArgumentException if tree configuration does not match the SchemaContext, for example by root path * referring to a node which does not exist in the SchemaContext */ - DataTree create(DataTreeConfiguration treeConfig, SchemaContext initialSchemaContext); + @NonNull DataTree create(DataTreeConfiguration treeConfig, EffectiveModelContext initialSchemaContext); /** * Create a new data tree based on specified configuration, with the specified node. @@ -56,6 +57,6 @@ public interface DataTreeFactory { * @throws NullPointerException if any of the arguments are null * @throws IllegalArgumentException if a mismatch between the arguments is detected */ - DataTree create(DataTreeConfiguration treeConfig, SchemaContext initialSchemaContext, + @NonNull DataTree create(DataTreeConfiguration treeConfig, EffectiveModelContext initialSchemaContext, NormalizedNodeContainer initialRoot) throws DataValidationFailedException; }