|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.Ruby
public final class Ruby
The Ruby object represents the top-level of a JRuby "instance" in a given VM. JRuby supports spawning multiple instances in the same JVM. Generally, objects created under these instances are tied to a given runtime, for such details as identity and type, because multiple Ruby instances means there are multiple instances of each class. This means that in multi-runtime mode (or really, multi-VM mode, where each JRuby instance is a ruby "VM"), objects generally can't be transported across runtimes without marshaling. This class roots everything that makes the JRuby runtime function, and provides a number of utility methods for constructing global types and accessing global runtime structures.
Nested Class Summary | |
---|---|
class |
Ruby.CallTraceFuncHook
|
static class |
Ruby.DaemonThreadFactory
A ThreadFactory for when we're using pooled threads; we want to create the threads with daemon = true so they don't keep us from shutting down. |
Field Summary | |
---|---|
RubyFixnum[] |
fixnumCache
|
static boolean |
RUNTIME_THREADLOCAL
|
Method Summary | |
---|---|
void |
addEventHook(EventHook hook)
|
void |
addFinalizer(Finalizable finalizer)
|
void |
addInternalFinalizer(Finalizable finalizer)
|
int |
allocModuleId()
|
int |
allocSymbolId()
|
CallbackFactory |
callbackFactory(java.lang.Class<?> type)
|
void |
callEventHooks(ThreadContext context,
int event,
java.lang.String file,
int line,
java.lang.String name,
IRubyObject type)
|
void |
checkSafeString(IRubyObject object)
|
void |
compileAndLoadFile(java.lang.String filename,
java.io.InputStream in,
boolean wrap)
|
RubyClass |
defineClass(java.lang.String name,
RubyClass superClass,
ObjectAllocator allocator)
Define a new class under the Object namespace. |
RubyClass |
defineClassUnder(java.lang.String name,
RubyClass superClass,
ObjectAllocator allocator,
RubyModule parent)
Define a new class with the given name under the given module or class namespace. |
void |
defineGlobalConstant(java.lang.String name,
IRubyObject value)
rb_define_global_const |
RubyModule |
defineModule(java.lang.String name)
Define a new module under the Object namespace. |
RubyModule |
defineModuleUnder(java.lang.String name,
RubyModule parent)
Define a new module with the given name under the given module or class namespace. |
void |
defineReadonlyVariable(java.lang.String name,
IRubyObject value)
defines a readonly global variable |
void |
defineVariable(GlobalVariable variable)
Defines a global variable |
IRubyObject |
evalScriptlet(java.lang.String script)
Evaluates a script under the current scope (perhaps the top-level scope) and returns the result (generally the last value calculated). |
IRubyObject |
executeScript(java.lang.String script,
java.lang.String filename)
Parse and execute the specified script This differs from the other methods in that it accepts a string-based script and parses and runs it as though it were loaded at a command-line. |
RubyClass |
fastGetClass(java.lang.String internedName)
Retrieve the class with the given name from the Object namespace. |
RubyModule |
fastGetModule(java.lang.String internedName)
Retrieve the module with the given name from the Object namespace. |
RubySymbol |
fastNewSymbol(java.lang.String internedName)
Faster than newSymbol(String) if you already have an interned
name String. |
RubyClass |
getArray()
|
RubyClass |
getBignum()
|
RubyClass |
getBinding()
|
CacheMap |
getCacheMap()
Retrieve mappings of cached methods to where they have been cached. |
RubyClass |
getClass(java.lang.String name)
Retrieve the class with the given name from the Object namespace. |
RubyClass |
getClassClass()
|
RubyModule |
getClassFromPath(java.lang.String path)
|
RubyModule |
getComparable()
|
RubyClass |
getContinuation()
|
ThreadContext |
getCurrentContext()
|
java.lang.String |
getCurrentDirectory()
|
static Ruby |
getCurrentInstance()
|
IRubyObject |
getDebug()
Getter for property isDebug. |
static Ruby |
getDefaultInstance()
Deprecated. use #newInstance() |
java.util.Map<java.lang.Integer,java.lang.ref.WeakReference<ChannelDescriptor>> |
getDescriptors()
|
RubyClass |
getDir()
|
RubyClass |
getDummy()
|
RubyModule |
getEnumerable()
|
java.io.PrintStream |
getErr()
|
RubyClass |
getErrno(int n)
|
java.io.PrintStream |
getErrorStream()
|
RubyModule |
getEtc()
|
RubyClass |
getException()
|
java.util.concurrent.ExecutorService |
getExecutor()
|
RubyBoolean |
getFalse()
Returns the "false" instance from the instance pool. |
RubyClass |
getFalseClass()
|
RubyClass |
getFile()
|
RubyClass |
getFileStat()
|
RubyModule |
getFileTest()
|
RubyClass |
getFixnum()
|
RubyClass |
getFloat()
|
RubyModule |
getGC()
|
long |
getGlobalState()
GET_VM_STATE_VERSION |
GlobalVariables |
getGlobalVariables()
|
IRubyObject |
getGroupStruct()
|
RubyClass |
getHash()
|
java.io.InputStream |
getIn()
|
java.io.InputStream |
getInputStream()
|
RubyInstanceConfig |
getInstanceConfig()
|
RubyClass |
getInteger()
|
RubyClass |
getIO()
|
JavaSupport |
getJavaSupport()
|
java.util.Set<Script> |
getJittedMethods()
|
JRubyClassLoader |
getJRubyClassLoader()
|
java.lang.String |
getJRubyHome()
|
KCode |
getKCode()
|
RubyModule |
getKernel()
|
LoadService |
getLoadService()
Returns the loadService. |
RubyModule |
getMarshal()
|
RubyClass |
getMatchData()
|
RubyModule |
getMath()
|
RubyClass |
getMethod()
|
RubyClass |
getModule()
|
RubyModule |
getModule(java.lang.String name)
Retrieve the module with the given name from the Object namespace. |
IRubyObject |
getNil()
Returns the "nil" singleton instance. |
RubyClass |
getNilClass()
|
RubyClass |
getNumeric()
|
RubyClass |
getObject()
|
ObjectSpace |
getObjectSpace()
|
RubyModule |
getObjectSpaceModule()
|
java.lang.Object |
getObjectToYamlMethod()
|
RubyModule |
getOrCreateModule(java.lang.String name)
From Object, retrieve the named module. |
java.io.PrintStream |
getOut()
|
java.io.PrintStream |
getOutputStream()
|
IRubyObject |
getPasswdStruct()
|
POSIX |
getPosix()
|
RubyModule |
getPrecision()
|
RubyClass |
getProc()
|
RubyModule |
getProcess()
|
RubyModule |
getProcGID()
|
RubyClass |
getProcStatus()
|
RubyModule |
getProcSysModule()
|
RubyModule |
getProcUID()
|
Profile |
getProfile()
|
java.util.Random |
getRandom()
|
long |
getRandomSeed()
|
RubyClass |
getRange()
|
GlobalVariable |
getRecordSeparatorVar()
|
RubyClass |
getRegexp()
|
int |
getSafeLevel()
Retrieve the current safe level. |
int |
getStackTraces()
|
RubyClass |
getStandardError()
|
long |
getStartTime()
|
RubyClass |
getString()
|
RubyClass |
getStructClass()
|
RubyClass |
getSymbol()
|
RubySymbol.SymbolTable |
getSymbolTable()
|
RubyClass |
getThread()
|
RubyClass |
getThreadGroup()
|
ThreadService |
getThreadService()
|
RubyClass |
getTime()
|
IRubyObject |
getTmsStruct()
|
IRubyObject |
getTopSelf()
Getter for property rubyTopSelf. |
RubyBoolean |
getTrue()
Returns the "true" instance from the instance pool. |
RubyClass |
getTrueClass()
|
RubyClass |
getUnboundMethod()
|
IRubyObject |
getVerbose()
Getter for property isVerbose. |
RubyWarnings |
getWarnings()
|
boolean |
hasEventHooks()
|
void |
incGlobalState()
INC_VM_STATE_VERSION |
long |
incrementRandomSeedSequence()
|
boolean |
isClassDefined(java.lang.String name)
|
boolean |
isDoNotReverseLookupEnabled()
|
boolean |
isGlobalAbortOnExceptionEnabled()
|
boolean |
isInspecting(java.lang.Object obj)
|
boolean |
isObjectSpaceEnabled()
|
static boolean |
isSecurityRestricted()
|
void |
loadFile(java.lang.String scriptName,
java.io.InputStream in,
boolean wrap)
|
void |
loadScript(Script script)
|
RaiseException |
newArgumentError(int got,
int expected)
|
RaiseException |
newArgumentError(java.lang.String message)
|
RubyArray |
newArray()
|
RubyArray |
newArray(int size)
|
RubyArray |
newArray(IRubyObject object)
|
RubyArray |
newArray(IRubyObject[] objects)
|
RubyArray |
newArray(IRubyObject car,
IRubyObject cdr)
|
RubyArray |
newArray(java.util.List<IRubyObject> list)
|
RubyArray |
newArrayLight()
|
RubyArray |
newArrayNoCopy(IRubyObject[] objects)
|
RubyArray |
newArrayNoCopyLight(IRubyObject[] objects)
|
RubyBinding |
newBinding()
|
RubyBinding |
newBinding(Binding binding)
|
RubyBoolean |
newBoolean(boolean value)
|
RubyArray |
newEmptyArray()
|
RaiseException |
newEOFError()
|
RaiseException |
newEOFError(java.lang.String message)
|
RaiseException |
newErrnoEACCESError(java.lang.String message)
|
RaiseException |
newErrnoEADDRINUSEError()
|
RaiseException |
newErrnoEAGAINError(java.lang.String message)
|
RaiseException |
newErrnoEBADFError()
|
RaiseException |
newErrnoEBADFError(java.lang.String message)
|
RaiseException |
newErrnoECHILDError()
|
RaiseException |
newErrnoECONNREFUSEDError()
|
RaiseException |
newErrnoEDOMError(java.lang.String message)
|
RaiseException |
newErrnoEEXISTError(java.lang.String message)
|
RaiseException |
newErrnoEINVALError()
|
RaiseException |
newErrnoEINVALError(java.lang.String message)
|
RaiseException |
newErrnoEISDirError()
|
RaiseException |
newErrnoENOENTError()
|
RaiseException |
newErrnoENOENTError(java.lang.String message)
|
RaiseException |
newErrnoENOPROTOOPTError()
|
RaiseException |
newErrnoENOTDIRError(java.lang.String message)
|
RaiseException |
newErrnoEPIPEError()
|
RaiseException |
newErrnoESPIPEError()
|
RaiseException |
newErrnoESPIPEError(java.lang.String message)
|
RubyFileStat |
newFileStat(java.io.FileDescriptor descriptor)
|
RubyFileStat |
newFileStat(java.lang.String filename,
boolean lstat)
|
RubyFixnum |
newFixnum(long value)
|
RubyFloat |
newFloat(double value)
|
RaiseException |
newFloatDomainError(java.lang.String message)
|
RaiseException |
newFrozenError(java.lang.String objectType)
|
RaiseException |
newIndexError(java.lang.String message)
|
static Ruby |
newInstance()
Returns a new instance of the JRuby runtime configured with defaults. |
static Ruby |
newInstance(java.io.InputStream in,
java.io.PrintStream out,
java.io.PrintStream err)
Returns a new instance of the JRuby runtime configured with the given input, output and error streams and otherwise default configuration (except where specified system properties alter defaults). |
static Ruby |
newInstance(RubyInstanceConfig config)
Returns a new instance of the JRuby runtime configured as specified. |
RaiseException |
newInvalidEncoding(java.lang.String message)
|
RaiseException |
newIOError(java.lang.String message)
|
RaiseException |
newIOErrorFromException(java.io.IOException ioe)
|
RaiseException |
newLoadError(java.lang.String message)
|
RaiseException |
newLocalJumpError(java.lang.String reason,
IRubyObject exitValue,
java.lang.String message)
|
RaiseException |
newNameError(java.lang.String message,
java.lang.String name)
|
RaiseException |
newNameError(java.lang.String message,
java.lang.String name,
java.lang.Throwable origException)
|
RaiseException |
newNameError(java.lang.String message,
java.lang.String name,
java.lang.Throwable origException,
boolean printWhenVerbose)
|
RaiseException |
newNoMethodError(java.lang.String message,
java.lang.String name,
IRubyObject args)
|
RaiseException |
newNotImplementedError(java.lang.String message)
|
RubyNumeric |
newNumeric()
|
RubyProc |
newProc(Block.Type type,
Block block)
|
RaiseException |
newRangeError(java.lang.String message)
|
RaiseException |
newRedoLocalJumpError()
|
RaiseException |
newRegexpError(java.lang.String message)
|
RaiseException |
newRuntimeError(java.lang.String message)
|
RaiseException |
newSecurityError(java.lang.String message)
|
RaiseException |
newStandardError(java.lang.String message)
|
RubyString |
newString()
|
RubyString |
newString(ByteList byteList)
|
RubyString |
newString(java.lang.String string)
|
RubyString |
newStringShared(ByteList byteList)
|
RubySymbol |
newSymbol(java.lang.String name)
|
RaiseException |
newSyntaxError(java.lang.String message)
|
RaiseException |
newSystemCallError(java.lang.String message)
|
RaiseException |
newSystemExit(int status)
|
RaiseException |
newSystemStackError(java.lang.String message)
|
RaiseException |
newThreadError(java.lang.String message)
|
RubyTime |
newTime(long milliseconds)
|
RaiseException |
newTypeError(IRubyObject receivedObject,
RubyClass expectedType)
|
RaiseException |
newTypeError(java.lang.String message)
|
RaiseException |
newZeroDivisionError()
|
Node |
parse(ByteList content,
java.lang.String file,
DynamicScope scope,
int lineNumber,
boolean extraPositionInformation)
|
Node |
parse(java.lang.String content,
java.lang.String file,
DynamicScope scope,
int lineNumber,
boolean extraPositionInformation)
|
Node |
parseEval(ByteList content,
java.lang.String file,
DynamicScope scope,
int lineNumber)
|
Node |
parseEval(java.lang.String content,
java.lang.String file,
DynamicScope scope,
int lineNumber)
|
Node |
parseFile(java.io.InputStream in,
java.lang.String file,
DynamicScope scope)
|
Node |
parseFromMain(java.io.InputStream inputStream,
java.lang.String filename)
Parse the script contained in the given input stream, using the given filename as the name of the script, and return the root Node. |
Node |
parseInline(java.io.InputStream in,
java.lang.String file,
DynamicScope scope)
|
void |
printError(RubyException excp)
Prints an error with backtrace to the error stream. |
IRubyObject |
pushExitBlock(RubyProc proc)
Push block onto exit stack. |
void |
registerInspecting(java.lang.Object obj)
|
void |
removeEventHook(EventHook hook)
|
void |
removeFinalizer(Finalizable finalizer)
|
void |
removeInternalFinalizer(Finalizable finalizer)
|
void |
runFromMain(java.io.InputStream inputStream,
java.lang.String filename)
Run the script contained in the specified input stream, using the specified filename as the name of the script being executed. |
IRubyObject |
runNormally(Node scriptNode,
boolean yarvCompile)
Run the specified script without any of the loop-processing wrapper code. |
IRubyObject |
runWithGetsLoop(Node scriptNode,
boolean printing,
boolean processLineEnds,
boolean split,
boolean yarvCompile)
Run the given script with a "while gets; end" loop wrapped around it. |
void |
secure(int level)
|
void |
setCurrentDirectory(java.lang.String dir)
|
static void |
setCurrentInstance(Ruby runtime)
|
void |
setDebug(IRubyObject debug)
Setter for property isDebug. |
void |
setDoNotReverseLookupEnabled(boolean b)
|
void |
setEtc(RubyModule etcModule)
|
void |
setGlobalAbortOnExceptionEnabled(boolean enable)
|
void |
setGlobalVariables(GlobalVariables globalVariables)
|
void |
setJRubyHome(java.lang.String home)
|
void |
setKCode(KCode kcode)
|
void |
setRandomSeed(long randomSeed)
|
void |
setRecordSeparatorVar(GlobalVariable recordSeparatorVar)
|
void |
setSafeLevel(int safeLevel)
Set the current safe level: 0 - strings from streams/environment/ARGV are tainted (default) 1 - no dangerous operation by tainted value 2 - process/file operations prohibited 3 - all generated objects are tainted 4 - no global (non-tainted) variable modification/no direct output The safe level is set using $SAFE in Ruby code. |
static void |
setSecurityRestricted(boolean restricted)
|
void |
setStackTraces(int stackTraces)
|
void |
setTraceFunction(RubyProc traceFunction)
|
void |
setVerbose(IRubyObject verbose)
Setter for property isVerbose. |
void |
tearDown()
Make sure Kernel#at_exit procs get invoked on runtime shutdown. |
void |
unregisterInspecting(java.lang.Object obj)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean RUNTIME_THREADLOCAL
public final RubyFixnum[] fixnumCache
Method Detail |
---|
public static Ruby newInstance()
RubyInstanceConfig
public static Ruby newInstance(RubyInstanceConfig config)
config
- The instance configuration
RubyInstanceConfig
public static Ruby newInstance(java.io.InputStream in, java.io.PrintStream out, java.io.PrintStream err)
in
- the custom input streamout
- the custom output streamerr
- the custom error stream
RubyInstanceConfig
public IRubyObject evalScriptlet(java.lang.String script)
script
- The scriptlet to runpublic IRubyObject executeScript(java.lang.String script, java.lang.String filename)
script
- The contents of the script to run as a normal, root script
public void runFromMain(java.io.InputStream inputStream, java.lang.String filename)
inputStream
- The InputStream from which to read the script contentsfilename
- The filename to use when parsing, and for $PROGRAM_NAME
and $0 ruby global variables.public Node parseFromMain(java.io.InputStream inputStream, java.lang.String filename)
inputStream
- The input stream from which to read the scriptfilename
- The filename to use for parsingpublic IRubyObject runWithGetsLoop(Node scriptNode, boolean printing, boolean processLineEnds, boolean split, boolean yarvCompile)
scriptNode
- The root node of the script to executeprinting
- Whether $_ should be printed after each loop (as in the
-p command-line flag)processLineEnds
- Whether line endings should be processed by
setting $\ to $/ and chop!
ing every line readsplit
- Whether to split each line read using String#split
yarvCompile
- Whether to compile the target script to YARV (Ruby 1.9)
bytecode before executing.
public IRubyObject runNormally(Node scriptNode, boolean yarvCompile)
scriptNode
- The root node of the script to be executedyarvCompile
- Whether to compile the script to YARV (Ruby 1.9)
bytecode before execution
public static Ruby getDefaultInstance()
public static Ruby getCurrentInstance()
public static void setCurrentInstance(Ruby runtime)
public int allocSymbolId()
public int allocModuleId()
public RubyModule getModule(java.lang.String name)
name
- The name of the module
public RubyModule fastGetModule(java.lang.String internedName)
internedName
- The name of the module; must be an interned String
public RubyClass getClass(java.lang.String name)
name
- The name of the class
public RubyClass fastGetClass(java.lang.String internedName)
internedName
- the name of the class; must be an interned String!
public RubyClass defineClass(java.lang.String name, RubyClass superClass, ObjectAllocator allocator)
name
- The name for the new classsuperClass
- The super class for the new classallocator
- An ObjectAllocator instance that can construct
instances of the new class.
public RubyClass defineClassUnder(java.lang.String name, RubyClass superClass, ObjectAllocator allocator, RubyModule parent)
name
- The name for the new classsuperClass
- The super class for the new classallocator
- An ObjectAllocator instance that can construct
instances of the new class.parent
- The namespace under which to define the new class
public RubyModule defineModule(java.lang.String name)
name
- The name of the new modulepublic RubyModule defineModuleUnder(java.lang.String name, RubyModule parent)
name
- The name of the new moduleparent
- The class or module namespace under which to define the
modulepublic RubyModule getOrCreateModule(java.lang.String name)
name
- The name of the modulepublic int getSafeLevel()
org.jruby.Ruby#setSaveLevel
public void setSafeLevel(int safeLevel)
public KCode getKCode()
public void setKCode(KCode kcode)
public void secure(int level)
public void checkSafeString(IRubyObject object)
public void defineGlobalConstant(java.lang.String name, IRubyObject value)
public boolean isClassDefined(java.lang.String name)
public RubyClass getErrno(int n)
public java.lang.Object getObjectToYamlMethod()
public CacheMap getCacheMap()
public IRubyObject getTopSelf()
public void setCurrentDirectory(java.lang.String dir)
public java.lang.String getCurrentDirectory()
public RubyModule getEtc()
public void setEtc(RubyModule etcModule)
public RubyClass getObject()
public RubyClass getModule()
public RubyClass getClassClass()
public RubyModule getKernel()
public RubyClass getDummy()
public RubyModule getComparable()
public RubyClass getNumeric()
public RubyClass getFloat()
public RubyClass getInteger()
public RubyClass getFixnum()
public RubyModule getEnumerable()
public RubyClass getString()
public RubyClass getSymbol()
public RubyClass getArray()
public RubyClass getHash()
public RubyClass getRange()
public RubyBoolean getTrue()
public RubyBoolean getFalse()
public IRubyObject getNil()
public RubyClass getNilClass()
public RubyClass getTrueClass()
public RubyClass getFalseClass()
public RubyClass getProc()
public RubyClass getBinding()
public RubyClass getMethod()
public RubyClass getUnboundMethod()
public RubyClass getMatchData()
public RubyClass getRegexp()
public RubyClass getTime()
public RubyModule getMath()
public RubyModule getMarshal()
public RubyClass getBignum()
public RubyClass getDir()
public RubyClass getFile()
public RubyClass getFileStat()
public RubyModule getFileTest()
public RubyClass getIO()
public RubyClass getThread()
public RubyClass getThreadGroup()
public RubyClass getContinuation()
public RubyClass getStructClass()
public IRubyObject getTmsStruct()
public IRubyObject getPasswdStruct()
public IRubyObject getGroupStruct()
public RubyModule getGC()
public RubyModule getObjectSpaceModule()
public RubyModule getProcess()
public RubyClass getProcStatus()
public RubyModule getProcUID()
public RubyModule getProcGID()
public RubyModule getProcSysModule()
public RubyModule getPrecision()
public RubyClass getException()
public RubyClass getStandardError()
public IRubyObject getVerbose()
public void setVerbose(IRubyObject verbose)
verbose
- New value of property isVerbose.public IRubyObject getDebug()
public void setDebug(IRubyObject debug)
debug
- New value of property isDebug.public JavaSupport getJavaSupport()
public JRubyClassLoader getJRubyClassLoader()
public void defineVariable(GlobalVariable variable)
public void defineReadonlyVariable(java.lang.String name, IRubyObject value)
public Node parseFile(java.io.InputStream in, java.lang.String file, DynamicScope scope)
public Node parseInline(java.io.InputStream in, java.lang.String file, DynamicScope scope)
public Node parseEval(java.lang.String content, java.lang.String file, DynamicScope scope, int lineNumber)
public Node parse(java.lang.String content, java.lang.String file, DynamicScope scope, int lineNumber, boolean extraPositionInformation)
public Node parseEval(ByteList content, java.lang.String file, DynamicScope scope, int lineNumber)
public Node parse(ByteList content, java.lang.String file, DynamicScope scope, int lineNumber, boolean extraPositionInformation)
public ThreadService getThreadService()
public ThreadContext getCurrentContext()
public LoadService getLoadService()
public RubyWarnings getWarnings()
public java.io.PrintStream getErrorStream()
public java.io.InputStream getInputStream()
public java.io.PrintStream getOutputStream()
public RubyModule getClassFromPath(java.lang.String path)
public void printError(RubyException excp)
public void loadFile(java.lang.String scriptName, java.io.InputStream in, boolean wrap)
public void compileAndLoadFile(java.lang.String filename, java.io.InputStream in, boolean wrap)
public void loadScript(Script script)
public void addEventHook(EventHook hook)
public void removeEventHook(EventHook hook)
public void setTraceFunction(RubyProc traceFunction)
public void callEventHooks(ThreadContext context, int event, java.lang.String file, int line, java.lang.String name, IRubyObject type)
public boolean hasEventHooks()
public GlobalVariables getGlobalVariables()
public void setGlobalVariables(GlobalVariables globalVariables)
public CallbackFactory callbackFactory(java.lang.Class<?> type)
public IRubyObject pushExitBlock(RubyProc proc)
public void addInternalFinalizer(Finalizable finalizer)
public void addFinalizer(Finalizable finalizer)
public void removeInternalFinalizer(Finalizable finalizer)
public void removeFinalizer(Finalizable finalizer)
public void tearDown()
public RubyArray newEmptyArray()
public RubyArray newArray()
public RubyArray newArrayLight()
public RubyArray newArray(IRubyObject object)
public RubyArray newArray(IRubyObject car, IRubyObject cdr)
public RubyArray newArray(IRubyObject[] objects)
public RubyArray newArrayNoCopy(IRubyObject[] objects)
public RubyArray newArrayNoCopyLight(IRubyObject[] objects)
public RubyArray newArray(java.util.List<IRubyObject> list)
public RubyArray newArray(int size)
public RubyBoolean newBoolean(boolean value)
public RubyFileStat newFileStat(java.lang.String filename, boolean lstat)
public RubyFileStat newFileStat(java.io.FileDescriptor descriptor)
public RubyFixnum newFixnum(long value)
public RubyFloat newFloat(double value)
public RubyNumeric newNumeric()
public RubyProc newProc(Block.Type type, Block block)
public RubyBinding newBinding()
public RubyBinding newBinding(Binding binding)
public RubyString newString()
public RubyString newString(java.lang.String string)
public RubyString newString(ByteList byteList)
public RubyString newStringShared(ByteList byteList)
public RubySymbol newSymbol(java.lang.String name)
public RubySymbol fastNewSymbol(java.lang.String internedName)
newSymbol(String)
if you already have an interned
name String. Don't intern your string just to call this version - the
overhead of interning will more than wipe out any benefit from the faster
lookup.
internedName
- the symbol name, must be interned! if in
doubt, call newSymbol(String)
instead.
public RubyTime newTime(long milliseconds)
public RaiseException newRuntimeError(java.lang.String message)
public RaiseException newArgumentError(java.lang.String message)
public RaiseException newArgumentError(int got, int expected)
public RaiseException newErrnoEBADFError()
public RaiseException newErrnoENOPROTOOPTError()
public RaiseException newErrnoEPIPEError()
public RaiseException newErrnoECONNREFUSEDError()
public RaiseException newErrnoEADDRINUSEError()
public RaiseException newErrnoEINVALError()
public RaiseException newErrnoENOENTError()
public RaiseException newErrnoEACCESError(java.lang.String message)
public RaiseException newErrnoEAGAINError(java.lang.String message)
public RaiseException newErrnoEISDirError()
public RaiseException newErrnoESPIPEError()
public RaiseException newErrnoEBADFError(java.lang.String message)
public RaiseException newErrnoEINVALError(java.lang.String message)
public RaiseException newErrnoENOTDIRError(java.lang.String message)
public RaiseException newErrnoENOENTError(java.lang.String message)
public RaiseException newErrnoESPIPEError(java.lang.String message)
public RaiseException newErrnoEEXISTError(java.lang.String message)
public RaiseException newErrnoEDOMError(java.lang.String message)
public RaiseException newErrnoECHILDError()
public RaiseException newIndexError(java.lang.String message)
public RaiseException newSecurityError(java.lang.String message)
public RaiseException newSystemCallError(java.lang.String message)
public RaiseException newTypeError(java.lang.String message)
public RaiseException newThreadError(java.lang.String message)
public RaiseException newSyntaxError(java.lang.String message)
public RaiseException newRegexpError(java.lang.String message)
public RaiseException newRangeError(java.lang.String message)
public RaiseException newNotImplementedError(java.lang.String message)
public RaiseException newInvalidEncoding(java.lang.String message)
public RaiseException newNoMethodError(java.lang.String message, java.lang.String name, IRubyObject args)
public RaiseException newNameError(java.lang.String message, java.lang.String name)
public RaiseException newNameError(java.lang.String message, java.lang.String name, java.lang.Throwable origException)
public RaiseException newNameError(java.lang.String message, java.lang.String name, java.lang.Throwable origException, boolean printWhenVerbose)
public RaiseException newLocalJumpError(java.lang.String reason, IRubyObject exitValue, java.lang.String message)
public RaiseException newRedoLocalJumpError()
public RaiseException newLoadError(java.lang.String message)
public RaiseException newFrozenError(java.lang.String objectType)
public RaiseException newSystemStackError(java.lang.String message)
public RaiseException newSystemExit(int status)
public RaiseException newIOError(java.lang.String message)
public RaiseException newStandardError(java.lang.String message)
public RaiseException newIOErrorFromException(java.io.IOException ioe)
public RaiseException newTypeError(IRubyObject receivedObject, RubyClass expectedType)
public RaiseException newEOFError()
public RaiseException newEOFError(java.lang.String message)
public RaiseException newZeroDivisionError()
public RaiseException newFloatDomainError(java.lang.String message)
public RubySymbol.SymbolTable getSymbolTable()
public void setStackTraces(int stackTraces)
public int getStackTraces()
public void setRandomSeed(long randomSeed)
public long getRandomSeed()
public java.util.Random getRandom()
public ObjectSpace getObjectSpace()
public java.util.Map<java.lang.Integer,java.lang.ref.WeakReference<ChannelDescriptor>> getDescriptors()
public long incrementRandomSeedSequence()
public java.io.InputStream getIn()
public java.io.PrintStream getOut()
public java.io.PrintStream getErr()
public boolean isGlobalAbortOnExceptionEnabled()
public void setGlobalAbortOnExceptionEnabled(boolean enable)
public boolean isDoNotReverseLookupEnabled()
public void setDoNotReverseLookupEnabled(boolean b)
public void registerInspecting(java.lang.Object obj)
public boolean isInspecting(java.lang.Object obj)
public void unregisterInspecting(java.lang.Object obj)
public boolean isObjectSpaceEnabled()
public long getStartTime()
public Profile getProfile()
public java.lang.String getJRubyHome()
public void setJRubyHome(java.lang.String home)
public RubyInstanceConfig getInstanceConfig()
public long getGlobalState()
public void incGlobalState()
public static boolean isSecurityRestricted()
public static void setSecurityRestricted(boolean restricted)
public POSIX getPosix()
public void setRecordSeparatorVar(GlobalVariable recordSeparatorVar)
public GlobalVariable getRecordSeparatorVar()
public java.util.Set<Script> getJittedMethods()
public java.util.concurrent.ExecutorService getExecutor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |