Currently, if you want to create a resultcode instance with a parameter assigned, you will have to do this in two steps:
MyResultcode myResultcode = new MyResultcode();
myResultcode.setParam(param);
I think it would make sense if there is an overriding constructor accepting parameters:
MyResultcode myResultcode = new MyResultcode(param);
Attached is a quick-and-dirty example I applied successfully in the resultcode-to-java.xslt file, which might be useful.
Constructor-with-params example