I needed that in java. Copying it here in case it is of use for someone.
public static Result javascriptRoutes() throws IllegalAccessException, IllegalArgumentException,
InvocationTargetException {
// use reflection to get the fields of controllers.routes.javascript
Set