The JAX-RS 2.0 specification brings a very flexible way to configure dynamic filters so that they really only are applied to those methods which need to be really filtered. This makes implementing filters simpler and more concise.
There is one thing left open which a dynamic filter cannot solve so far: Replacing a method call in case the method is not implemented by the application. For example, I had to write a filter which answers @OPTIONS requests on the absolute URL "/" (the static "super root"!), but ONLY in case this is not already implemented by some real JAX-RS resource method. As the filter should be able to work with ANY JAX-RS application, at time of coding the filter it was not clear, when such methods will exist. Also apparently at time of writing a filter programmer cannot know at which root path an application might be linked later in case no @ApplicationPath is provided. AFAIK it is impossible to write such a filter yet in a simple way.
So I want to propose an addition to the JAX-RS API which makes it possible for dynamic filters to find out whether there exists a mapping for a particular absolute path and HTTP method combination.