net.sf.jsefa.xml.annotation
Annotation Type XmlElementMap


@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface XmlElementMap

An annotation stating that the annotated java field should be mapped to a xml element with map type during XML serialization and deserialization.

Author:
Norman Lahme-Huetig

Required Element Summary
 MapKey key
          A MapKey annotation describing the map keys.
 MapValue[] values
          An array of MapValue annotations describing the map values.
 
Optional Element Summary
 String[] constraints
          The constraints to validate.
 boolean implicit
          True, if there is no embracing element around the map entries; false otherwise.
 String name
          The name of the element this annotation describes.
 int pos
          The position of the xml element with the following semantic: If the position of a element A is less than the position of a element B, than element A comes (not necessarily directly) before element B.
 boolean required
          True, if a value is required; false otherwise.
 Class<? extends Validator> validatorType
          Specifies the validator type to be used.
 

Element Detail

key

public abstract MapKey key
A MapKey annotation describing the map keys.


values

public abstract MapValue[] values
An array of MapValue annotations describing the map values.

name

public abstract String name
The name of the element this annotation describes. It has the following format:
[prefix:]localname

Default:
""

pos

public abstract int pos
The position of the xml element with the following semantic:

If the position of a element A is less than the position of a element B, than element A comes (not necessarily directly) before element B.
All elements with the default position value (-1) will come after all elements with explicitly given positions.

Default:
-1

implicit

public abstract boolean implicit
True, if there is no embracing element around the map entries; false otherwise.

Default:
false

required

public abstract boolean required
True, if a value is required; false otherwise.

Default:
false

validatorType

public abstract Class<? extends Validator> validatorType
Specifies the validator type to be used. In the default case the validator type is determined using the type of the java field with this annotation.

Default:
net.sf.jsefa.common.annotation.NoValidatorType.class

constraints

public abstract String[] constraints
The constraints to validate. Each constraint is a String of the form 'name=value' where name is the name of the constraint and value is its value. The allowed set of constraints depend on the validator type.

Default:
{}


Copyright © 2014. All rights reserved.