Class DefaultSchemaTreeInference
java.lang.Object
org.opendaylight.yangtools.yang.model.spi.AbstractEffectiveStatementInference<SchemaTreeEffectiveStatement<?>>
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 DefaultSchemaTreeInference
of
(EffectiveModelContext modelContext, SchemaNodeIdentifier.Absolute path) Create a new instance based on anEffectiveModelContext
and anSchemaNodeIdentifier.Absolute
schema node identifier.static DefaultSchemaTreeInference
unsafeOf
(EffectiveModelContext modelContext, ImmutableList<? extends SchemaTreeEffectiveStatement<?>> path) Create a new instance based on anEffectiveModelContext
and a resolved sequence of statements.Methods inherited from class org.opendaylight.yangtools.yang.model.spi.AbstractEffectiveStatementInference.WithPath
addToStringAttributes, statementPath
Methods inherited from class org.opendaylight.yangtools.yang.model.spi.AbstractEffectiveStatementInference
modelContext, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.EffectiveStatementInference
modelContext
Methods 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 anEffectiveModelContext
and anSchemaNodeIdentifier.Absolute
schema node identifier.- Parameters:
modelContext
- AssociatedEffectiveModelContext
path
- An absolute schema node identifier- Returns:
- A new instance
- Throws:
NullPointerException
- if any argument is nullIllegalArgumentException
- if the providedpath
cannot be resolved inmodelContext
-
unsafeOf
public static DefaultSchemaTreeInference unsafeOf(EffectiveModelContext modelContext, ImmutableList<? extends SchemaTreeEffectiveStatement<?>> path) Create a new instance based on anEffectiveModelContext
and 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
path
can be enabled by setting the "org.opendaylight.yangtools.yang.model.spi.DefaultSchemaTreeInference.verifyUnsafeOf" system property totrue
.- Parameters:
modelContext
- AssociatedEffectiveModelContext
path
- Resolved statement path- Returns:
- A new instance
- Throws:
NullPointerException
- if any argument is nullIllegalArgumentException
- ifpath
is empty or when verification is enabled and thepath
does not match themodelContext
's schema tree
-