I tried to implement something like this
    @Path("foo")
public class Foo {
    @Context
    private BarContext barContext;
    @GET
    @Bar(name="foo")
    public String index() {
        barContext.name // output => foo
         ...
    }
}
But I have no idea if it is feasible or not someone can help me thank you