|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.plexus.component.jruby.JRubyRuntimeInvoker
public class JRubyRuntimeInvoker
Constructor Summary | |
---|---|
JRubyRuntimeInvoker(org.codehaus.plexus.component.repository.ComponentDescriptor componentDescriptor,
org.codehaus.classworlds.ClassRealm classRealm)
Create a JRubyInvoker that runs under the context of this class loader. |
|
JRubyRuntimeInvoker(java.io.Reader scriptReader)
Create a reader JRubyInvoker that reads a JRuby script from the given reader. |
Method Summary | |
---|---|
java.lang.Object |
invoke()
Invokes the script after all other values are set. |
java.lang.Object |
invoke(java.io.OutputStream stdout,
java.io.OutputStream stderr)
Invokes the script after all other values are set. |
static void |
printREStackTrace(org.jruby.exceptions.RaiseException re,
java.io.OutputStream errStream)
|
void |
putGlobal(java.lang.String key,
java.lang.Object value)
Appends an input value with the given key to the Ruby script by prepending the following code to the Ruby script: $key = value; |
void |
setAssumeLoop(boolean assumeLoop)
As per the Ruby command line arg -n. |
void |
setAssumePrintLoop(boolean assumePrintLoop)
As per the Ruby command line arg -p. |
void |
setAutoSplit(boolean autoSplit)
As per the Ruby command line arg -a. |
void |
setCurrentDirectory(java.lang.String currentDirectory)
Sets the current running directory for JRuby. |
void |
setDebug(boolean debug)
As per the Ruby command line arg -d. |
void |
setLibraryPaths(java.lang.String[] libPaths)
Adds a library as per the Ruby command line arg -I. |
void |
setProcessLineEnds(boolean processLineEnds)
As per the Ruby command line arg -l. |
void |
setReader(java.io.Reader reader)
The sole way of sending a script to this invoker object. |
void |
setRequires(java.lang.String[] reqLibs)
Adds a 'require' file as per the Ruby command line arg -r. |
void |
setRuntime(org.jruby.Ruby runtime)
Not required, however if set, the invoker will tear down the runtime before exiting Invoke. |
void |
setWarning(int warning)
As per the Ruby command line arg -W#. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JRubyRuntimeInvoker(java.io.Reader scriptReader)
public JRubyRuntimeInvoker(org.codehaus.plexus.component.repository.ComponentDescriptor componentDescriptor, org.codehaus.classworlds.ClassRealm classRealm)
componentDescriptor
- classRealm
- Method Detail |
---|
public void setRuntime(org.jruby.Ruby runtime)
JRubyInvoker
setRuntime
in interface JRubyInvoker
public void setReader(java.io.Reader reader)
setReader
in interface JRubyInvoker
reader
- public void setAssumeLoop(boolean assumeLoop)
setAssumeLoop
in interface JRubyInvoker
assumeLoop
- public void setAssumePrintLoop(boolean assumePrintLoop)
setAssumePrintLoop
in interface JRubyInvoker
assumePrintLoop
- public void setAutoSplit(boolean autoSplit)
setAutoSplit
in interface JRubyInvoker
autoSplit
- public void setWarning(int warning)
setWarning
in interface JRubyInvoker
warning
- public void setDebug(boolean debug)
setDebug
in interface JRubyInvoker
debug
- public void setProcessLineEnds(boolean processLineEnds)
setProcessLineEnds
in interface JRubyInvoker
processLineEnds
- public void setLibraryPaths(java.lang.String[] libPaths)
setLibraryPaths
in interface JRubyInvoker
libPath
- public void setRequires(java.lang.String[] reqLibs)
setRequires
in interface JRubyInvoker
reqLib
- public void putGlobal(java.lang.String key, java.lang.Object value)
putGlobal
in interface JRubyInvoker
key
- value
- public void setCurrentDirectory(java.lang.String currentDirectory)
setCurrentDirectory
in interface JRubyInvoker
public java.lang.Object invoke() throws java.io.IOException, org.codehaus.plexus.component.factory.ComponentInstantiationException
invoke
in interface JRubyInvoker
java.io.IOException
org.codehaus.plexus.component.factory.ComponentInstantiationException
public java.lang.Object invoke(java.io.OutputStream stdout, java.io.OutputStream stderr) throws java.io.IOException, org.codehaus.plexus.component.factory.ComponentInstantiationException
invoke
in interface JRubyInvoker
stdout
- stream where jruby output tostderr
- stream where jruby errors to
java.io.IOException
org.codehaus.plexus.component.factory.ComponentInstantiationException
public static void printREStackTrace(org.jruby.exceptions.RaiseException re, java.io.OutputStream errStream)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |