Skip to content

I20240507-2220

@HannesWell HannesWell tagged this 03 May 21:42
Using the full name of the AST element representing a single-element
property annotations to derive the property name, makes the generated
annotation depend on the way a ComponentPropertyType annotation is
applied. For example with fully-qualified name or with the outer-class
if it's a inner class.
Instead the simple name of the resolved annotation class should be used
as stated in the OSGi compendium spec in '112.8.2.1 Component Property
Mapping' [1]:
'''
However, if the component property type is a single-element annotation,
see 9.7.3 in [7] The Java Language Specification, Java SE 8 Edition,
then the property name for the value method is derived from the name of
the component property type rather than the name of the method.

In this case, the simple name of the component property type, that is,
the name of the class without any package name or outer class name, if
the component property type is an inner class, must be converted to the
property name as follows:
'''

[1] - https://docs.osgi.org/specification/osgi.cmpn/8.1.0/service.component.html#service.component-component.property.mapping
Assets 2
Loading