mathieuancelin / weld-osgi

This project aims to provide an OSGi integration for Weld. This project is no longer updated, see https://github.com/weld/core for updates
https://github.com/weld/core
12 stars 10 forks source link

Provide a class with constants for bundle header injection #82

Closed kevinpollet closed 12 years ago

kevinpollet commented 12 years ago

Currently a bundle header can be injected with the following code.

class Foo {
    @BundleHeader("Bundle-SymbolicName") 
    String name;
}

It could be great if weld-osgi provides a class with constants for existing OSGi headers (to avoid typos). With this class the bundle header injection could be something like

class Foo {
    @BundleHeader(Header.BUNDLE_SYMBOLIC_NAME) 
    String name;
}
mathieuancelin commented 12 years ago

That's a nice idea. I'll do it ASAP

mathieuancelin commented 12 years ago

Actually you can do it with class org.osgi.framework.Constants