Hi ASlak,
since you've started working on this, here some of my thoughts:
What about enhancing the ctors for ConstantParameter and CompnentParameter for a hint and have a getHint method in the Parameter iface?
I would like to code:
registerComponentImplementation(Group.class, GroupImpl.class);
registerComponentImplementation(Address.class, AddressImpl.class, new Parameter[]
{
new ConstantParameter("JDoe", "name"),
new ComponentParameter("group")
}
)
what I would like to support with this:
1)
class AddressImpl {
AddressImpl();
void setName(String name)
{...};
void setGroup(Group group){...}
;
}
2)
class AddressImpl {
AddressImpl(Group goup, String name)
{...}
}
With the hint I can specify the setter for the SICA explicitly. For CICA we may not instist on the parameter's sequence (once proposed by Thomas), only interesting if the parameters getting ambigous. Without a hint the SICA may just try to fulfill all dependencies from the setters.
I would also implement the hint as Object instead of a String. This can be used by more advanced CAs e.g. using a regular expression.
WDYT?
Hi ASlak,
since you've started working on this, here some of my thoughts:
What about enhancing the ctors for ConstantParameter and CompnentParameter for a hint and have a getHint method in the Parameter iface?
I would like to code:
registerComponentImplementation(Group.class, GroupImpl.class);
{ new ConstantParameter("JDoe", "name"), new ComponentParameter("group") }registerComponentImplementation(Address.class, AddressImpl.class, new Parameter[]
)
what I would like to support with this:
1)
class AddressImpl {
{...};AddressImpl();
void setName(String name)
void setGroup(Group group){...}
;
}
2)
class AddressImpl {
{...}AddressImpl(Group goup, String name)
}
With the hint I can specify the setter for the SICA explicitly. For CICA we may not instist on the parameter's sequence (once proposed by Thomas), only interesting if the parameters getting ambigous. Without a hint the SICA may just try to fulfill all dependencies from the setters.
I would also implement the hint as Object instead of a String. This can be used by more advanced CAs e.g. using a regular expression.
WDYT?