Is there a notion of “string-indexed” getters in spring context setup XML language? Suppose I have Person getter with the following prototype:
class Person {
Person getRelative(String relativeName);
...
}
Can I access it with something like
<bean id="Bob" class="Person"/>
<bean id="Barnyard" class="Company">
<property name="owner" ref="Bob.relative.father"/>
</bean>
saying that Bob’s father is the owner of Barnyard company.
The Company prototype is like follows:
class Company {
Person getOwner();
void setOwner(Person value);
...
}
You can use Spring-El for this: