Class DefaultSchemaTreeInference
java.lang.Object
org.opendaylight.yangtools.yang.model.spi.AbstractEffectiveStatementInference<T>
org.opendaylight.yangtools.yang.model.spi.AbstractEffectiveStatementInference.WithPath<SchemaTreeEffectiveStatement<?>>
org.opendaylight.yangtools.yang.model.spi.DefaultSchemaTreeInference
- All Implemented Interfaces:
Immutable,EffectiveStatementInference,SchemaTreeInference
@Beta
@NonNullByDefault
public final class DefaultSchemaTreeInference
extends AbstractEffectiveStatementInference.WithPath<SchemaTreeEffectiveStatement<?>>
implements SchemaTreeInference
Default implementation of a
SchemaTreeInference. Guaranteed to be consistent with its
AbstractEffectiveStatementInference.modelContext().-
Nested Class Summary
Nested classes/interfaces inherited from class org.opendaylight.yangtools.yang.model.spi.AbstractEffectiveStatementInference
AbstractEffectiveStatementInference.WithPath<T extends EffectiveStatement<?,?>> -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultSchemaTreeInferenceof(EffectiveModelContext modelContext, SchemaNodeIdentifier.Absolute path) Create a new instance based on anEffectiveModelContextand anSchemaNodeIdentifier.Absoluteschema node identifier.static DefaultSchemaTreeInferenceunsafeOf(EffectiveModelContext modelContext, com.google.common.collect.ImmutableList<? extends SchemaTreeEffectiveStatement<?>> path) Create a new instance based on anEffectiveModelContextand a resolved sequence of statements.Methods inherited from class org.opendaylight.yangtools.yang.model.spi.AbstractEffectiveStatementInference.WithPath
addToStringAttributes, statementPathMethods inherited from class org.opendaylight.yangtools.yang.model.spi.AbstractEffectiveStatementInference
modelContext, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opendaylight.yangtools.yang.model.api.EffectiveStatementInference
modelContextMethods inherited from interface org.opendaylight.yangtools.yang.model.api.SchemaTreeInference
statementPath, toSchemaNodeIdentifier
-
Method Details
-
of
public static DefaultSchemaTreeInference of(EffectiveModelContext modelContext, SchemaNodeIdentifier.Absolute path) Create a new instance based on anEffectiveModelContextand anSchemaNodeIdentifier.Absoluteschema node identifier.- Parameters:
modelContext- AssociatedEffectiveModelContextpath- An absolute schema node identifier- Returns:
- A new instance
- Throws:
NullPointerException- if any argument is nullIllegalArgumentException- if the providedpathcannot be resolved inmodelContext
-
unsafeOf
public static DefaultSchemaTreeInference unsafeOf(EffectiveModelContext modelContext, com.google.common.collect.ImmutableList<? extends SchemaTreeEffectiveStatement<?>> path) Create a new instance based on anEffectiveModelContextand a resolved sequence of statements. Provided statements are expected to have been produced in a validated manner and are normally trusted to be accurate.Run-time verification of
pathcan be enabled by setting the "org.opendaylight.yangtools.yang.model.spi.DefaultSchemaTreeInference.verifyUnsafeOf" system property totrue.- Parameters:
modelContext- AssociatedEffectiveModelContextpath- Resolved statement path- Returns:
- A new instance
- Throws:
NullPointerException- if any argument is nullIllegalArgumentException- ifpathis empty or when verification is enabled and thepathdoes not match themodelContext's schema tree
-