我有以下包装器:
def ProtectedAction[T](f: => T)(implicit user: User): T = {
if(isAuthorized()) f
else {
Logger.warn(user.login + "Had access denied to" + methodsName)
throw new NotAuthorizedException("You do not have permission to execute this operation.")
}
}
我想获得 f 所持有的方法的simpleName。我怎么能这样做?