public class ScriptMixin extends Object implements InvocationHandler, ScriptReloadable, ScriptRedirect, ScriptAttributes, ScriptAttributes.All
ScriptAttributes.All| Constructor and Description |
|---|
ScriptMixin(PolygeneSPI spi,
Object thisComposite,
StateHolder state,
Layer layer,
Module module,
Application application) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(String name)
Fetch the value of the named attribute.
|
Object |
getEngineAttribute(String name) |
Object |
getGlobalAttribute(String name) |
Object |
invoke(Object proxy,
Method method,
Object[] objects) |
void |
reloadScript() |
void |
setEngineAttribute(String name,
Object value) |
void |
setGlobalAttribute(String name,
Object value) |
void |
setStdErr(Writer writer) |
void |
setStdIn(Reader reader) |
void |
setStdOut(Writer writer) |
public ScriptMixin(@Structure PolygeneSPI spi, @This Object thisComposite, @State StateHolder state, @Structure Layer layer, @Structure Module module, @Structure Application application)
public Object invoke(Object proxy, Method method, Object[] objects) throws Throwable
invoke in interface InvocationHandlerThrowablepublic void reloadScript()
reloadScript in interface ScriptReloadablepublic void setStdOut(Writer writer)
setStdOut in interface ScriptRedirectpublic void setStdErr(Writer writer)
setStdErr in interface ScriptRedirectpublic void setStdIn(Reader reader)
setStdIn in interface ScriptRedirectpublic Object getAttribute(String name)
ScriptAttributesIf the attribute name is found in ENGINE scope, it is returned. If it is not in the ENGINE scope, then the value is fetched from GLOBAL scope. If not present in either scope, NULL is returned.
getAttribute in interface ScriptAttributesname - The name of the attribute to get, or null if not found.public Object getEngineAttribute(String name)
getEngineAttribute in interface ScriptAttributes.Allpublic Object getGlobalAttribute(String name)
getGlobalAttribute in interface ScriptAttributes.Allpublic void setEngineAttribute(String name, Object value)
setEngineAttribute in interface ScriptAttributes.Allpublic void setGlobalAttribute(String name, Object value)
setGlobalAttribute in interface ScriptAttributes.All