001/* 002 * SPDX-FileCopyrightText: none 003 * SPDX-License-Identifier: CC0-1.0 004 */ 005 006package dev.metaschema.core.model; 007 008import dev.metaschema.core.model.util.ModuleUtils; 009import edu.umd.cs.findbugs.annotations.NonNull; 010 011/** 012 * A base class for a flag definition defined globally within a Metaschema 013 * module. 014 * 015 * @param <MODULE> 016 * the Java type of the containing module 017 * @param <INSTANCE> 018 * the expected Java type of an instance of this definition 019 */ 020public abstract class AbstractGlobalFlagDefinition<MODULE extends IModule, INSTANCE extends IFlagInstance> 021 extends AbstractGlobalDefinition<MODULE, INSTANCE> 022 implements IFlagDefinition { 023 /** 024 * Construct a new global flag definition. 025 * 026 * @param module 027 * the parent module containing this definition 028 */ 029 protected AbstractGlobalFlagDefinition(@NonNull MODULE module) { 030 super(module, name -> ModuleUtils.parseFlagName(module, name)); 031 } 032}