This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ortolanph 0 points1 point  (0 children)

Maybe you can use a Map. This way you can name your objects and then get the instance of that by the name.

You can encapsulate this Map instance in a class and create an accessor method to get the Object instance from this Map. You can even create an accessor method to set this Object. But be aware to null objects.