AbstractFactory使って・・・
自分参照用メモ
エラーオブジェクトのハンドリングをやろうとしています。
ファクトリークラス.
public abstract class HogeFactory { public abstract Hoge createHoge(); public static HogeFactory createFactory(Object hoge) { // 何かしらの処理 return new CreateHoge(); } }
public class CreateHoge extends HogeFactory { public Hoge createHoge() { return getHoge(); } public Hoge getHoge(){ return new Hogehoge(); } }
public abstract class Hoge { public Object getObject() { return new Object(); } }
public class Hogehoge extends Hoge { public Object getObject() { return new Object(); } }