Module dev.metaschema.databind
Interface IChoiceGroupBindingConfiguration
- All Known Implementing Classes:
DefaultChoiceGroupBindingConfiguration
public interface IChoiceGroupBindingConfiguration
Provides binding configuration for a choice group within an assembly
definition.
Choice group bindings enable fine-grained control over code generation for choice groups, particularly for specifying custom collection types with type-safe item bounds.
-
Method Summary
Modifier and TypeMethodDescriptionGet the name of the choice group to match.Get the fully qualified Java type name to use for collection items.booleanDetermine whether to use a wildcard bounded type for the collection.
-
Method Details
-
getGroupAsName
Get the name of the choice group to match.This name corresponds to the
group-asname specified in the Metaschema module for the choice group.- Returns:
- the choice group name
-
getItemTypeName
Get the fully qualified Java type name to use for collection items.When specified, the generated field and getter will use this type instead of
Objectfor the collection item type. This allows for type-safe collections when all choice alternatives share a common supertype.- Returns:
- the fully qualified Java type name, or
nullif not specified
-
isUseWildcard
boolean isUseWildcard()Determine whether to use a wildcard bounded type for the collection.When
true, generatesList<? extends Type>instead ofList<Type>. This provides additional flexibility when the exact item type may vary while still maintaining type safety.Defaults to
trueif an item type is specified.- Returns:
trueto use wildcard bounds,falseotherwise
-