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

Reply via email to