|
JFCML - JFC/Swing
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metasolutions.jfcml.helpers.DocumentHandler
com.metasolutions.jfcml.script.JFCMLScript
public class JFCMLScript
JFCML's default script evaluation service.
Field Summary | |
---|---|
protected ReflectionHandler |
handler
The ReflectionHandler, used for various reflection oriented activities. |
protected StatementHandler |
statementHandler
The StatementHandler delegate. |
Fields inherited from class com.metasolutions.jfcml.helpers.DocumentHandler |
---|
windowContext |
Constructor Summary | |
---|---|
JFCMLScript(WindowContext windowContext,
ReflectionHandler handler)
Creates an instance of the JFCMLScript interpreter using the specified WindowContext. |
|
JFCMLScript(WindowContext context,
StatementHandler statementHandler,
ReflectionHandler reflectionHandler)
Creates an instance of the JFCMLScript interpreter using the specified WindowContext and StatementHandler. |
Method Summary | |
---|---|
void |
addStatementHandler(StatementHandler handler)
Adds a StatementHandler to the current chain. |
Object |
eval(String stmt)
Evaluates a statement using the JFCMLScript interpreter. |
Object |
get(String name)
Gets a variable. |
Class |
getArrayClass(String spec)
|
Object |
parseArray(Class cls,
String spec)
|
Object |
parseCast(String spec)
|
Object |
parseConstant(String spec)
|
Object |
parseConstructor(String spec)
|
Object |
parseConstructor(String clsname,
SimpleStack args)
|
Object |
parseMethod(String spec)
|
Object[] |
parseStatement(String stmt)
|
Object |
parseVariable(String s)
Parse a clear text statement representing some previously named variable, then find and return it. |
void |
set(String name,
Object var)
Sets a variable. |
void |
unset(String name)
Unsets a variable. |
Methods inherited from class com.metasolutions.jfcml.helpers.DocumentHandler |
---|
getWindowContext, setWindowContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected StatementHandler statementHandler
protected ReflectionHandler handler
Constructor Detail |
---|
public JFCMLScript(WindowContext windowContext, ReflectionHandler handler)
windowContext
- the WindowContext to use.public JFCMLScript(WindowContext context, StatementHandler statementHandler, ReflectionHandler reflectionHandler)
context
- the WindowContext to use.handler
- the StatementHandler to use.Method Detail |
---|
public Object eval(String stmt)
stmt
- the statement to evaluate.
public Object get(String name)
name
- the variable name.
public void set(String name, Object var)
name
- the variable name.var
- the variable.public void unset(String name)
name
- the variable name.public void addStatementHandler(StatementHandler handler)
statementHandler
- The statementHandler to add.public Object[] parseStatement(String stmt)
public Object parseCast(String spec)
spec
-
public Object parseVariable(String s)
variable('name') where name is the symbolic name previously given to the desired variable.
s
- Statement fragment to parse.
RuntimeException
- If the statment fragment was incorrectly formatted
NullPointerException
- If the statement fragment was absent.public Object parseConstant(String spec)
public Object parseConstructor(String spec)
public Object parseConstructor(String clsname, SimpleStack args)
public Class getArrayClass(String spec)
public Object parseArray(Class cls, String spec)
public Object parseMethod(String spec)
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |