001/* 002 * SPDX-FileCopyrightText: none 003 * SPDX-License-Identifier: CC0-1.0 004 */ 005 006package dev.metaschema.databind.model.annotations; 007 008import static java.lang.annotation.RetentionPolicy.RUNTIME; 009 010import java.lang.annotation.ElementType; 011import java.lang.annotation.Retention; 012import java.lang.annotation.Target; 013 014import dev.metaschema.core.model.IBoundObject; 015import dev.metaschema.databind.model.IBoundModule; 016import edu.umd.cs.findbugs.annotations.NonNull; 017 018/** 019 * Marks a class as a Metaschema module definition. 020 */ 021@Retention(RUNTIME) 022@Target(ElementType.TYPE) 023public @interface MetaschemaModule { 024 /** 025 * Get the classes representing the global fields defined on this Module. 026 * 027 * @return an array of field classes 028 */ 029 @NonNull 030 Class<? extends IBoundObject>[] fields() default {}; 031 032 /** 033 * Get the classes representing the global assemblies defined on this Module. 034 * 035 * @return an array of assembly classes 036 */ 037 @NonNull 038 Class<? extends IBoundObject>[] assemblies() default {}; 039 040 /** 041 * Get the classes representing the Metaschemas imported by this Module. 042 * 043 * @return an array of imported Metaschemas 044 */ 045 @NonNull 046 Class<? extends IBoundModule>[] imports() default {}; 047 048 /** 049 * Get the namespace prefix bindings for this module. 050 * 051 * @return an array of namespace bindings 052 */ 053 @NonNull 054 NsBinding[] nsBindings() default {}; 055 056 /** 057 * Get any remarks for this metaschema. 058 * 059 * @return a markdown string or {@code "##none"} if no remarks are provided 060 */ 061 @NonNull 062 String remarks() default ModelUtil.NO_STRING_VALUE; 063}