groovy - Do grails' getter methods return COPIES of attributes objects, or the attributes objects themselves? -


for instance:

class person {   def stuff }  class toilet {   public void main(string... args){       person person = new person()       person.getstuff()  //null, point   }  } 

does getstuff() returns copy of stuff? or stuff itself? i'm concerned modifiability of returned stuff object.

groovy (used grails) returns object itself, objects (def, object, person, etc). can modify object.

and copy primitives (int, long, etc).

it's same java.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -