will factory pattern work here?
From: Mark F (me_at_isp.com)
Date: 11/29/04
- Next message: Oreo: "Re: Reproducing du/ls in Java"
- Previous message: Oscar kind: "Re: reflection: noSuchMethodException"
- Next in thread: xarax: "Re: will factory pattern work here?"
- Reply: xarax: "Re: will factory pattern work here?"
- Reply: Oscar kind: "Re: will factory pattern work here?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Nov 2004 13:14:39 -0600
I have a problem where I need one of several types returned depending on
a user selection. I was planning on using a factory pattern as these
types can all be related by a base class. The only problem is my
concrete classes may not have all the same properties. Can I still use
a factory pattern or should I use something else?
Example:
Abstract Class Document:
name
title
subject
Concrete Class Report extends Document:
reportno
keywords
Concrete class Drawing extends Document:
drawingno
Thanks,
-Mark
- Next message: Oreo: "Re: Reproducing du/ls in Java"
- Previous message: Oscar kind: "Re: reflection: noSuchMethodException"
- Next in thread: xarax: "Re: will factory pattern work here?"
- Reply: xarax: "Re: will factory pattern work here?"
- Reply: Oscar kind: "Re: will factory pattern work here?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]