xdoclet.modules.java.javabean
Class BeanInfoSubTask

java.lang.Object
  extended by xdoclet.DocletSupport
      extended by xdoclet.SubTask
          extended by xdoclet.TemplateSubTask
              extended by xdoclet.modules.java.javabean.BeanInfoSubTask
All Implemented Interfaces:
java.io.Serializable

public class BeanInfoSubTask
extends TemplateSubTask

Generate the BeanInfo class for a given JavaBean class, and an optional messages properties bundle to go with it.

Version:
$Revision: 1.6 $
Author:
Laurent Etiemble (letiemble@users.sourceforge.net)
See Also:
Serialized Form
ant.element
name = "beaninfo" display-name = "BeanInfo Class" parent = "xdoclet.DocletTask"
created
June 20, 2002

Nested Class Summary
 
Nested classes/interfaces inherited from class xdoclet.TemplateSubTask
TemplateSubTask.ExtentTypes, TemplateSubTask.OfType
 
Field Summary
static java.lang.String GENERATED_BEANINFO_CLASS_NAME
          Pattern for generation of BeanInfo files
static java.lang.String GENERATED_BEANINFO_FILE_NAME
          Pattern for generation of BeanInfo files
protected  boolean i18nGeneration
          Is the BeanInfo class built for I18N
 
Fields inherited from class xdoclet.DocletSupport
currentClassTag, currentFieldTag, currentMethodTag
 
Constructor Summary
BeanInfoSubTask()
          Constructor for the BeanInfoSubTask object
 
Method Summary
protected  void engineStarted()
          Called when the engine is started
 void execute()
          Describe what the method does
protected  java.lang.String getGeneratedFileName(xjavadoc.XClass clazz)
          Returns the filename of the generated file for a class.
 boolean isI18n()
          Get whether or not a I18N resource bundle will be generated, and the BeanInfo classes will use it
 void setI18n(boolean value)
          Set whether or not a I18N resource bundle will be generated, and the BeanInfo classes will use it
 void validateOptions()
          Called to validate configuration parameters.
 
Methods inherited from class xdoclet.TemplateSubTask
addOfType, addOfType, addPackageSubstitution, copyAttributesFrom, engineFinished, generateForClass, getAcceptAbstractClasses, getAcceptInterfaces, getDestinationFile, getEngine, getExtent, getGenerationManager, getHavingClassTag, getOfType, getPackageSubstitutions, getSubTaskClassName, getTemplateURL, init, isPackageSubstitutionInheritanceSupported, isPrefixWithPackageStructure, javaFile, matchesGenerationRules, processInnerClasses, setAcceptAbstractClasses, setAcceptInterfaces, setDestinationFile, setEngine, setExtent, setExtentValue, setGenerationManager, setHavingClassTag, setOfType, setPackageSubstitutionInheritanceSupported, setPackageSubstitutions, setPrefixWithPackageStructure, setSubTaskClassName, setTemplateFile, setTemplateURL, startEngine, startProcess, startProcessForAll, startProcessPerClass
 
Methods inherited from class xdoclet.SubTask
addConfigParam, getConfigParams, getConfigParamsAsMap, getContext, getDestDir, getMergeDir, getSubTaskName, getXJavaDoc, setDestDir, setMergeDir, setSubTaskName
 
Methods inherited from class xdoclet.DocletSupport
getCurrentClass, getCurrentClassTag, getCurrentConstructor, getCurrentField, getCurrentFieldTag, getCurrentMethod, getCurrentMethodTag, getCurrentPackage, getCurrentTag, isDocletGenerated, popCurrentClass, pushCurrentClass, setCurrentClass, setCurrentClassTag, setCurrentConstructor, setCurrentField, setCurrentFieldTag, setCurrentMethod, setCurrentMethodTag, setCurrentPackage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GENERATED_BEANINFO_FILE_NAME

public static java.lang.String GENERATED_BEANINFO_FILE_NAME
Pattern for generation of BeanInfo files


GENERATED_BEANINFO_CLASS_NAME

public static java.lang.String GENERATED_BEANINFO_CLASS_NAME
Pattern for generation of BeanInfo files


i18nGeneration

protected boolean i18nGeneration
Is the BeanInfo class built for I18N

Constructor Detail

BeanInfoSubTask

public BeanInfoSubTask()
Constructor for the BeanInfoSubTask object

Method Detail

isI18n

public boolean isI18n()
Get whether or not a I18N resource bundle will be generated, and the BeanInfo classes will use it

Returns:
true if I18N is supported

setI18n

public void setI18n(boolean value)
Set whether or not a I18N resource bundle will be generated, and the BeanInfo classes will use it

Parameters:
value - true to support I18N

validateOptions

public void validateOptions()
                     throws XDocletException
Called to validate configuration parameters.

Overrides:
validateOptions in class TemplateSubTask
Throws:
XDocletException - Description of Exception

execute

public void execute()
             throws XDocletException
Description copied from class: TemplateSubTask
Describe what the method does

Overrides:
execute in class TemplateSubTask
Throws:
XDocletException - Description of Exception

getGeneratedFileName

protected java.lang.String getGeneratedFileName(xjavadoc.XClass clazz)
                                         throws XDocletException
Description copied from class: TemplateSubTask
Returns the filename of the generated file for a class. If the string "{0}" is present in the pattern, it will be substituted with the transformed class name.

Overrides:
getGeneratedFileName in class TemplateSubTask
Parameters:
clazz - the class being processed
Returns:
the corresponding filename
Throws:
XDocletException - Description of Exception

engineStarted

protected void engineStarted()
                      throws XDocletException
Called when the engine is started

Overrides:
engineStarted in class TemplateSubTask
Throws:
XDocletException - Thrown in case of problem

http://xdoclet.sourceforge.net/