org.gillius.Util
Interface Factory<T>

All Known Implementing Classes:
DefaultStreamReconstructorFactory

public interface Factory<T>

The Factory interface describes classes implementing the factory pattern.

Author:
Jason Winnebeck

Method Summary
 T create()
          Creates or obtains an instance of type T based on the rules of this Factory.
 

Method Detail

create

T create()
Creates or obtains an instance of type T based on the rules of this Factory. Most callers will want to assume that this method returns a non-null instance that cannot have any side-effects on the instances returned from subsequent calls to this method. In practical terms, that means a constant instance can only be returned for immutable types, else each call should create a new instance.



Copyright © 2008-2010 Jason Winnebeck. All Rights Reserved.