| [XPAND] Casting possibilities [message #776520] |
Sun, 08 January 2012 12:08  |
Verena Himmelbauer Messages: 3 Registered: January 2012 |
Junior Member |
|
|
hi, i´m trying to transform some ecore model to java code.
my current problem are method parameters as i have to decide wether they are simple or complex.
«DEFINE methodBuilder FOR myModel::Method»
public void «name»(«FOREACH parameters AS param SEPARATOR ','» «HERE THE TYPE»
«param.name»
«ENDFOREACH»)
«HERE THE TYPE» is the part where i´m experiencing problems.
as far as i found out i can use the typeSelect only on the parameters List, but then i have as param only simple OR complex left.
if i make one FOREACH for simple and one for complex i´m missing commas:
«DEFINE methodBuilder FOR myModel::Method»
public void «name»((
«FOREACH parameters.typeSelect(myModel::SimpleParameter) AS param SEPARATOR ','» «HERE THE TYPE»
«FOREACH parameters.typeSelect(myModel::ComplexParameter) AS param SEPARATOR ','» «HERE THE TYPE»
«param.name»
«ENDFOREACH»)
Could anyone give me a hint how to do this?
thx Asa
|
|
|