|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpu.patterns.factory.FactoryOptions
Used by clients of IPrototypeFactory
to pass options adjusting
its behavior.
Field Summary | |
boolean |
copy
|
boolean |
throwExc
|
java.lang.Object[] |
userdata
|
Constructor Summary | |
FactoryOptions()
|
Method Summary | |
java.lang.Object |
clone()
|
static FactoryOptions |
defaultIfNull(FactoryOptions o)
|
boolean |
getCopy()
|
boolean |
getThrowExc()
Returns the 'throwExc' attribute. |
java.lang.Object[] |
getUserData()
Returns the 'userData' attribute. |
static FactoryOptions |
makeNew(FactoryOptions o)
|
FactoryOptions |
setCopy(boolean b)
|
FactoryOptions |
setThrowExc(boolean b)
Sets the 'throwExc' attribute to the given value. |
FactoryOptions |
setUserData(java.lang.Object[] m)
Sets the 'userData' attribute to the given value. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public boolean copy
public boolean throwExc
public java.lang.Object[] userdata
Constructor Detail |
public FactoryOptions()
Method Detail |
public java.lang.Object clone()
public static FactoryOptions makeNew(FactoryOptions o)
public static FactoryOptions defaultIfNull(FactoryOptions o)
public FactoryOptions setCopy(boolean b)
public boolean getCopy()
public FactoryOptions setThrowExc(boolean b)
NoSuchPrototypeException
should be thrown if a prototype is requested by a key under which no
prototype has been registered. If this attribute is false
,
the method called to request the object will return null
instead of throwing an exception.
'throwExc' is true
by default.
public boolean getThrowExc()
setThrowExc(boolean)
.
public FactoryOptions setUserData(java.lang.Object[] m)
Object
's used to parameterize instantiations done by
the factory. These parameters are ignored by the classes in
org.jpu.patterns.factory
but may be referenced either
by strategies registered with the factory by clients, or by
subclasses that override method accepting a FactoryOptions
parameter.
Typically, 'userData' would be used in conjunction with
IPrototypeFactory.IInstantiator
's for prototype classes
whose constructors require one or more parameters.
'userData' is null
by default.
public java.lang.Object[] getUserData()
setUserData(java.lang.Object[])
.
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |