Remove SingletonWithLifecycle, because @Singleton is not inherited
authorMichael Vorburger <vorburger@redhat.com>
Tue, 6 Sep 2016 15:20:06 +0000 (17:20 +0200)
committerMichael Vorburger <vorburger@redhat.com>
Tue, 6 Sep 2016 16:11:17 +0000 (18:11 +0200)
commit88995e7e59e488800a39ac7497586bc4a14f0bb4
treeb1ce05e5b71e695b500dd5aa84d230e5f9eefe2d
parent77707fb5ba139e9cd7b9472d5394b4e572b7645e
Remove SingletonWithLifecycle, because @Singleton is not inherited

and move @PostConstruct & @PreDestroy from interface Lifecycle to class
AbstractLifecycle, because method annotations are only inherited from
classes, not interfaces

See
http://stackoverflow.com/questions/7761513/is-there-something-like-annotation-inheritance-in-java,
http://stackoverflow.com/questions/5536583/the-mystery-of-java-ee-6-annotations-inheritance,
http://stackoverflow.com/questions/13015831/can-guices-singleton-annotation-be-inherited,
http://stackoverflow.com/questions/10596744/is-it-possible-for-class-to-inherit-the-annotaions-of-the-super-class,
http://stackoverflow.com/questions/4745798/why-java-classes-do-not-inherit-annotations-from-implemented-interfaces,
http://stackoverflow.com/questions/23973107/how-to-use-inherited-annotation-in-java,
http://stackoverflow.com/questions/10082619/how-do-java-method-annotations-work-in-conjunction-with-method-overriding

Note that none of the annotations in question here have an @Inherited
annotation themselves.  For @PostConstruct & @PreDestroy it works anyway
with the blueprint-maven-plugin (I've now fully tested this end-to-end
in the netvirt aclservice-impl), and should be the same with Guice +
Mycila from what I can tell looking at that implementation.

Unrelated to above, this also fixes up the features.xml which I
originally forgot.

Change-Id: I1848838fa3123cd5fd7892445d26c89cc07a476c
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
inject/src/main/java/org/opendaylight/infrautils/inject/AbstractLifecycle.java
inject/src/main/java/org/opendaylight/infrautils/inject/Lifecycle.java
inject/src/main/java/org/opendaylight/infrautils/inject/SingletonWithLifecycle.java [deleted file]