I don't want to be "that guy", just a honest question to understand the context: why would you need this?
if it's a static file you are serving, there is nothing you have to do;
if you need to customize something before serving it, it's not a static file, it's a resource to look up in the usual java ways (getResource(), getResourceAsStream() etc).
Implement StaticFiles.root() method that would return a static files content root (possibly previuosly set by *location() methods)