I have a complex object that I define in a Blueprint XML file (with , ref=,
...). It’s composed of various other objects that are also defined in
Blueprint, like this:
<bean id=”complexObject”>
<property name=”subObject1” ref=”subObject1ref” />
<property name=”subObject2” ref=”subObject2ref” /> ...
</bean>
<bean id=”subObject1ref”>
...</bean>
Now I want to make a FactoryClass that creates those complex objects. I
don’t want to move all my Blueprint XML code to Java (using new object,
object.setBlaBla(), etc.).
Is it possible that I keep the object setup and wiring in Blueprint, and
access the object from my Java code?
public class FactoryClass {
MyComplexObject createMyComplexObject() {
instance = Get a new instance of my “complexObject”
bean from my the Blueprint XML
return instance;
}}