|
||||||||||
| 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 JRubyInvokerpublic void setReader(java.io.Reader reader)
setReader in interface JRubyInvokerreader - public void setAssumeLoop(boolean assumeLoop)
setAssumeLoop in interface JRubyInvokerassumeLoop - public void setAssumePrintLoop(boolean assumePrintLoop)
setAssumePrintLoop in interface JRubyInvokerassumePrintLoop - public void setAutoSplit(boolean autoSplit)
setAutoSplit in interface JRubyInvokerautoSplit - public void setWarning(int warning)
setWarning in interface JRubyInvokerwarning - public void setDebug(boolean debug)
setDebug in interface JRubyInvokerdebug - public void setProcessLineEnds(boolean processLineEnds)
setProcessLineEnds in interface JRubyInvokerprocessLineEnds - public void setLibraryPaths(java.lang.String[] libPaths)
setLibraryPaths in interface JRubyInvokerlibPath - public void setRequires(java.lang.String[] reqLibs)
setRequires in interface JRubyInvokerreqLib -
public void putGlobal(java.lang.String key,
java.lang.Object value)
putGlobal in interface JRubyInvokerkey - 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 JRubyInvokerjava.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 JRubyInvokerstdout - 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 | |||||||||