Add something like this to SpecialCases.xpt:
«EXTENSION extensions::myhelper»
«AROUND *::propertyGetter FOR Attribute»
«formatGetterJavaDoc()»
«getVisibilityLitteralGetter()»«getTypeName()» «getGetAccessor()»() {
return «name»;
};
«ENDAROUND»
«AROUND *::propertySetter FOR Attribute»
«formatSetterJavaDoc()»
«getVisibilityLitteralSetter()»void set«name.toFirstUpper()»(«getTypeName()» «name») {
this.«name» = «name»;
};
«ENDAROUND»
Define formatGetterJavaDoc, and formatSetterJavaDoc
in extensions/myhelper.ext
Implement them in similar way as is done in sculptor helper.ext, GenerationHelper.java
/Patrik
amphoras wrote:
Hi,
I'd like to add the @param and @return javadoc tags to the getters and setters. What is the best way to go about this? I can see definitions like this in DomainObject.xpt:
«DEFINE propertySetter FOR Attribute»
«formatJavaDoc()»
«getVisibilityLitteralSetter()»void set«name.toFirstUpper()»(«getTypeName()» «name») {
this.«name» = «name»;
};
«ENDDEFINE»
However, I am not sure how to get to formatJavaDoc()'s output to add the @param tag.
Any help would be greatly appreciated.
Thanks!
--Polly