org.jpu.patterns.factory
Interface IPrototypeFactory.IInitializer

Enclosing interface:
IPrototypeFactory

public static interface IPrototypeFactory.IInitializer

Interface to be implemented by classes that are registered as initializers via IPrototypeFactory.addInitializer(int, org.jpu.patterns.factory.IPrototypeFactory.IInitializer). The list of initializers is called in order immediately after an object has been instantiated.

See Also:
IPrototypeFactory.addInitializer(int, org.jpu.patterns.factory.IPrototypeFactory.IInitializer), IPrototypeFactory.removeInitializer(int), IPrototypeFactory.getInitializers()

Field Summary
static int CLONE
           
static int INSTANTIATOR
           
static int NEW_INSTANCE
           
 
Method Summary
 void initialize(IPrototypeFactory fact, java.lang.Object prototype, int howCreated, FactoryOptions options)
          Called immediately after an object has been instantiated, either for the client or for the factory's use internally as a prototype.
 

Field Detail

INSTANTIATOR

public static final int INSTANTIATOR
See Also:
Constant Field Values

NEW_INSTANCE

public static final int NEW_INSTANCE
See Also:
Constant Field Values

CLONE

public static final int CLONE
See Also:
Constant Field Values
Method Detail

initialize

public void initialize(IPrototypeFactory fact,
                       java.lang.Object prototype,
                       int howCreated,
                       FactoryOptions options)
Called immediately after an object has been instantiated, either for the client or for the factory's use internally as a prototype.

Parameters:
fact - The factory.
prototype - The newly-created prototype.
howCreated - set to IInitializer.INSTANTIATOR if the object was created by an IPrototypeFactory.IInstantiator, IInitializer.NEW_INSTANCE if Class.newInstance() was used, or IInitializer.CLONE if the object was cloned from an existing prototype.
options - The FactoryOptions passed to the factory from the client. If no options were passed by the client, this will be a default instance. Guaranteed not to be null.


Copyright (c) 2001-2003 - Apache Software Foundation