{"comment":{"url":"https://api.github.com/repos/clockfly/gearpump/comments/9144435","html_url":"https://github.com/clockfly/gearpump/commit/a5fc83c6d3c940cdfbd6529430561e691232a82b#commitcomment-9144435","id":9144435,"user":{"login":"clockfly","id":2595532,"avatar_url":"https://avatars.githubusercontent.com/u/2595532?v=3","gravatar_id":"","url":"https://api.github.com/users/clockfly","html_url":"https://github.com/clockfly","followers_url":"https://api.github.com/users/clockfly/followers","following_url":"https://api.github.com/users/clockfly/following{/other_user}","gists_url":"https://api.github.com/users/clockfly/gists{/gist_id}","starred_url":"https://api.github.com/users/clockfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clockfly/subscriptions","organizations_url":"https://api.github.com/users/clockfly/orgs","repos_url":"https://api.github.com/users/clockfly/repos","events_url":"https://api.github.com/users/clockfly/events{/privacy}","received_events_url":"https://api.github.com/users/clockfly/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"a5fc83c6d3c940cdfbd6529430561e691232a82b","created_at":"2015-01-04T02:28:26Z","updated_at":"2015-01-04T02:28:26Z","body":"We need to use clazz.getName instead of clazz.getCanonicalName\r\n\r\nFor example, if we define a class in Object.\r\n```\r\npackage some.package\r\n\r\nObject Container {\r\n\r\nclass A extends Actor {\r\n  def receive : Receive = {case _=>}\r\n}\r\n\r\n}\r\n```\r\n\r\nclassOf[A].getCanonicalName will return some.package.Container.A\r\n\r\nWhile\r\nclassOf[A].getName will return  some.package.Container$A\r\n\r\nOnly the latter can be resolved by class loader.\r\n"}}