I am trying to generate a Java code like the following.
public void create(@RequestBody final Resource resource) {
return;
}
The Inferrer code snippet which I added for providing the @RequestBody is given below.
members += event.toMethod(event.action.name, typeRef(void)) [
var dataType = map.get(method.action.name)
parameters += event.toParameter(method.type.parameter.name, dataType.javaType)
annotations += annotationRef("org.springframework.web.bind.annotation.RequestBody");
body = '''
return;
'''
The resulting generated code is like following.
@RequestBody
public void create(final Resource resource) {
return;
}
What changes should I make in the xtend code in order to get the annotation before the parameter of method? Like @RequestBody final Resource resource