net.sf.xsnapshot.ant
Class XSnapshotDocletTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
xjavadoc.ant.XJavadocTask
xdoclet.DocletTask
net.sf.xsnapshot.ant.XSnapshotDocletTask
- All Implemented Interfaces:
- org.apache.tools.ant.DynamicAttribute, org.apache.tools.ant.DynamicConfigurator, org.apache.tools.ant.DynamicElement
- public class XSnapshotDocletTask
- extends xdoclet.DocletTask
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.
- Author:
- Daniel Kokotov
- ant.element
- name="xsnapshotdoclet" display-name="XSnapshot Task"
Fields inherited from class xdoclet.DocletTask |
XDOCLET_VERSION |
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Methods inherited from class xdoclet.DocletTask |
addConfigParam, addFileset, addPackageSubstitution, addSubTask, addTemplate, addXmlTemplate, checkClass, createDynamicElement, getAddedTags, getConfigParams, getConfigParams, getConfigParamsAsMap, getDestDir, getExcludedTags, getMergeDir, getPackageSubstitutions, getSubTaskName, getSubTasks, isForce, isVerbose, setAddedTags, setDestDir, setDynamicAttribute, setExcludedTags, setExcludePackageNames, setForce, setMergeDir, setPackageNames, setPackageSubstitutions, setVerbose, start, validateSubTasks |
Methods inherited from class xjavadoc.ant.XJavadocTask |
createIgnoredtag, execute, getClasspath, getXJavaDoc, setDocencoding, setEncoding, setIgnoredtags, setValidating |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BOOLEAN_GETTER_STRATEGY_PARAM
public static final String BOOLEAN_GETTER_STRATEGY_PARAM
- See Also:
- Constant Field Values
ALWAYS_USE_IS
public static final String ALWAYS_USE_IS
- See Also:
- Constant Field Values
ALWAYS_USE_GET
public static final String ALWAYS_USE_GET
- See Also:
- Constant Field Values
SAME_AS_MODEL
public static final String SAME_AS_MODEL
- See Also:
- Constant Field Values
SNAPSHOT_CLASSNAME_PATTERN_PARAM
public static final String SNAPSHOT_CLASSNAME_PATTERN_PARAM
- See Also:
- Constant Field Values
DEFAULT_CLASSNAME_PATTERN
public static final String DEFAULT_CLASSNAME_PATTERN
- See Also:
- Constant Field Values
COPY_TO_MODEL_PARAM
public static final String COPY_TO_MODEL_PARAM
- See Also:
- Constant Field Values
DEFAULT_COPY_TO_MODEL_POLICY
public static final String DEFAULT_COPY_TO_MODEL_POLICY
- See Also:
- Constant Field Values
XSnapshotDocletTask
public XSnapshotDocletTask()
getBooleanGetterStrategy
public String getBooleanGetterStrategy()
setBooleanGetterStrategy
public void setBooleanGetterStrategy(String booleanGetterStrategy)
- Set 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"
- Parameters:
booleanGetterStrategy
-
getCopyToModelPolicy
public String getCopyToModelPolicy()
- Get the copyToModelPolicy.
- Returns:
- Returns the copyToModelPolicy
setCopyToModelPolicy
public void setCopyToModelPolicy(String copyToModelPolicy)
- Sets 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".
- Parameters:
copyToModelPolicy
- The copyToModelPolicy to set
getSnapshotClassnamePattern
public String getSnapshotClassnamePattern()
- Get the snapshotClassnamePattern.
- Returns:
- Returns the snapshotClassnamePattern
setSnapshotClassnamePattern
public void setSnapshotClassnamePattern(String snapshotClassnamePattern)
- Sets 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"
- Parameters:
snapshotClassnamePattern
- The snapshotClassnamePattern to set
validateOptions
protected void validateOptions()
throws org.apache.tools.ant.BuildException
- Called to validate configuration parameters.
- Throws:
org.apache.tools.ant.BuildException