Re: Alternate API proposition

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 25 Apr 2007 13:17:12 +0200

Hi Jerome,

Many thanks for sending this. I have not looked in sufficient detail yet
to make enough informed comments but do i have one observation and one
technical question that occurred to me when browsing the source code.

The observation is that i think there is some notational agreements on
some things (at least in partial scope) even if the names are different.

The question is how do you propose to inject something at runtime on to
a local variable? or example:

     public AccountResource() {
         String blinksaleId = null;

         this.account = Accounts.getInstance(blinksaleId);

or did you mean for the 'blinksaleId' local variable to be a method
parameter instead?

Annotations on local variables are not retained at runtime [1]:

   "An annotation on a local variable declaration is never retained in
    the binary representation."

and it is not possible to get access to such annotations at runtime
using Java reflection.



Jerome Louvel wrote:
> Hi all,
> As promised, I've worked on a sample application (based on BlinkSale API)
> that illustrates some of the ideas I have in mind for this JSR API.
> The Javadocs and source code should be self explaining, but I can detail
> more if needed.
> The idea is to provide a sketch that can illustrates my point of view and
> triggers some discussions. It doesn't pretend to be a complete solution, but
> it does seem to provide the main pieces to implement an API such as
> BlinkSale. Note that I haven't fully covered the BlinkSale resources yet,
> but the design pattern should be obvious.
> Best regards,
> Jerome
> ------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

| ? + ? = To question
    Paul Sandoz