I have an object to be scoped as a prototype, and the constructor argument values are determined at runtime. It seems to me that I have to use a static factory method to construct an instance of this prototype. Is this true, and where in the documentation might I find it stating that fact? I couldn’t find anything discussing constructor values or references determined at runtime. All of the samples have explicitely defined values at startup.
Share
Fundamentally what needs to be done is:
If your classes are otherwise spring-free and you don’t want that applicationContext dependency mucking them up, then a factory method may be desirable.
You could also use Method Replacement to isolate the spring-dependant code.