2
サブパッケージで定義されたインターフェースの実装はアンチパターンですか?
私が以下を持っているとしましょう: package me.my.pkg; public interface Something { /* ... couple of methods go here ... */ } そして: package me.my; import me.my.pkg.Something; public class SomeClass implements Something { /* ... implementation of Something goes here ... */ /* ... some more method implementations go here too ... */ } つまり、インターフェースを実装するクラスは、実装するインターフェースよりもパッケージ階層のルートの近くにありますが、どちらも同じパッケージ階層に属しています。 …