+ Invisible(final NormalizedNodeContainerSupport<?, ?> support, final DataTreeConfiguration treeConfig,
+ final SchemaAwareApplyOperation<T> entryStrategy) {
+ super(support, treeConfig);
+ this.entryStrategy = requireNonNull(entryStrategy);
+ }
+
+ @Override
+ final T getSchema() {
+ return entryStrategy.getSchema();
+ }
+
+ final Optional<ModificationApplyOperation> entryStrategy() {
+ return Optional.of(entryStrategy);
+ }
+
+ @Override
+ ToStringHelper addToStringAttributes(final ToStringHelper helper) {
+ return super.addToStringAttributes(helper).add("entry", entryStrategy);
+ }
+ }
+
+ abstract static class Visible<T extends WithStatus> extends AbstractNodeContainerModificationStrategy<T> {
+ private final @NonNull T schema;
+
+ Visible(final NormalizedNodeContainerSupport<?, ?> support, final DataTreeConfiguration treeConfig,
+ final T schema) {
+ super(support, treeConfig);
+ this.schema = requireNonNull(schema);
+ }
+
+ @Override
+ final T getSchema() {
+ return schema;
+ }
+
+ @Override
+ ToStringHelper addToStringAttributes(final ToStringHelper helper) {
+ return super.addToStringAttributes(helper).add("schema", schema);
+ }
+ }
+
+ /**
+ * Fake TreeNode version used in
+ * {@link #checkTouchApplicable(ModificationPath, NodeModification, Optional, Version)}
+ * It is okay to use a global constant, as the delegate will ignore it anyway.
+ */
+ private static final Version FAKE_VERSION = Version.initial();
+
+ private final NormalizedNodeContainerSupport<?, ?> support;