Possibly.
 
--

BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
hargr...@us.ibm.com
 
 
----- Original message -----
From: Seth Lana <sethlanag...@gmail.com>
Sent by: osgi-dev-boun...@mail.osgi.org
To: OSGi Developer Mail List <osgi-dev@mail.osgi.org>
Cc:
Subject: Re: [osgi-dev] DS 1.3 Configuration Property Types doubt
Date: Tue, May 31, 2016 3:59 PM
 
thanks for the reply BJ...

yep, I noted the spec does not support that :)

but I think that the issue you have referred would not be applied since you are using the same annotation type in the component must be the one being used as a parameter in the lifecycle method.
So, the generation tool would just need to check if there are any class annotation type that is the same of the one referred as a parameter, and if there are then merge its attributes values, don't you think? 

regards,

Seth
 
On 31/05/2016 16:41, BJ Hargrave wrote:
The spec does not support that. The tool (e.g. Bnd) will look for the use of the annotation types as arguments to life cycle methods (e.g. activate). That is how it knows the annotation type is "in use" as a component property type.
 
Using them also as annotations to the component class to set non-default property values is interesting. I guess the issue is knowing that an arbitrary annotation has that purpose since the component class could be annotated for other reasons which are unrelated to DS component property types. e.g. @SuppressWarnings
 
--

BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
hargr...@us.ibm.com
 
 
----- Original message -----
From: Seth Lana <sethlanag...@gmail.com>
Sent by: osgi-dev-boun...@mail.osgi.org
To: OSGi Developer Mail List <osgi-dev@mail.osgi.org>
Cc:
Subject: [osgi-dev] DS 1.3 Configuration Property Types doubt
Date: Tue, May 31, 2016 3:14 PM
 
Hello,

I'm looking into the new 1.3 version of Declarative Services spec.

I understood that I can create an annotation type and use it as
parameter of its lifecycle methods. cool !

But I'm wondering...:

  why wouldn't be possible to annotate the component class with this
same annotation type setting the values (other than the defaults) that I
want to be used for the component instance instead of using the hard
"property" attribute of @Component ?

thanks,

Seth
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

 
 
 
 
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
 
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to