This is a little confusing question to express, its probably more Java
quite sure what domain it falls under.
ArrayList<Object> fieldList = new ArrayList<Object>();
I then dump a lot of different variables to this array.
If I change the variable, the values in the array change
too...confirming the array stores a reference to the memory, rather
then value itself.
However, if I then retrieve data from the array then set that...
Object object = ((String)this.fieldList.get(0));
Then set object
object = "meeep!"
ObjectsURL is not set to "meep!" but rather it retains its original
I assume this is because the "object" is not referencing the original
variable anymore, that instead its pointing to a new immutable string
in the memory.
All expected Java behavior I think....but then, how would I go about
setting the actual original variable? is this possible in java? (is it
achieve the same thing?
I hope my question explains the problem well enough.
My use-case is trying to make a client only serialization/
deserialization system for a bunch of my objects. I was hoping to put
all the fields into a arraylist I could retrieve for both reading and
writting....thus avoiding having to hard-code long lists of
field=blah and blah=field and then going though constant pains
of needing to renumber them each time I add a new field before
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
To post to this group, send email to email@example.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.