I may be missing the point but wasn't this in that chump's proposal
already:
"The property or reference associated with each parameter of a
constructor is identified by name in the @Constructor annotation (if
present), *though the presence of a @Property or @Reference
annotation on the parameter declaration*, or by uniquely matching the
parameter type to the type of a property or reference defined by
annotation of a field or setter method or declared in a sidefile."
Also @Property and @Reference were extended to support PARAMETER
targets.
--
Jeremy
On Jul 14, 2006, at 10:23 PM, Jim Marino wrote:
Currently, the spec will allow constructor-based injection such as
the following:
public class FooImpl implements Foo{
public FooImpl(Bar bar) {
// do something
}
}
@Remotable
public interface Bar{
}
In the above, the runtime will determine that the constructor
parameter is a reference by reflecting the Bar interface marked
with @Reference and will inject it. I'd like to propose to the spec
group that we also allow explicit demarcation of constructor
properties and references:
public class FooImpl implements Foo{
public FooImpl(@Reference Bar bar, @Property baz) {
// do something
}
}
public interface Bar{
}
What do people think?
Jim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]