|
org.openide.execution 1.8.22 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openide.ServiceType
org.openide.execution.ScriptType
public abstract class ScriptType
Base class for scripting interpreters.
| Nested Class Summary | |
|---|---|
static class |
ScriptType.Context
Scripting context. |
| Nested classes/interfaces inherited from class org.openide.ServiceType |
|---|
ServiceType.Handle, ServiceType.Registry |
| Field Summary |
|---|
| Fields inherited from class org.openide.ServiceType |
|---|
PROP_NAME |
| Constructor Summary | |
|---|---|
ScriptType()
|
|
| Method Summary | |
|---|---|
abstract boolean |
acceptFileObject(FileObject fo)
The script type can decide whether it will be able to execute the given file object. |
abstract void |
addVariable(String name,
Object value)
Adds variable with name to the variables known by the script type. |
Object |
eval(Reader r)
Calls eval(Reader, Context) with getDefaultContext() as the second argument. |
abstract Object |
eval(Reader r,
ScriptType.Context context)
Evaluate the script given in the form of a Reader. |
Object |
eval(String script)
Calls eval(String, Context) with getDefaultContext() as the second argument. |
abstract Object |
eval(String script,
ScriptType.Context context)
Evaluate the script given in the form of a string. |
void |
exec(Reader r)
Calls exec(Reader, Context) with getDefaultContext() as the second argument. |
abstract void |
exec(Reader r,
ScriptType.Context context)
Execute the script given in the form of a Reader. |
void |
exec(String script)
Calls exec(String, Context) with getDefaultContext() as the second argument. |
abstract void |
exec(String script,
ScriptType.Context context)
Execute the script given in the form of a string. |
static ScriptType |
find(Class clazz)
Deprecated. Please use Lookup instead. |
static ScriptType |
find(String name)
Find the script type with requested name. |
static ScriptType |
getDefault()
Deprecated. Probably meaningless, find all available types and filter with acceptFileObject(org.openide.filesystems.FileObject) instead. |
static Enumeration |
scriptTypes()
Deprecated. Please use Lookup instead. |
| Methods inherited from class org.openide.ServiceType |
|---|
addPropertyChangeListener, clone, createClone, displayName, firePropertyChange, getHelpCtx, getName, removePropertyChangeListener, setName |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScriptType()
| Method Detail |
|---|
public abstract boolean acceptFileObject(FileObject fo)
fo - a file to test
public abstract Object eval(Reader r, ScriptType.Context context) throws InvocationTargetException
r - context -
InvocationTargetExceptionpublic final Object eval(Reader r) throws InvocationTargetException
InvocationTargetExceptionpublic abstract Object eval(String script, ScriptType.Context context) throws InvocationTargetException
script - context -
InvocationTargetExceptionpublic final Object eval(String script) throws InvocationTargetException
InvocationTargetExceptionpublic abstract void exec(Reader r, ScriptType.Context context) throws InvocationTargetException
r - the contents of the scriptcontext - the context in which to evaluate it
InvocationTargetExceptionpublic final void exec(Reader r) throws InvocationTargetException
InvocationTargetExceptionpublic abstract void exec(String script, ScriptType.Context context) throws InvocationTargetException
script - context -
InvocationTargetExceptionpublic final void exec(String script) throws InvocationTargetException
InvocationTargetExceptionpublic abstract void addVariable(String name, Object value)
name - the name for the newly created variablevalue - initial value variable value (can be null).public static Enumeration scriptTypes()
Lookup instead.
ScriptTypespublic static ScriptType find(Class clazz)
Lookup instead.
clazz - the class of the script type looked for
null if it does not existpublic static ScriptType find(String name)
name - (display) name of script type to find
null if it does not existpublic static ScriptType getDefault()
acceptFileObject(org.openide.filesystems.FileObject) instead.
|
org.openide.execution 1.8.22 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||