@Retention(value=RUNTIME) @Target(value={ANNOTATION_TYPE,METHOD}) @Documented public @interface JMapField
Permazen
Map
fields.
The annotated method's return type must be either Map
<K, V>
,
SortedMap
<K, V>
, or NavigableMap
<K, V>
,
where K
and V
are supported simple types.
Note that both primitive types and their corresponding wrapper types are supported as keys and/or values. A map whose
keys/values have primitive type will throw an exception on an attempt to add a null key/value.
To specify a primitive key or value type, specify the type name (e.g., "int"
) as the JField.type()
in the key()
or the value()
.
Meta-Annotations
This annotation may be configured indirectly as a Spring
meta-annotation
when spring-core
is on the classpath.
public abstract String name
If empty string (default value), the name is inferred from the name of the annotated Java bean getter method.
public abstract int storageId
StorageIdGenerator
will be consulted to auto-generate a value.StorageIdGenerator.generateFieldStorageId()
Copyright © 2022. All rights reserved.