|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jaxme.js.pattern.ChainGenerator
This class generates so-called event chains. A chain is an interface and an object implementing the interface. Internally the implementation is using a list of chained objects, which you can assume to implement the same interface.
Any event is passed to the first object in the list. The object may decide to resolve the event immediately and return. It may also call pass the event to the next object, take the returned value, possibly modify it and return the result. Finally, the chained object may decide to emit another event (which is passed along the same chain), and use the returned value.
Constructor Summary | |
ChainGenerator()
|
Method Summary | |
void |
finish()
|
JavaSource[] |
generate(JavaSourceFactory pFactory)
|
JavaQName |
getChainInterface()
Returns the interface being generated for the chain objects. |
java.lang.Class |
getControllerInterface()
Returns the controller interface. |
JavaQName |
getImplementationClass()
Returns the chain implementation classes name. |
JavaQName |
getProxyClass()
Returns the class being generated for the chain objects. |
void |
setChainInterface(JavaQName pInterface)
Sets the interface being generated for the chain objects. |
void |
setChainInterfaceName(java.lang.String pInterfaceName)
Sets the interface name being generated for the chain objects. |
void |
setControllerInterface(java.lang.Class pInterface)
Sets the controller interface. |
void |
setControllerInterfaceName(java.lang.String pInterfaceName)
Sets the controller interface name. |
void |
setImplementationClass(JavaQName pClassName)
Sets the chain implementation class. |
void |
setImplementationClassName(java.lang.String pClassName)
Sets the name of the chain implementation class. |
void |
setProxyClass(JavaQName pClassName)
Sets the class being generated for the chain objects. |
void |
setProxyClassName(java.lang.String pClassName)
Sets the class name being generated for the chain objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ChainGenerator()
Method Detail |
public void setControllerInterfaceName(java.lang.String pInterfaceName) throws java.lang.ClassNotFoundException
Sets the controller interface name. If the given class can
be resolved using Class.forName(pInterfaceName)
or Thread.currentThread().getContextClassLoader().loadClass(pInterfaceName)
,
then the method setChainInterface()
is invoked.
Otherwise a ClassNotFoundException
is thrown.
java.lang.ClassNotFoundException
public void setControllerInterface(java.lang.Class pInterface)
Sets the controller interface.
public java.lang.Class getControllerInterface()
Returns the controller interface.
public void setChainInterfaceName(java.lang.String pInterfaceName)
Sets the interface name being generated for the chain objects.
public void setChainInterface(JavaQName pInterface)
Sets the interface being generated for the chain objects.
public JavaQName getChainInterface()
Returns the interface being generated for the chain objects.
public void setProxyClassName(java.lang.String pClassName)
Sets the class name being generated for the chain objects.
public void setProxyClass(JavaQName pClassName)
Sets the class being generated for the chain objects.
public JavaQName getProxyClass()
Returns the class being generated for the chain objects. Defaults
to getChainInterface() + "Impl"
.
public void setImplementationClassName(java.lang.String pClassName)
Sets the name of the chain implementation class.
public void setImplementationClass(JavaQName pClassName)
Sets the chain implementation class.
public JavaQName getImplementationClass()
Returns the chain implementation classes name. Defaults to
getControllerInterface() + "Impl"
.
public void finish()
public JavaSource[] generate(JavaSourceFactory pFactory)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |