public interface EmbedRubyInstanceConfigAdapter
Modifier and Type | Method and Description |
---|---|
String[] |
getArgv()
Returns an arguments' list.
|
ClassCache |
getClassCache()
Returns a ClassCache object that is tied to a class loader.
|
ClassLoader |
getClassLoader()
Returns a class loader object that is currently used.
|
CompatVersion |
getCompatVersion()
Returns a Ruby version currently chosen, which is one of CompatVersion.RUBY1_8,
CompatVersion.RUBY1_9, or CompatVersion.BOTH.
|
RubyInstanceConfig.CompileMode |
getCompileMode()
Returns a compile mode currently chosen, which is one of CompileMode.JIT,
CompileMode.FORCE, CompileMode.OFF.
|
String |
getCurrentDirectory()
Returns a current directory.
|
Map |
getEnvironment()
Returns a map of environment variables.
|
PrintStream |
getError()
Returns an error stream assigned to STDERR and $stderr.
|
String |
getHomeDirectory()
Returns a JRuby home directory.
|
InputStream |
getInput()
Returns an input stream assigned to STDIN and $stdin.
|
int |
getJitLogEvery()
Returns the value of n, which means that jitted methods are logged in
every n methods.
|
int |
getJitMax()
Returns a value of a max class cache size.
|
int |
getJitMaxSize()
Returns a value of a max size of the bytecode generated by compiler.
|
int |
getJitThreshold()
Returns a value of the threshold that determines whether jitted methods'
call reached to the limit or not.
|
KCode |
getKCode()
Returns a value of KCode currently used.
|
List<String> |
getLoadPaths()
Returns a list of load paths for Ruby scripts/libraries.
|
RubyInstanceConfig.LoadServiceCreator |
getLoadServiceCreator()
Returns a LoadServiceCreator currently used.
|
PrintStream |
getOutput()
Returns an output stream assigned to STDOUT and $stdout
|
Profile |
getProfile()
Returns a profiler currently used.
|
String |
getRecordSeparator()
Returns a record separator.
|
String |
getScriptFilename()
Returns a script filename to run.
|
String |
getSupportedRubyVersion()
Returns version information about JRuby and Ruby supported by this platform.
|
boolean |
isObjectSpaceEnabled()
Tests whether the Object Space is enabled or not.
|
boolean |
isRunRubyInProcess()
Tests whether Ruby runs in a process or not.
|
void |
setArgv(String[] argv)
Changes values of the arguments' list.
|
void |
setClassCache(ClassCache cache)
Changes a ClassCache object to a given one.
|
void |
setClassLoader(ClassLoader loader)
Changes a class loader to a given loader.
|
void |
setCompatVersion(CompatVersion version)
Changes a Ruby version to be evaluated into one of CompatVersion.RUBY1_8,
CompatVersion.RUBY1_9, or CompatVersion.BOTH.
|
void |
setCompileMode(RubyInstanceConfig.CompileMode mode)
Changes a compile mode to a given mode, which should be one of CompileMode.JIT,
CompileMode.FORCE, CompileMode.OFF.
|
void |
setCurrentDirectory(String directory)
Changes a current directory to a given directory.
|
void |
setEnvironment(Map environment)
Changes an environment variables' map.
|
void |
setError(PrintStream pstream)
Changes STDERR and $stderr to a gievn print stream.
|
void |
setError(Writer writer)
Changes STDERR and $stderr to a given writer.
|
void |
setHomeDirectory(String home)
Changes a JRuby home directroy to a directory of a given name.
|
void |
setInput(InputStream istream)
Changes STDIN and $stdin to a given input stream.
|
void |
setInput(Reader reader)
Changes STDIN and $stdin to a given reader.
|
void |
setJitLogEvery(int logEvery)
Changes a value of n, so that jitted methods are logged in every n methods.
|
void |
setJitMax(int max)
Changes a value of a max class cache size.
|
void |
setJitMaxSize(int maxSize)
Changes a value of a max size of the bytecode generated by compiler.
|
void |
setJitThreshold(int threshold)
Changes a value of the threshold that determines whether jitted methods'
call reached to the limit or not.
|
void |
setKCode(KCode kcode)
Changes a value of KCode to a given value.
|
void |
setLoadPaths(List<String> paths)
Changes a list of load paths Ruby scripts/libraries.
|
void |
setLoadServiceCreator(RubyInstanceConfig.LoadServiceCreator creator)
Changes a LoadServiceCreator to a given one.
|
void |
setObjectSpaceEnabled(boolean enable)
Changes the value to determine whether the Object Space is enabled or not.
|
void |
setOutput(PrintStream pstream)
Changes STDOUT and $stdout to a given output stream.
|
void |
setOutput(Writer writer)
Changes STDOUT and $stdout to a given writer.
|
void |
setProfile(Profile profile)
Changes a profiler to a given one.
|
void |
setRecordSeparator(String separator)
Changes a record separator to a given value.
|
void |
setRunRubyInProcess(boolean inprocess)
Changes the value to determine whether Ruby runs in a process or not.
|
void |
setScriptFilename(String filename)
Changes a script filename to run.
|
List<String> getLoadPaths()
void setLoadPaths(List<String> paths)
paths
- a new list of load paths.InputStream getInput()
void setInput(InputStream istream)
istream
- an input stream to be setvoid setInput(Reader reader)
reader
- a reader to be setPrintStream getOutput()
void setOutput(PrintStream pstream)
pstream
- an output stream to be setvoid setOutput(Writer writer)
writer
- a writer to be setPrintStream getError()
void setError(PrintStream pstream)
pstream
- a print stream to be setvoid setError(Writer writer)
writer
- a writer to be setRubyInstanceConfig.CompileMode getCompileMode()
void setCompileMode(RubyInstanceConfig.CompileMode mode)
mode
- compile modeboolean isRunRubyInProcess()
void setRunRubyInProcess(boolean inprocess)
inprocess
- true when Ruby is set to run in the process, or false not to
run in the process.CompatVersion getCompatVersion()
void setCompatVersion(CompatVersion version)
version
- a Ruby versionboolean isObjectSpaceEnabled()
void setObjectSpaceEnabled(boolean enable)
enable
- true to enable the Object Space, or false to disable.Map getEnvironment()
void setEnvironment(Map environment)
environment
- a new map of environment variables.String getCurrentDirectory()
void setCurrentDirectory(String directory)
directory
- a new directory to be set.String getHomeDirectory()
void setHomeDirectory(String home)
home
- a name of new JRuby home directory.ClassCache getClassCache()
void setClassCache(ClassCache cache)
cache
- a new ClassCache object to be set.ClassLoader getClassLoader()
void setClassLoader(ClassLoader loader)
loader
- a new class loader to be set.Profile getProfile()
void setProfile(Profile profile)
profile
- a new profiler to be set.RubyInstanceConfig.LoadServiceCreator getLoadServiceCreator()
void setLoadServiceCreator(RubyInstanceConfig.LoadServiceCreator creator)
creator
- a new LoadServiceCreatorString[] getArgv()
void setArgv(String[] argv)
argv
- a new arguments' list.String getScriptFilename()
void setScriptFilename(String filename)
filename
- a new script filename.String getRecordSeparator()
void setRecordSeparator(String separator)
separator
- a new record separator value, "0" or "777"KCode getKCode()
void setKCode(KCode kcode)
kcode
- a new KCode value.int getJitLogEvery()
void setJitLogEvery(int logEvery)
logEvery
- a new number of methods.int getJitThreshold()
void setJitThreshold(int threshold)
threshold
- a new value of the threshold.int getJitMax()
void setJitMax(int max)
max
- a new value of a max class cache size.int getJitMaxSize()
void setJitMaxSize(int maxSize)
maxSize
- a new value of a max size of the bytecode.String getSupportedRubyVersion()
Copyright © 2001-2013 JRuby. All Rights Reserved.