|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hdcookbook.grin.SEShowCommands
public class SEShowCommands
Represents the commands that are defined in-line in a show file. All of the commands are combined together into one command class that is included with the xlet. There's also a facility to make a different version of the commands class that can run under JavaSE during debugging.
For JavaSE, the SEShowCommands object emits a java source file. Ideally, you should generate this source file, compile it, then link GrinView against it, even if you're reading a source text file with GrinView. If you don't, it's OK: GrinView will provide a default command implementation that prints out the source of what would have been executed, rather than trying to run the command.
This class compiled from the source file that this class emits is pretty much a requirement to be present if your show includes any custom extension and executing a binary file, meanwhile. SEShowCommands generates some code to indicate how to instantiate custom extensions.
Method Summary | |
---|---|
SEShowCommand |
addNewCommand()
|
void |
appendXletClassBody(java.lang.String classBody)
|
java.lang.String |
getClassName()
|
java.lang.Class |
getCommandClass()
|
java.lang.String |
getGrinviewClassBody()
Returns grinview class body string. |
java.lang.String |
getJavaSource(boolean forXlet,
java.lang.String moreCode)
Get the java source for the class implementing this show's command. |
java.lang.String |
getOriginalSource()
|
java.lang.String |
getXletClassBody()
Returns xlet class body string. |
void |
setClassName(java.lang.String className)
Set the fully-qualified name of the class to generate for the xlet |
void |
setGrinviewClassBody(java.lang.String classBody)
Adds to the java source of the body of the class for the GrinView version. |
void |
setOriginalSource(java.lang.String originalSource)
|
void |
setXletClassBody(java.lang.String classBody)
Adds to the java source of the body of the class for the JavaSE version. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setClassName(java.lang.String className)
className
- The namepublic java.lang.Class getCommandClass()
public java.lang.String getClassName()
public SEShowCommand addNewCommand()
public void setGrinviewClassBody(java.lang.String classBody) throws java.io.IOException
classBody
-
java.io.IOException
- If there's an error, like the
absence of JAVA_COMMAND_BODYpublic java.lang.String getGrinviewClassBody()
public void setXletClassBody(java.lang.String classBody) throws java.io.IOException
classBody
-
java.io.IOException
- If there's an error, like the
absence of JAVA_COMMAND_BODYpublic java.lang.String getXletClassBody()
public void setOriginalSource(java.lang.String originalSource)
public java.lang.String getOriginalSource()
public void appendXletClassBody(java.lang.String classBody)
public java.lang.String getJavaSource(boolean forXlet, java.lang.String moreCode)
forXlet
- true if the code to emit is for the xlet to use, false
if it's meant for GrinView on big jdk to use.moreCode
- code to append to the end of the generated code.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |