org.objectweb.fractal.fraclet
Class CompositeDefinitionPlugin
java.lang.Object
org.generama.Plugin
org.generama.defaults.QDoxPlugin
org.objectweb.fractal.fraclet.Plugin
org.objectweb.fractal.fraclet.FractalPlugin
org.objectweb.fractal.fraclet.PrimitiveDefinitionPlugin
org.objectweb.fractal.fraclet.CompositeDefinitionPlugin
- All Implemented Interfaces:
- org.picocontainer.Startable
public class CompositeDefinitionPlugin
- extends PrimitiveDefinitionPlugin
XDoclet plugin applied in conjunction with the FractalAdlPlugin.jelly
template to generate primitive component descriptor file.
- Version:
- $Revision: 1.4 $
- Author:
- Romain Rouvoy
Fields inherited from class org.objectweb.fractal.fraclet.FractalPlugin |
ATTR_CTRL, ATTR_NAME, ATTRIBUTE_NAME, COMP_PREFIX, COMPONENT, CONTROL, FC_CONTROL, LIFECYCLE, LOGGER_NAME, PROVIDES, REQUIRES |
Methods inherited from class org.objectweb.fractal.fraclet.FractalPlugin |
attributeController, attributeControllerFullname, attributeControllerName, attributeName, attributes, bindingName, bindings, bindingSignature, componentFullname, componentName, componentPackage, extend, hasAttributes, hasBindings, hasGlue, hasLifecycles, hasLogger, hasPackage, hasReflects, isAttributeController, isComponent, isController, isData, isInterface, isPrimitive, lifecycles, loggerName, loggers, packagePrefix, reflects, superAttributeController |
Methods inherited from class org.generama.Plugin |
assertTrue, getContextObjects, getDestdirFile, getEncoding, getOutputValidator, getPackageName, getWriterMapper, isEmpty, isMultioutput, isValidate, populateContextMap, preGenerate, setDestdir, setEncoding, setFileregex, setFilereplace, setMultioutput, setOutputValidator, setPackageregex, setPackagereplace, setValidate, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ASSEMBLY_SUFFIX
protected static final String ASSEMBLY_SUFFIX
- See Also:
- Constant Field Values
CompositeDefinitionPlugin
public CompositeDefinitionPlugin(JellyTemplateEngine jelly,
QDoxCapableMetadataProvider qdox,
WriterMapper writer)
- Composite definition generator for abstract composite.
- Parameters:
jelly
- the jelly XML template engine.qdox
- the qdox java model provider.writer
- the file writer mapper.
shouldGenerate
public boolean shouldGenerate(Object obj)
- param cls the java class source file parsed.
- Overrides:
shouldGenerate
in class PrimitiveDefinitionPlugin
- Returns:
- true if a FractalADL file should be generated.
compositeName
public String compositeName(JavaClass cls)
compositeFullname
public String compositeFullname(JavaClass cls)
extendsElement
protected String extendsElement(JavaClass cls)
- Description copied from class:
PrimitiveDefinitionPlugin
- Adds a definition extended.
- Overrides:
extendsElement
in class PrimitiveDefinitionPlugin
- Parameters:
cls
- the java class source file parsed.
- Returns:
- the associated extend clause (empty if no extend).
interfaceClass
public JavaClass interfaceClass(String name)
- Provides the instance of the class element named name.
- Parameters:
name
- the name of the class to find.
- Returns:
- the associated Java model element (null if not found).
abstractInterfaceName
public String abstractInterfaceName(JavaField fld)
- Provides the name of a server interface compatible with its reference.
- Parameters:
fld
- the reference of a server interface.
- Returns:
- the name of the server interface.
componentParameters
public String componentParameters(JavaClass cls)
- Provides the parameters of the component definition.
- Parameters:
cls
- the class considered.
- Returns:
- the list of parameters.
argumentsDefinition
public String argumentsDefinition(JavaClass cls)
- Provides the list of arguments required by the component.
- Overrides:
argumentsDefinition
in class PrimitiveDefinitionPlugin
- Parameters:
cls
- the java class source file parsed.
- Returns:
- a comma separated list of argument for the component (null if no
arguments).
asArgument
public String asArgument(JavaField f)