public class RexxScriptEngineFactory
extends java.lang.Object
implements javax.script.ScriptEngineFactory
javax.script.ScriptEngineFactory
interface for the ooRexx support.Modifier and Type | Field and Description |
---|---|
static boolean |
bSay4Output
Field controls whether
getOutputStatement(String toDisplay) uses the
Rexx SAY (always appends a line-feed character) keyword statement
or the ooRexx .output monitor with the charOut method
(will output the string as is without appending anything). |
static RexxScriptEngineFactory |
DEFAULT_REXX_SCRIPT_ENGINE_FACTORY
If a RexxScriptEngine gets created directly, allow it to fetch an instance of the RexxScriptEngineFactory.
|
protected static java.lang.String |
ENGINE_NAME |
protected static java.lang.String |
ENGINE_VERSION |
protected static java.util.List<java.lang.String> |
EXTENSIONS |
protected static java.lang.String |
LANGUAGE_NAME |
protected static java.lang.String |
LANGUAGE_VERSION |
protected static java.util.List<java.lang.String> |
MIME_TYPES |
protected static java.util.List<java.lang.String> |
SCRIPT_ENGINE_SHORT_NAMES |
protected static java.lang.String |
SHORT_NAME |
protected static java.lang.String |
THREADING |
Constructor and Description |
---|
RexxScriptEngineFactory() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEngineName()
Returns the full name of the ScriptEngine.
|
java.lang.String |
getEngineVersion()
Returns the version of the ScriptEngine.
|
java.util.List<java.lang.String> |
getExtensions()
Returns an immutable list of filename extensions, which generally identify scripts written
in the language supported by this ScriptEngine.
|
static java.lang.String |
getGMTFormattedDateAsISO()
Utility method that creates and returns a GMT-based ISO date string.
|
java.lang.String |
getLanguageName()
Returns the name of the scripting langauge supported by this ScriptEngine.
|
java.lang.String |
getLanguageVersion()
Returns the version of the scripting language supported by this ScriptEngine.
|
java.lang.String |
getMethodCallSyntax(java.lang.String obj,
java.lang.String m,
java.lang.String... args)
Returns a String which can be used to invoke a method of a Java object using the
syntax of the supported scripting language.
|
java.util.List<java.lang.String> |
getMimeTypes()
Returns an immutable list of mimetypes, associated with scripts that can be executed by the engine.
|
java.lang.String |
getName()
Returns the short name of the scripting language supported by this ScriptEngine.
|
java.util.List<java.lang.String> |
getNames()
Returns an immutable list of short names for the ScriptEngine, which may be used to identify
the ScriptEngine by the ScriptEngineManager.
|
java.lang.String |
getOutputStatement(java.lang.String toDisplay)
Returns a String that can be used as a statement to display the specified String using
the syntax of the supported scripting language.
|
java.lang.Object |
getParameter(java.lang.String key)
Returns the value of an attribute whose meaning may be implementation-specific.
|
java.lang.String |
getProgram(java.lang.String... statements)
Returns a valid scripting language executable program with given statements.
|
javax.script.ScriptEngine |
getScriptEngine()
Creates and returns a new RexxScriptEngine instance.
|
static java.lang.String |
getStringLiteral(java.lang.String toDisplay)
Creates and returns a quoted Rexx string, with carriage return (CR) and
line-feed (LF) characters escaped as concatenated Rexx hex strings.
|
public static final RexxScriptEngineFactory DEFAULT_REXX_SCRIPT_ENGINE_FACTORY
protected static final java.lang.String ENGINE_NAME
protected static final java.lang.String ENGINE_VERSION
protected static final java.util.List<java.lang.String> EXTENSIONS
protected static final java.lang.String LANGUAGE_NAME
protected static java.lang.String LANGUAGE_VERSION
protected static final java.lang.String SHORT_NAME
protected static final java.util.List<java.lang.String> MIME_TYPES
protected static final java.util.List<java.lang.String> SCRIPT_ENGINE_SHORT_NAMES
protected static final java.lang.String THREADING
public static boolean bSay4Output
getOutputStatement(String toDisplay)
uses the
Rexx SAY
(always appends a line-feed character) keyword statement
or the ooRexx .output
monitor with the charOut
method
(will output the string as is without appending anything).
This field is set to true
by default causing the SAY
keyword statement to be used.public java.lang.String getEngineName()
getEngineName
in interface javax.script.ScriptEngineFactory
public java.lang.String getEngineVersion()
getEngineVersion
in interface javax.script.ScriptEngineFactory
public java.util.List<java.lang.String> getExtensions()
getExtensions
in interface javax.script.ScriptEngineFactory
public java.lang.String getLanguageName()
getLanguageName
in interface javax.script.ScriptEngineFactory
public java.lang.String getLanguageVersion()
getLanguageVersion
in interface javax.script.ScriptEngineFactory
public java.lang.String getName()
public java.lang.String getMethodCallSyntax(java.lang.String obj, java.lang.String m, java.lang.String... args)
getMethodCallSyntax
in interface javax.script.ScriptEngineFactory
obj
- - The name representing the object whose method is to be invoked.m
- - The name of the method to invoke.args
- - names of the arguments in the method call.public java.util.List<java.lang.String> getMimeTypes()
getMimeTypes
in interface javax.script.ScriptEngineFactory
public java.util.List<java.lang.String> getNames()
getNames
in interface javax.script.ScriptEngineFactory
public java.lang.String getOutputStatement(java.lang.String toDisplay)
bSay4Output
value controls whether SAY
(true
) or
.output~charOut
(false
) gets employed.getOutputStatement
in interface javax.script.ScriptEngineFactory
public static java.lang.String getStringLiteral(java.lang.String toDisplay)
toDisplay
- the string to encode as a Rexx string literal, if null then ".nil" gets returnedpublic java.lang.Object getParameter(java.lang.String key)
getParameter
in interface javax.script.ScriptEngineFactory
public java.lang.String getProgram(java.lang.String... statements)
getProgram
in interface javax.script.ScriptEngineFactory
public javax.script.ScriptEngine getScriptEngine()
getScriptEngine
in interface javax.script.ScriptEngineFactory
public static java.lang.String getGMTFormattedDateAsISO()