|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDelegatingFactory
Defines a type of factory that can have delegate factories to help it create an appropriate instance type. The general contract for implementors is: 1) You must follow the isValidDelegate contract. 2) You should try to create an instance yourself and only delegate if cannot do it yourself. Deviations from this rule must be clearly documented to ensure clients understand how the factory works. Clients may NOT implement this interface. Extend AbstractDelegatingFactory instead.
Method Summary | |
---|---|
void |
addFactoryDelegate(IAdaptable delegate)
Adds delgate to the end of the list of factory delegates if the list does not already contain it. |
java.util.List<java.lang.Class> |
getValidDelegateTypes()
|
boolean |
isValidDelegate(IAdaptable delegate)
The return value of this method should conform to the following contract: Let v = getValidDelegates. |
boolean |
removeFactoryDelegate(IAdaptable delegate)
|
Method Detail |
---|
void addFactoryDelegate(IAdaptable delegate)
delegate
-
java.lang.ClassCastException
- if delegate does not implement an expected
interface. Each implementor can define what delegates are valid
based on the isValidDelegate() and getValidDelegates contractsboolean removeFactoryDelegate(IAdaptable delegate)
delegate
-
java.util.List<java.lang.Class> getValidDelegateTypes()
boolean isValidDelegate(IAdaptable delegate)
delegate
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |