@Deprecated public abstract class ScriptType extends ServiceType
Modifier and Type | Class and Description |
---|---|
static class |
ScriptType.Context
Deprecated.
Scripting context.
|
ServiceType.Handle, ServiceType.Registry
PROP_NAME
Constructor and Description |
---|
ScriptType()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
acceptFileObject(FileObject fo)
Deprecated.
The script type can decide whether it will be able to execute
the given file object.
|
abstract void |
addVariable(String name,
Object value)
Deprecated.
Adds variable with name to the variables known by the script type.
|
Object |
eval(Reader r)
Deprecated.
Calls eval(Reader, Context) with getDefaultContext() as
the second argument.
|
abstract Object |
eval(Reader r,
ScriptType.Context context)
Deprecated.
Evaluate the script given in the form of a Reader.
|
Object |
eval(String script)
Deprecated.
Calls eval(String, Context) with getDefaultContext() as
the second argument.
|
abstract Object |
eval(String script,
ScriptType.Context context)
Deprecated.
Evaluate the script given in the form of a string.
|
void |
exec(Reader r)
Deprecated.
Calls exec(Reader, Context) with getDefaultContext() as
the second argument.
|
abstract void |
exec(Reader r,
ScriptType.Context context)
Deprecated.
Execute the script given in the form of a Reader.
|
void |
exec(String script)
Deprecated.
Calls exec(String, Context) with getDefaultContext() as
the second argument.
|
abstract void |
exec(String script,
ScriptType.Context context)
Deprecated.
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)
Deprecated.
Find the script type with requested name.
|
static ScriptType |
getDefault()
Deprecated.
Probably meaningless, find all available types and filter with
ScriptType.acceptFileObject(org.openide.filesystems.FileObject) instead. |
static Enumeration |
scriptTypes()
Deprecated.
Please use
Lookup instead. |
addPropertyChangeListener, clone, createClone, displayName, firePropertyChange, getHelpCtx, getName, removePropertyChangeListener, setName
public abstract boolean acceptFileObject(FileObject fo)
fo
- a file to testpublic abstract Object eval(Reader r, ScriptType.Context context) throws InvocationTargetException
r
- context
- InvocationTargetException
public final Object eval(Reader r) throws InvocationTargetException
InvocationTargetException
public abstract Object eval(String script, ScriptType.Context context) throws InvocationTargetException
script
- context
- InvocationTargetException
public final Object eval(String script) throws InvocationTargetException
InvocationTargetException
public abstract void exec(Reader r, ScriptType.Context context) throws InvocationTargetException
r
- the contents of the scriptcontext
- the context in which to evaluate itInvocationTargetException
public final void exec(Reader r) throws InvocationTargetException
InvocationTargetException
public abstract void exec(String script, ScriptType.Context context) throws InvocationTargetException
script
- context
- InvocationTargetException
public final void exec(String script) throws InvocationTargetException
InvocationTargetException
public 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.ScriptType
spublic static ScriptType find(Class clazz)
Lookup
instead.clazz
- the class of the script type looked fornull
if it does not existpublic static ScriptType find(String name)
name
- (display) name of script type to findnull
if it does not existpublic static ScriptType getDefault()
ScriptType.acceptFileObject(org.openide.filesystems.FileObject)
instead.