return (StatementPolicy<A, D>) EqualSemantics.ALWAYS_COPY;
}
- @Deprecated(forRemoval = true)
- // FIXME: 7.0.0: remove this method
- public static final <A, D extends DeclaredStatement<A>> @NonNull StatementPolicy<A, D> legacyDeclaredCopy() {
- return alwaysCopyDeclared();
- }
-
abstract boolean canReuseCurrent(@NonNull Current<A, D> copy, @NonNull Current<A, D> current,
@NonNull Collection<? extends EffectiveStatement<?, ?>> substatements);
*
* <p>
* Implementation may use method to perform actions on this event or register modification action using
- * {@link StmtContext.Mutable#newInferenceAction(ModelProcessingPhase)}.
+ * {@link Mutable#newInferenceAction(ModelProcessingPhase)}.
*
* @param stmt Context of added statement.
* @throws SourceException when an inconsistency is detected.
*
* <p>
* Implementation may use method to perform actions on this event or register modification action using
- * {@link StmtContext.Mutable#newInferenceAction(ModelProcessingPhase)}.
+ * {@link Mutable#newInferenceAction(ModelProcessingPhase)}.
*
* @param stmt Context of added statement. Argument and statement parent is accessible.
* @throws SourceException when an inconsistency is detected.
*
* <p>
* Implementation may use method to perform actions on this event or register modification action using
- * {@link StmtContext.Mutable#newInferenceAction(ModelProcessingPhase)}.
+ * {@link Mutable#newInferenceAction(ModelProcessingPhase)}.
*
* @param stmt Context of added statement. Argument and statement parent is accessible.
* @throws SourceException when an inconsistency is detected.
*/
- public void onFullDefinitionDeclared(final StmtContext.Mutable<A, D, E> stmt) {
- final SubstatementValidator validator = getSubstatementValidator();
+ public void onFullDefinitionDeclared(final Mutable<A, D, E> stmt) {
+ final SubstatementValidator validator = substatementValidator();
if (validator != null) {
validator.validate(stmt);
}
*
* @return substatement validator or null, if substatement validator is not defined
*/
- // FIXME: rename to 'substatementValidator' and perhaps let it be passed in?
- protected abstract @Nullable SubstatementValidator getSubstatementValidator();
+ protected abstract @Nullable SubstatementValidator substatementValidator();
/**
* Returns true if this support has argument specific supports.
+ *
+ * @return true if this support has argument specific supports.
*/
public boolean hasArgumentSpecificSupports() {
// Most of statement supports don't have any argument specific supports, so return 'false'.
return rawArgument;
}
- /**
- * Returns unknown statement form of a regular YANG statement supplied as a parameter to the method. Default
- * implementation does nothing.
- *
- * @param yangStmtDef statement definition of a regular YANG statement
- * @return Optional of unknown statement form of a regular YANG statement or empty() if it is not supported by this
- * statement support
- */
- public Optional<StatementSupport<?, ?, ?>> getUnknownStatementDefinitionOf(final StatementDefinition yangStmtDef) {
- return Optional.empty();
- }
-
/**
* Returns true if this statement support and all its substatements ignore if-feature statements (e.g. yang-data
* extension defined in <a href="https://tools.ietf.org/html/rfc8040#section-8">RFC 8040</a>). Default