Unknown(Effective)Statement is really a remnant of the SchemaNode
approach to statement categorization. It is useful for bridging
from UnknownSchemaNode, but has not other use and we should
eventually be removing it.
UnrecognizedStatement, on the other hand, is here to stay as it
provides a DeclaredStatement anchor for use of extensions we do not
recognize.
JIRA: YANGTOOLS-1196
Change-Id: I54a8412d4ee0c60ee2cc6108973566e08121c201
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
package org.opendaylight.yangtools.yang.model.api.stmt;
import com.google.common.annotations.Beta;
package org.opendaylight.yangtools.yang.model.api.stmt;
import com.google.common.annotations.Beta;
+import org.opendaylight.yangtools.yang.common.Empty;
+import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
+/**
+ * Effective counterpart to {@link UnknownStatement}. This interface exists only for the purposes of providing a bridge
+ * from {@link UnknownSchemaNode} to {@link EffectiveStatement} via {@link UnknownSchemaNode#asEffectiveStatement()}.
+ *
+ * @param <A> Argument type ({@link Empty} if statement does not have argument.)
+ * @param <D> Class representing declared version of this statement.
+ */
-// FIXME: evaluate usefulness of this
+// FIXME: remove this interface once UnknownSchemaNode is gone
public interface UnknownEffectiveStatement<A, D extends UnknownStatement<A>> extends EffectiveStatement<A, D> {
}
public interface UnknownEffectiveStatement<A, D extends UnknownStatement<A>> extends EffectiveStatement<A, D> {
}
*
* @param <A> Argument type ({@link Empty} if statement does not have argument.)
*/
*
* @param <A> Argument type ({@link Empty} if statement does not have argument.)
*/
-// FIXME: evaluate usefulness of this
+// FIXME: remove this interface once UnknownSchemaNode is gone
public interface UnknownStatement<A> extends DeclaredStatement<A> {
}
public interface UnknownStatement<A> extends DeclaredStatement<A> {
}
package org.opendaylight.yangtools.yang.model.api.stmt;
import com.google.common.annotations.Beta;
package org.opendaylight.yangtools.yang.model.api.stmt;
import com.google.common.annotations.Beta;
+import org.opendaylight.yangtools.yang.common.Empty;
/**
* Common interface for unrecognized unknown statements. An {@link UnrecognizedStatement} is an instance of a statement
/**
* Common interface for unrecognized unknown statements. An {@link UnrecognizedStatement} is an instance of a statement
*/
@Beta
public interface UnrecognizedStatement extends UnknownStatement<Object> {
*/
@Beta
public interface UnrecognizedStatement extends UnknownStatement<Object> {
+ /**
+ * {@inheritDoc}
+ *
+ * <p>
+ * This method can returns
+ * <ul>
+ * <li>{@link String} if the statement has an argument</li>
+ * <li>{@link Empty} if the statement does not have an argument</li>
+ * </ul>
+ */
+ @Override
+ Object argument();