All Packages Class Hierarchy This Package Previous Next Index
Any dip can be implemented as a singleton. The Dip interface does not imply the use of a singleton, but it does not prevent it either.
To implement a singleton, follow the pattern described in 'Design Patterns' by Gamma, Helm, Johnson, and Vlissides. If the dip is implemented as a singleton, it should make its constructors protected or private. Any singleton dip should provide special implementations of the writeObject() and readObject() methods.
public abstract Object createImplementation(Object obj) throws DipRejectAdditionException
Understanding the Dip Implementation Object
Each dip should decide if it wants to create an implementation separate from itself.
For example, the dip might want an optional dip implementation object if the dip wanted to be a singleton, but the dip also wanted to attach unique data to each instance being dipped. In this example, the singleton would manage any logic universal to dipping all instances, while the separate implementation object would be created for each instance being dipped to manage any logic and data unique to each dipped instance.
null
if the dip decides not to have a separate
implementation; otherwise this method returns the
dip implemation object.
public abstract void releaseImplementation()
If the Dip retained a pointer to the original bean during the createImplementation() method, this method is when that pointer should be nulled out for garbage collection.
public abstract boolean includeInMorphedClass(String methodName)
This method is called by the DippableGenerator class when the dipsSpecifyOverrides option is chosen.
true
if the method should be overridden in the
new dippable class; false
otherwise.
public abstract DipPropertyChangeListener[] createPropertyChangeListener(Object imp, String methods[]) throws DipRejectAdditionException
There is a one-to-one mapping between the array of
listeners and
the methods parameter.
DipPropertyChangeListener[i] is used with the Method
corresponding to methods[i].
Obviously, the lengths of the two arrays are equal.
Because the dip may not care to listen to every property change method,
not every entry in the DipPropertyChangeListener array needs to
be set. A null
entry in
DipPropertyChangeListener[i] means there
is no listener for the corresponding property change in method[i].
Also, the dip may assign the same listener to more than one property
change method. Therefore, different entries in the
DipPropertyChangeListener array may point to the same listener.
null
if the dip supplies no
DipPropertyChangeListeners array;
otherwise, the array of listeners.
public abstract DipVetoableChangeListener[] createVetoableChangeListener(Object imp, String methods[]) throws DipRejectAdditionException
There is a one-to-one mapping between the array of
listeners and
the methods parameter.
DipVetoableChangeListener[i] is used with
the Method corresponding to methods[i].
Obviously, the lengths of the two arrays are equal.
Because the dip may not care to listen to every property change method,
not every entry in the DipVetoableChangeListener array needs to
be set. A null
entry in
DipVetoableChangeListener[i] means there
is no listener for the corresponding property change in method[i].
Also, the dip may assign the same listener to more than one property
change method. Therefore, different entries in the
DipVetoableChangeListener array may point to the same listener.
null
if the dip supplies no
DipVetoableChangeListeners array;
otherwise, the array of listeners.
public abstract DipMethodCallListener[] createMethodCallListener(Object imp, String methods[]) throws DipRejectAdditionException
There is a one-to-one mapping between the array of
listeners and
the methods parameter.
DipMethodCallListener[i] is used with
the Method corresponding to methods[i].
Obviously, the lengths of the two arrays are equal.
Because the dip may not care to listen to every general method call,
not every entry in the DipMethodCallListener array needs to
be set. A null
entry in
DipMethodCallListener[i] means there
is no listener for the corresponding general method in method[i].
Also, the dip may assign the same listener to more than one general
method call. Therefore, different entries in the DipMethodCallListener
array may point to the same listener.
null
if the dip supplies no
DipMethodCallListeners array;
otherwise, the array of listeners.
public abstract DipVetoableMethodListener[] createVetoableMethodListener(Object imp, String methods[]) throws DipRejectAdditionException
There is a one-to-one mapping between the array of
listeners and
the methods parameter.
DipVetoableMethodListener[i] is used with
the Method corresponding to methods[i].
Obviously, the lengths of the two arrays are equal.
Because the dip may not care to listen to every general method call,
not every entry in the DipVetoableMethodListener array needs to
be set. A null
entry in
DipVetoableMethodListener[i] means there
is no listener for the corresponding general method in method[i].
Also, the dip may assign the same listener to more than one general
method call. Therefore, different entries in the
DipVetoableMethodListener array may point to the same listener.
null
if the dip supplies no
DipVetoableMethodListeners array;
otherwise, the array of listeners.
public abstract DipEventFireListener[] createEventFireListener(Object imp, String methods[]) throws DipRejectAdditionException
There is a one-to-one mapping between the array of
listeners and
the methods parameter.
DipEventFireListener[i] is used with
the Method corresponding to methods[i].
Obviously, the lengths of the two arrays are equal.
Because the dip may not care to listen to every event call method,
not every entry in the DipEventFireListener array needs to
be set. A null
entry in
DipEventFireListener[i] means there
is no listener for the corresponding event call in method[i].
Also, the dip may assign the same listener to more than one event
call method. Therefore, different entries in the DipEventFireListener
array may point to the same listener.
null
if the dip supplies no
DipEventFireListeners array;
otherwise, the array of listeners.
public abstract DipVetoableEventListener[] createVetoableEventListener(Object imp, String methods[]) throws DipRejectAdditionException
There is a one-to-one mapping between the array of
listeners and
the methods parameter.
DipVetoableEventListener[i] is used with
the Method corresponding to methods[i].
Obviously, the lengths of the two arrays are equal.
Because the dip may not care to listen to every event call method,
not every entry in the DipVetoableEventListener array needs to
be set. A null
entry in
DipVetoableEventListener[i] means there
is no listener for the corresponding event call in method[i].
Also, the dip may assign the same listener to more than one event
call method. Therefore, different entries in the
DipVetoableEventListener array may point to the same listener.
null
if the dip supplies no
DipVetoableEventListeners array;
otherwise, the array of listeners.
All Packages Class Hierarchy This Package Previous Next Index