September 2002
Intermediate to advanced
416 pages
14h 46m
English
AdvertisementFactory.Instantiator
Classes that implement this interface
are called by the AdvertisementFactory to create
specific advertisment types. The standard advertisement types have a
default instantiator that they use (transparent to the developer); if
you create your own advertisement class, then you must create an
appropriate instantiator for it. The instantiator class must be named
Instantiator and be an inner class of your
advertisement class; e.g., if your class is named
MyAdv, then your instantiator would be called
MyAdv.Instantiator.
public static interface AdvertisementFactory.Instantiator { // Public Instance Methods public abstract String getAdvertisementType(); public abstract Advertisement newInstance(); public abstract Advertisement newInstance(Element root); }
Read now
Unlock full access