1 /*
2 * SPDX-FileCopyrightText: none
3 * SPDX-License-Identifier: CC0-1.0
4 */
5
6 package dev.metaschema.databind.model;
7
8 import java.lang.reflect.ParameterizedType;
9 import java.lang.reflect.Type;
10
11 import dev.metaschema.core.model.IValued;
12 import edu.umd.cs.findbugs.annotations.NonNull;
13
14 /**
15 * Extends {@link IValued} to provide the ability to set a value on a parent
16 * object.
17 */
18 @FunctionalInterface
19 public interface IValuedMutable extends IValued {
20 /**
21 * Set the provided value on the provided object. The provided object must be of
22 * the item's type associated with this instance.
23 *
24 * @param parentObject
25 * the object
26 * @param value
27 * a value, which may be a simple {@link Type} or a
28 * {@link ParameterizedType} for a collection
29 */
30 void setValue(@NonNull Object parentObject, Object value);
31 }