Skip to content

Instantly share code, notes, and snippets.

@snipsnipsnip
Created December 14, 2017 14:50
Show Gist options
  • Save snipsnipsnip/383d7ede78751ce6382202cad8c90e0b to your computer and use it in GitHub Desktop.
Save snipsnipsnip/383d7ede78751ce6382202cad8c90e0b to your computer and use it in GitHub Desktop.
「クラスを抽出」というリファクタリングがあるとしたらどういうものだろうか ref: https://qiita.com/snipsnipsnip/items/3a8d018d683d2c54ea15
interface R {
$(D1)
$(V1)
}
class S {
private R r;
$(V2)
public S(R r) {
this.r = r;
}
$(rへの移譲でD1を実装)
$(rへの移譲でV1を実装)
$(M)
$(D2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment