Can you elaborate on what you are trying to achieve here? If you only want to manipulate or create a string using all kinds of data from attributes you might want to check out: https://docs.mendix.com/refguide/string-concatenation/ and https://docs.mendix.com/refguide/string-function-calls/ because you do not need any Java to create any string you like. All can be done with micro or nanofows.
Regards,
Ronald