001/* 002 * SPDX-FileCopyrightText: none 003 * SPDX-License-Identifier: CC0-1.0 004 */ 005 006package dev.metaschema.core.configuration; 007 008import edu.umd.cs.findbugs.annotations.NonNull; 009 010/** 011 * The common interface that all configuration features must implement. 012 * <p> 013 * This approach is inspired by the configuration implementation in the 014 * <a href="https://github.com/FasterXML/jackson-databind">Jackson databind 015 * library</a>. 016 * 017 * @param <V> 018 * the value type of the feature 019 */ 020public interface IConfigurationFeature<V> { 021 /** 022 * Get the name of the configuration feature. 023 * 024 * @return the name 025 */ 026 @NonNull 027 String getName(); 028 029 /** 030 * Get the default value of the configuration feature. 031 * 032 * @return the default value 033 */ 034 @NonNull 035 V getDefault(); 036 037 /** 038 * Get the class of the feature's value. 039 * 040 * @return the value's class 041 */ 042 @NonNull 043 Class<V> getValueClass(); 044}