Evaluating Software Design Patterns
— the "Gang of Four" patterns implemented in Java 6

dk.rode.thesis.abstractfactory
Class SynchronisedAbstractionFactory<E>

java.lang.Object
  extended by dk.rode.thesis.abstractfactory.SynchronisedAbstractionFactory<E>
Type Parameters:
E - The type of values delivered by the created abstractions.
All Implemented Interfaces:
AbstractionFactory<E>

@ParticipantUsage(value="ConcreteProduct",
                  type=SynchronisedSequenceAbstraction.class)
@Participant(value="ConcreteFactory")
public class SynchronisedAbstractionFactory<E>
extends Object
implements AbstractionFactory<E>

A synchronised abstraction factory creates synchronised sequence abstractions.

This factory is thread-safe.

Implementation notes:
The factory method does not use a covariant return type since the SynchronisedSequenceAbstraction class offers no new functionality compared to the SequenceAbstraction class.

Author:
Gunni Rode / rode.dk
See Also:
StandardAbstractionFactory, MemorizableAbstractionFactory, PrototypicalAbstractionFactory

Constructor Summary
SynchronisedAbstractionFactory()
          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
 

Constructor Detail

SynchronisedAbstractionFactory

public SynchronisedAbstractionFactory()
Constructor.

Method Detail

createAbstraction

public SequenceAbstraction<E> createAbstraction()
Description copied from interface: AbstractionFactory
Creates a new sequence abstraction instance.

Depending on the actual factory implementation, the returned abstraction may be initialised. If so, no implementation need be set.

Specified by:
createAbstraction in interface AbstractionFactory<E>
Returns:
A new sequence abstraction instance; never null.

toString

public String toString()
Returns the string representation of this factory.

Overrides:
toString in class Object
Returns:
The string representation; never null.

Gunni Rode / rode.dk

Feel free to use and/or modify the Java 6 source code developed for this thesis AT YOUR OWN RISK, but note that the source code comes WITHOUT ANY — and I do mean WITHOUT ANY — form of warranty WHAT SO EVER!

The original thesis and source code are available at rode.dk/thesis.