Make @Requires and any other appropriate annotations inheritable. (Add
@Inherited meta-annotation to the annotation definition)
-------------------------------------------------------------------------------------------------------------------------------
Key: FELIX-1941
URL: https://issues.apache.org/jira/browse/FELIX-1941
Project: Felix
Issue Type: Wish
Components: iPOJO
Affects Versions: iPOJO-1.4.0
Reporter: Allen Hackley
Take the following scenario.
- Class A and Class B have the same superclass: Class C
- Class C has one or more fields common to both A and B, to minimize having to
write redundant code.
- Classes A and B are declared to be component types.
- iPOJO currently will not perform field injection on any of the inherited
fields within Class A or Class B, even if Class C is also a component type that
explicitly exposes those fields.
- This results in having to write some combination of xml/annotations/java for
each individual subclass of C, which defeats the purpose of avoiding redundant
code.
I have written my own implementation of @Requires that is identical to the
original, with the exception of the @Inherited annotation, and this seems to
solve the above problem. It would be nice if it were integrated into the iPOJO
core.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.