|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdk.rode.thesis.abstractfactory.PrototypicalAbstractionFactory<E>
E - The type of values delivered by the created abstractions.@ParticipantUsage(value="ConcreteProduct",
type=SequenceAbstraction.class)
@Participant(value="ConcreteFactory")
public class PrototypicalAbstractionFactory<E>
A prototypical abstraction factory creates
sequence abstractions based on
a prototype supplied at construction time.
Created abstractions will be initialised if the prototype supplied at construction time was
initialised.
This factory is thread-safe.
MemorizableAbstractionFactory,
SynchronisedAbstractionFactory| Field Summary | |
|---|---|
private SequenceAbstraction<E> |
prototype
The prototypical sequence abstraction to use. |
| Constructor Summary | |
|---|---|
PrototypicalAbstractionFactory(SequenceAbstraction<E> prototype)
Constructor. |
|
| Method Summary | |
|---|---|
SequenceAbstraction<E> |
createAbstraction()
Creates a new sequence abstraction instance. |
String |
toString()
Returns the string representation of this factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final SequenceAbstraction<E> prototype
The abstraction may or may not have been initialised.
Never null.
| Constructor Detail |
|---|
public PrototypicalAbstractionFactory(SequenceAbstraction<E> prototype)
The abstraction supplied as prototype is copied, so
modifying it from an external context will not affect this
factory (unless prototype is a singleton). This factory
will not change prototype.
prototype - The prototypical abstraction to use; cannot be null.
NullPointerException - If prototype is null.| Method Detail |
|---|
public SequenceAbstraction<E> createAbstraction()
AbstractionFactoryabstraction instance.
Depending on the actual factory implementation, the returned abstraction
may be initialised. If so, no
implementation need be set.
createAbstraction in interface AbstractionFactory<E>public String toString()
toString in class Object
|
Gunni Rode / rode.dk | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||