xdoclet.modules.ejb.intf
Class LocalInterfaceSubTask

java.lang.Object
  extended byxdoclet.DocletSupport
      extended byxdoclet.SubTask
          extended byxdoclet.TemplateSubTask
              extended byxdoclet.modules.ejb.AbstractEjbCodeGeneratorSubTask
                  extended byxdoclet.modules.ejb.intf.LocalInterfaceSubTask
All Implemented Interfaces:
Serializable

public class LocalInterfaceSubTask
extends AbstractEjbCodeGeneratorSubTask

Generates local interfaces for EJBs.

Version:
$Revision: 1.12 $
Author:
Ara Abrahamian (ara_e@email.com)
See Also:
Serialized Form
ant.element
display-name="Local Interface" name="localinterface" parent="xdoclet.modules.ejb.EjbDocletTask"
created
Oct 15, 2001

Nested Class Summary
 
Nested classes inherited from class xdoclet.TemplateSubTask
TemplateSubTask.ExtentTypes, TemplateSubTask.OfType
 
Field Summary
static String DEFAULT_LOCAL_CLASS_PATTERN
           
protected static String DEFAULT_TEMPLATE_FILE
           
protected  String localClassPattern
          A configuration parameter for specifying the local interface name pattern.
 
Fields inherited from class xdoclet.DocletSupport
currentClassTag, currentFieldTag, currentMethodTag
 
Constructor Summary
LocalInterfaceSubTask()
           
 
Method Summary
protected  void engineStarted()
          Describe what the method does
protected  String getGeneratedFileName(xjavadoc.XClass clazz)
          Gets the GeneratedFileName attribute of the LocalInterfaceSubTask object
 String getLocalClassPattern()
          Returns the configuration parameter for specifying the local interface name pattern.
protected  boolean matchesGenerationRules(xjavadoc.XClass clazz)
          Returns true if output not already generated for clazz, and is of the specified type and has the specified class tag; false otherwise.
 void setPattern(String new_pattern)
          The pattern by which the interfaces are named.
 void validateOptions()
          Called to validate configuration parameters.
 
Methods inherited from class xdoclet.TemplateSubTask
addOfType, addOfType, addPackageSubstitution, copyAttributesFrom, engineFinished, execute, generateForClass, getAcceptAbstractClasses, getAcceptInterfaces, getDestinationFile, getEngine, getExtent, getGenerationManager, getHavingClassTag, getOfType, getPackageSubstitutions, getSubTaskClassName, getTemplateURL, init, isPackageSubstitutionInheritanceSupported, isPrefixWithPackageStructure, javaFile, 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

DEFAULT_LOCAL_CLASS_PATTERN

public static final String DEFAULT_LOCAL_CLASS_PATTERN
See Also:
Constant Field Values

DEFAULT_TEMPLATE_FILE

protected static final String DEFAULT_TEMPLATE_FILE
See Also:
Constant Field Values

localClassPattern

protected String localClassPattern
A configuration parameter for specifying the local interface name pattern. By default the value is used for deciding the local interface name. The placeholder "{0}" in the value means the current class's symbolic name which for an EJBean is the EJB name.

See Also:
getLocalClassPattern()
Constructor Detail

LocalInterfaceSubTask

public LocalInterfaceSubTask()
Method Detail

getLocalClassPattern

public String getLocalClassPattern()
Returns the configuration parameter for specifying the local interface name pattern. By default the value is used for deciding the local interface name. The placeholder "{0}" in the value means the current class's symbolic name which for an EJBean is the EJB name. If nothing explicitly specified by user then "{0}Local" is used by default.

Returns:
The LocalClassPattern value
See Also:
localClassPattern

setPattern

public void setPattern(String new_pattern)
The pattern by which the interfaces are named. The placeholder "{0}" designates the EJB name.

Parameters:
new_pattern -

validateOptions

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

Overrides:
validateOptions in class TemplateSubTask
Throws:
XDocletException

getGeneratedFileName

protected String getGeneratedFileName(xjavadoc.XClass clazz)
                               throws XDocletException
Gets the GeneratedFileName attribute of the LocalInterfaceSubTask object

Overrides:
getGeneratedFileName in class TemplateSubTask
Parameters:
clazz - Describe what the parameter does
Returns:
The GeneratedFileName value
Throws:
XDocletException

matchesGenerationRules

protected boolean matchesGenerationRules(xjavadoc.XClass clazz)
                                  throws XDocletException
Description copied from class: TemplateSubTask
Returns true if output not already generated for clazz, and is of the specified type and has the specified class tag; false otherwise. If returned false, no output file is generated for clazz.

Overrides:
matchesGenerationRules in class TemplateSubTask
Parameters:
clazz - Describe what the parameter does
Returns:
Describe the return value
Throws:
XDocletException
To do:
(Aslak) This needs refactoring. Nearly all matchesGenerationRules implementations are the same!

engineStarted

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

Overrides:
engineStarted in class TemplateSubTask
Throws:
XDocletException

http://xdoclet.sourceforge.net/