xsnapshotdoclet

This is the main Doclet Task for XSnapshot. It is the parent task for xsnapshot, helper, properties subtasks. It exposes several properties that can customize the code generation.

Implementing Class

net.sf.xsnapshot.ant.XSnapshotDocletTask

Attributes

AttributeDescriptionRequired
booleanGetterStrategySet the strategy for generating getter names for boolean-valued properties in snapshots. Legal values are:
  • always_use_is
  • - always have the getter start with "is".
  • always_use_get
  • - always have the getter start with "get".
  • same_as_model
  • - use the same prefix as used in the model for the property.
If unspecified, the default value is "same-as-model"
No.
copyToModelPolicySets the default copy to model policy for all properties of all snapshots being generated. This can be overridden per each snapshot class and per individual snapshot property. Legal values are one of five keywords or the fully-qualified name of a class that implements net.sf.xsnapshot.CopyToModelPolicy. The five keywords are shorthands for the five predefined policies, as follows:
  • none
  • - net.sf.xsnapshot.NoneCopyToModelPolicy
  • conservative
  • - net.sf.xsnapshot.ConservativeCopyToModelPolicy
  • moderate
  • - net.sf.xsnapshot.ModerateCopyToModelPolicy
  • aggressive
  • - net.sf.xsnapshot.AggressiveCopyToModelPolicy
  • all
  • - net.sf.xsnapshot.AllCopyToModelPolicy
See the javadoc for the classes above for explanations of what properties are copied to model when using that policy. If no policy is specified, the default policy is "conservative".
No.
snapshotClassnamePatternSets the pattern for generating class names for snapshot if no classname is specified explicitly in the xsnapshot.snapshot-class tag. This must be a java.util.MessageFormat-compliant pattern. If present, the {0} parameter will be replaced by the classname of the model class, and the {1} paramter will be replaced by the snapshot name, which is first made CamelCase compatible by removing instances of the '-' and '_' characters and capitalizing the letters coming after those characters as well as the first letter (for instance form-bean becomes FormBean). If no pattern is specified the default pattern is "{1}{0}Snapshot" No.

Nested Elements

ElementDescription
helperSubtask to create helper classes.
propertiesSubtask to create the properties file containing the mappings of models, snapshot names, and snapshot and snapshot helper classes, as well as the standard transformers.
snapshotSubtask to create snapshot classes.