org.objectweb.fractal.fraclet
Class AttributeControllerPlugin
java.lang.Object
org.generama.Plugin
org.generama.defaults.QDoxPlugin
org.objectweb.fractal.fraclet.Plugin
org.objectweb.fractal.fraclet.FractalPlugin
org.objectweb.fractal.fraclet.AttributeControllerPlugin
- All Implemented Interfaces:
- org.picocontainer.Startable
- Direct Known Subclasses:
- PrimitiveComponentPlugin
public class AttributeControllerPlugin
- extends FractalPlugin
XDoclet plugin applied in conjunction with the FractalAttributePlugin.vm
template to generate the AttributeController interface associated to a
component.
- Version:
- $Revision: 1.3 $
- 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 |
AttributeControllerPlugin
public AttributeControllerPlugin(VelocityTemplateEngine velocity,
QDoxCapableMetadataProvider qdox,
WriterMapper writer)
- Attribute controller generator using the Velocity template engine.
- Parameters:
velocity
- the Java template engine.qdox
- the qdox java model provider.writer
- the file writer mapper.
shouldGenerate
public boolean shouldGenerate(Object obj)
- Overrides:
shouldGenerate
in class Plugin
attributeMethod
public String attributeMethod(JavaField fld)
- Provides the name of the attribute for the getter/setter methods.
- Parameters:
fld
- the java field source file parsed.
- Returns:
- the name of the associated attribute (first character is upper
case).