Spring org.springframework.beans.factory.ObjectFactory<T> getObject() JavaDoc

Viewed 19

We are using org.springframework.beans.factory.ObjectFactory<T> getObject() in our code base. JavaDoc of getObject() says it can return an instance possibly shared or independent. Please refer attached image for clarity. I need some help in understanding the JavaDoc. Does it mean that ObjectFactory can reuse an existing instance of type T ? or does it mean it can issue same instance to multiple requesters. I am trying to study if there is a need to synchronize the code which obtains an instance from ObjectFactory and does something.

enter image description here

0 Answers
Related