You know, I completely missed that. Originally I remembered it being in there, or assumed it would be, and when I went back yesterday to implement it I didn't see it and I thought it strange that it would be left out. I'll need to go back to the spec to make sure it is in there. Also, I think we should make it a little more evident in the spec since I missed it yesterday.

Jim

On Jul 15, 2006, at 6:58 AM, Jeremy Boynes wrote:

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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to