{"action":"created","issue":{"url":"https://api.github.com/repos/adamw/macwire/issues/94","repository_url":"https://api.github.com/repos/adamw/macwire","labels_url":"https://api.github.com/repos/adamw/macwire/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/adamw/macwire/issues/94/comments","events_url":"https://api.github.com/repos/adamw/macwire/issues/94/events","html_url":"https://github.com/adamw/macwire/issues/94","id":150105702,"number":94,"title":"Picking correct constructor","user":{"login":"zunder","id":6862750,"avatar_url":"https://avatars.githubusercontent.com/u/6862750?v=3","gravatar_id":"","url":"https://api.github.com/users/zunder","html_url":"https://github.com/zunder","followers_url":"https://api.github.com/users/zunder/followers","following_url":"https://api.github.com/users/zunder/following{/other_user}","gists_url":"https://api.github.com/users/zunder/gists{/gist_id}","starred_url":"https://api.github.com/users/zunder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zunder/subscriptions","organizations_url":"https://api.github.com/users/zunder/orgs","repos_url":"https://api.github.com/users/zunder/repos","events_url":"https://api.github.com/users/zunder/events{/privacy}","received_events_url":"https://api.github.com/users/zunder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-21T15:18:22Z","updated_at":"2016-04-21T15:29:56Z","closed_at":null,"body":"I am using an external class Foo:\r\n\r\n```Java\r\npublic Foo() {\r\n}\r\n\r\npublic Foo(Bar bar) {\r\n  this.bar = bar;\r\n}\r\n```\r\n\r\nand trying to wire it in my Scala module:\r\n\r\n```Scala\r\n// Dependancy\r\ndef Bar: bar\r\n\r\nlazy val foo: Foo = wire[Foo]\r\n```\r\n\r\nUnfortunately MacWire picks the constructor without parameters, though the Bar dependancy is in scope. Is there any way except using the constructor itself to tell MacWire which one to pick?"},"comment":{"url":"https://api.github.com/repos/adamw/macwire/issues/comments/212974759","html_url":"https://github.com/adamw/macwire/issues/94#issuecomment-212974759","issue_url":"https://api.github.com/repos/adamw/macwire/issues/94","id":212974759,"user":{"login":"adamw","id":60503,"avatar_url":"https://avatars.githubusercontent.com/u/60503?v=3","gravatar_id":"","url":"https://api.github.com/users/adamw","html_url":"https://github.com/adamw","followers_url":"https://api.github.com/users/adamw/followers","following_url":"https://api.github.com/users/adamw/following{/other_user}","gists_url":"https://api.github.com/users/adamw/gists{/gist_id}","starred_url":"https://api.github.com/users/adamw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamw/subscriptions","organizations_url":"https://api.github.com/users/adamw/orgs","repos_url":"https://api.github.com/users/adamw/repos","events_url":"https://api.github.com/users/adamw/events{/privacy}","received_events_url":"https://api.github.com/users/adamw/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T15:29:56Z","updated_at":"2016-04-21T15:29:56Z","body":"I think in Scala usually (at least from my experience) you have a single constructor or the constructor that you want to use is the primary one. That's just due to a different coding style in both langs"}}