org.springframework.roo.addon.tostring
Annotation Type RooToString


@Target(value=TYPE)
@Retention(value=SOURCE)
public @interface RooToString

Provides a Object.toString() method if requested.

Whilst it is possible to apply this annotation to any class that you'd like a Object.toString() method produced for, it is generally triggered automatically via the use of most other annotations in the system. The created method is conservative and only includes public accessor methods within the produced string. Further, any accessor which returns a common JDK Collection type is restricted to displaying its size only.

Since:
1.0
Author:
Ben Alex

Optional Element Summary
 String[] excludeFields
           
 String toStringMethod
           
 

toStringMethod

public abstract String toStringMethod
Returns:
the name of the Object.toString() method to generate (defaults to "toString"; if empty, does not create)
Default:
"toString"

excludeFields

public abstract String[] excludeFields
Returns:
an array of fields to exclude in the toString method
Default:
""


Copyright © 2011. All Rights Reserved.