import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
import org.opendaylight.yangtools.yang.parser.spi.source.StatementSourceReference;
+/**
+ * An inference context associated with an instance of a statement.
+ *
+ * @param <A> Argument type
+ * @param <D> Declared Statement representation
+ * @param <E> Effective Statement representation
+ */
public interface StmtContext<A, D extends DeclaredStatement<A>, E extends EffectiveStatement<A, D>> {
-
+ /**
+ * Returns the origin of the statement.
+ *
+ * @return origin of statement
+ */
@NonNull StatementSource getStatementSource();
+ /**
+ * Returns a reference to statement source.
+ *
+ * @return reference of statement source
+ */
@NonNull StatementSourceReference getStatementSourceReference();
+ /**
+ * See {@link StatementSupport#getPublicView()}.
+ */
@NonNull StatementDefinition getPublicDefinition();
/**
*/
@NonNull YangVersion getRootVersion();
+ /**
+ * An mutable view of an inference context associated with an instance of a statement.
+ *
+ * @param <A> Argument type
+ * @param <D> Declared Statement representation
+ * @param <E> Effective Statement representation
+ */
interface Mutable<A, D extends DeclaredStatement<A>, E extends EffectiveStatement<A, D>>
extends StmtContext<A, D, E> {
* from an alien implementation.
* @throws org.opendaylight.yangtools.yang.parser.spi.source.SourceException instance of SourceException
*/
- // FIXME: 5.0.0: remove generic arguments X, Y, Z. Callers should not care, as the returned copy can actually
- // be an encapsulating implicit statement.
- <X, Y extends DeclaredStatement<X>, Z extends EffectiveStatement<X, Y>> Mutable<X, Y, Z> childCopyOf(
- StmtContext<X, Y, Z> stmt, CopyType type, @Nullable QNameModule targetModule);
+ Mutable<?, ?, ?> childCopyOf(StmtContext<?, ?, ?> stmt, CopyType type, @Nullable QNameModule targetModule);
/**
* Create a child sub-statement, which is a child of this statement, inheriting all attributes from specified
* from an alien implementation.
* @throws org.opendaylight.yangtools.yang.parser.spi.source.SourceException instance of SourceException
*/
- default <X, Y extends DeclaredStatement<X>, Z extends EffectiveStatement<X, Y>> Mutable<X, Y, Z> childCopyOf(
- final StmtContext<X, Y, Z> stmt, final CopyType type) {
+ default Mutable<?, ?, ?> childCopyOf(final StmtContext<?, ?, ?> stmt, final CopyType type) {
return childCopyOf(stmt, type, null);
}