public abstract class JRubyTransformer<T extends JRubyTransformer<T>> extends StringTransformer
Transformer implementations that use JRuby scripts.| Constructor and Description |
|---|
JRubyTransformer() |
| Modifier and Type | Method and Description |
|---|---|
T |
compatVersion(org.jruby.CompatVersion compatVersion)
Allows to customize the
CompatVersion used by the JRuby runtime. |
T |
compileMode(org.jruby.RubyInstanceConfig.CompileMode compileMode)
Allows to customize the
RubyInstanceConfig.CompileMode used by the JRuby runtime. |
abstract List<String> |
getLoadPaths()
Return the load paths to use for
ScriptingContainer.setLoadPaths(List). |
protected abstract Class<T> |
getTransformerType() |
protected abstract void |
prepareContainer(org.jruby.embed.ScriptingContainer container) |
abstract Object |
runScript(org.jruby.embed.ScriptingContainer container)
This method must perform the transformation using the supplied
ScriptingContainer. |
abstract T |
self()
Just returns the current object as the correct type for make the fluent builder work with subclasses.
|
String |
transform(HttpServletRewrite event,
String input) |
transformpublic abstract List<String> getLoadPaths()
ScriptingContainer.setLoadPaths(List).public abstract Object runScript(org.jruby.embed.ScriptingContainer container)
ScriptingContainer. The container is pre
initialized with a variable input which should be used by the script to perform the transformation.public abstract T self()
public final String transform(HttpServletRewrite event, String input)
transform in class StringTransformerprotected abstract void prepareContainer(org.jruby.embed.ScriptingContainer container)
public T compileMode(org.jruby.RubyInstanceConfig.CompileMode compileMode)
RubyInstanceConfig.CompileMode used by the JRuby runtime.public T compatVersion(org.jruby.CompatVersion compatVersion)
CompatVersion used by the JRuby runtime.Copyright © 2015 OCPsoft. All Rights Reserved.