Annotation Type FormatListElement

public @interface FormatListElement

Annotation that can be used to modify the default naming behavior of REST formatters. This can be used to control the property names of the contained collection elements, which can be useful if the default naming convention of simply naming collection elements by appending _element is not desired. For instance, if a collection is encountered in a bean called cars, the XML formatter will be default output all elements of that collection in elements named "cars_element". This annotation could be used on the collection property to influence an alternate name for the collection elements, such as, in this example, "car".

Annotation Type Required Member Summary
 String elementPropertyName
          The alternate name for collection element properties.

Annotation Type Member Detail


public abstract String elementPropertyName
The alternate name for collection element properties.

the alternate name for collection element properties

Copyright © 2011, Oracle. All rights reserved.