1 /* 2 * SPDX-FileCopyrightText: none 3 * SPDX-License-Identifier: CC0-1.0 4 */ 5 6 package gov.nist.secauto.metaschema.core.model; 7 8 import edu.umd.cs.findbugs.annotations.NonNull; 9 import edu.umd.cs.findbugs.annotations.Nullable; 10 11 /** 12 * A marker interface for Metaschema constructs that can have a value. 13 */ 14 public interface IValued extends IDefaultable { 15 /** 16 * Get the current value from the provided {@code parentInstance} object. 17 * <p> 18 * The provided object must be of the type associated with the definition 19 * containing this instance. 20 * 21 * @param parent 22 * the object associated with the definition containing this property 23 * @return the value if available, or {@code null} otherwise 24 */ 25 // from IInstanceAbsolute 26 @Nullable 27 default Object getValue(@NonNull Object parent) { 28 return getResolvedDefaultValue(); 29 } 30 }