0

Is there any way to rename an iPojo instance?

I am using a factory to construct instances so in the argument of createComponentInstance I pass a name property with the name of the instance. But at runtime, once the instance starts running I will be able to have more information that I want to use as the name

I tried adding a String field in the class with @Property(name="name") or @Property(name="instance.name") that I then set to the new name but the change doesn't take effect

Hilikus
  • 9,954
  • 14
  • 65
  • 118

1 Answers1

0

No, you can't rename an instance.

What you can do is using a second property ("name") that you can change at runtime.

Clement
  • 2,817
  • 1
  • 12
  • 11