Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In short, instead of specifying the types found in collections and maps as documented in Type Conversion, the collection's generic type is used. This means you most likely don't need any ClassName-conversion.properties files.

*NOTE:
This is a work in progress and not yet finished! More compex examples will follow. For now, have a look at the unit tests with the xwork-tiger project path.*

Type Conversion Annotations

If you want to use annotation based type conversion, you have to annotate the class or interface with the Conversion Annotation.
Currently runtime evaluation of these annotations is not supported. This feature will be added in the near future.


Anchor
Conversion
Conversion

Conversion

Parameter

Required

Default

Notes

conversion

no

 

Used for Type Conversions being applied at Type level.


Anchor
TypeConversion
TypeConversion

...

Parameter

Required

Default

Notes

property

no  

The annotated property name

The optional property name used within TYPE or PACKAGE level annotations.

type

no

ConversionType.CLASS

Enum value of ConversionType. Determines whether the conversion should be applied at application or class level.

converter

yes

 

The class of the TypeConverter to be used as converter.

rule

no

ConversionRule.PROPERTY

Enum value of ConversionRule. The ConversionRule can be a property, a Collection or a Map.

...

Validation Annotations

If you want to use annotatin annotation based validation, you have to annotate the class or interface with Validation Annotation.

...