Logo Search packages:      
Sourcecode: jruby1.1 version File versions

org::jruby::Ruby Class Reference

List of all members.

Detailed Description

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.

Definition at line 141 of file Ruby.java.

Public Member Functions

void addEventHook (EventHook hook)
void addFinalizer (Finalizable finalizer)
void addInternalFinalizer (Finalizable finalizer)
int allocModuleId ()
int allocSymbolId ()
CallbackFactory callbackFactory (Class<?> type)
void callEventHooks (ThreadContext context, RubyEvent event, String file, int line, String name, IRubyObject type)
void checkSafeString (IRubyObject object)
void compileAndLoadFile (String filename, InputStream in, boolean wrap)
RubyClass defineClass (String name, RubyClass superClass, ObjectAllocator allocator, CallSite[] callSites)
RubyClass defineClass (String name, RubyClass superClass, ObjectAllocator allocator)
RubyClass defineClassUnder (String name, RubyClass superClass, ObjectAllocator allocator, RubyModule parent, CallSite[] callSites)
RubyClass defineClassUnder (String name, RubyClass superClass, ObjectAllocator allocator, RubyModule parent)
void defineGlobalConstant (String name, IRubyObject value)
RubyModule defineModule (String name)
RubyModule defineModuleUnder (String name, RubyModule parent)
void defineReadonlyVariable (String name, IRubyObject value)
void defineVariable (final GlobalVariable variable)
IRubyObject evalScriptlet (String script)
IRubyObject executeScript (String script, String filename)
RubyClass fastGetClass (String internedName)
RubyModule fastGetModule (String internedName)
RubySymbol fastNewSymbol (String internedName)
RubyClass getArgumentError ()
RubyClass getArray ()
BeanManager getBeanManager ()
RubyClass getBignum ()
RubyClass getBinding ()
CacheMap getCacheMap ()
RubyHash getCharsetMap ()
RubyClass getClass (String name)
RubyClass getClassClass ()
RubyModule getClassFromPath (String path)
RubyModule getComparable ()
RubyClass getComplex ()
RubyClass getConcurrencyError ()
RubyClass getContinuation ()
ThreadContext getCurrentContext ()
String getCurrentDirectory ()
IRubyObject getDebug ()
RubyThreadGroup getDefaultThreadGroup ()
Map< Integer, WeakReference
< ChannelDescriptor > > 
getDescriptors ()
RubyClass getDir ()
RubyClass getDummy ()
RubyModule getEnumerable ()
RubyModule getEnumerator ()
RubyClass getEOFError ()
PrintStream getErr ()
RubyModule getErrno ()
RubyClass getErrno (int n)
PrintStream getErrorStream ()
RubyModule getEtc ()
RubyClass getException ()
ExecutorService getExecutor ()
RubyBoolean getFalse ()
RubyClass getFalseClass ()
RubyClass getFatal ()
RubyClass getFile ()
RubyClass getFileStat ()
RubyModule getFileTest ()
RubyClass getFixnum ()
RubyClass getFloat ()
RubyClass getFloatDomainError ()
RubyModule getGC ()
long getGlobalState ()
GlobalVariables getGlobalVariables ()
IRubyObject getGroupStruct ()
RubyClass getHash ()
InputStream getIn ()
RubyClass getIndexError ()
InputStream getInputStream ()
RubyInstanceConfig getInstanceConfig ()
RubyClass getInteger ()
RubyClass getInterrupt ()
RubyClass getIO ()
RubyClass getIOError ()
JavaSupport getJavaSupport ()
JITCompiler getJITCompiler ()
Set< Script > getJittedMethods ()
synchronized JRubyClassLoader getJRubyClassLoader ()
String getJRubyHome ()
KCode getKCode ()
RubyModule getKernel ()
RubyClass getLoadError ()
LoadService getLoadService ()
RubyClass getLocalJumpError ()
Map< String, DateTimeZone > getLocalTimezoneCache ()
RubyModule getMarshal ()
RubyClass getMatchData ()
RubyModule getMath ()
RubyClass getMethod ()
RubyClass getModule ()
RubyModule getModule (String name)
RubyClass getNameError ()
RubyClass getNameErrorMessage ()
RubyClass getNativeException ()
IRubyObject getNil ()
RubyClass getNilClass ()
RubyClass getNoMemoryError ()
RubyClass getNoMethodError ()
RubyClass getNotImplementedError ()
RubyClass getNumeric ()
RubyClass getObject ()
ObjectSpace getObjectSpace ()
RubyModule getObjectSpaceModule ()
Object getObjectToYamlMethod ()
RubyModule getOrCreateModule (String name)
PrintStream getOut ()
PrintStream getOutputStream ()
IRubyObject getPasswdStruct ()
POSIX getPosix ()
RubyModule getPrecision ()
RubyClass getProc ()
RubyModule getProcess ()
RubyModule getProcGID ()
RubyClass getProcStatus ()
RubyModule getProcSysModule ()
RubyModule getProcUID ()
Profile getProfile ()
Random getRandom ()
long getRandomSeed ()
RubyClass getRange ()
RubyClass getRangeError ()
RubyClass getRational ()
GlobalVariable getRecordSeparatorVar ()
RubyClass getRegexp ()
RubyClass getRegexpError ()
RubyClass getRuntimeError ()
int getSafeLevel ()
RubyClass getSecurityError ()
RubyClass getSignalException ()
int getStackTraces ()
RubyClass getStandardError ()
long getStartTime ()
RubyClass getString ()
RubyClass getStructClass ()
RubyClass getSymbol ()
RubySymbol.SymbolTable getSymbolTable ()
RubyClass getSyntaxError ()
RubyClass getSystemCallError ()
RubyClass getSystemExit ()
RubyClass getSystemStackError ()
RubyClass getThread ()
RubyClass getThreadError ()
RubyClass getThreadGroup ()
ThreadService getThreadService ()
RubyClass getTime ()
IRubyObject getTmsStruct ()
IRubyObject getTopSelf ()
RubyBoolean getTrue ()
RubyClass getTrueClass ()
RubyClass getTypeError ()
RubyClass getUnboundMethod ()
IRubyObject getVerbose ()
RubyWarnings getWarnings ()
RubyClass getZeroDivisionError ()
boolean hasEventHooks ()
void incGlobalState ()
long incrementRandomSeedSequence ()
boolean isClassDefined (String name)
boolean isDoNotReverseLookupEnabled ()
boolean isGlobalAbortOnExceptionEnabled ()
boolean isInspecting (Object obj)
boolean isObjectSpaceEnabled ()
void loadFile (String scriptName, InputStream in, boolean wrap)
void loadScript (Script script)
RaiseException newArgumentError (int got, int expected)
RaiseException newArgumentError (String message)
RubyArray newArray (int size)
RubyArray newArray (List< IRubyObject > list)
RubyArray newArray (IRubyObject[] objects)
RubyArray newArray (IRubyObject car, IRubyObject cdr)
RubyArray newArray (IRubyObject object)
RubyArray newArray ()
RubyArray newArrayLight ()
RubyArray newArrayNoCopy (IRubyObject[] objects)
RubyArray newArrayNoCopyLight (IRubyObject[] objects)
RubyBinding newBinding (Binding binding)
RubyBinding newBinding ()
RubyProc newBlockPassProc (Block.Type type, Block block)
RubyBoolean newBoolean (boolean value)
RaiseException newConcurrencyError (String message)
RubyArray newEmptyArray ()
RaiseException newEOFError (String message)
RaiseException newEOFError ()
RaiseException newErrnoEACCESError (String message)
RaiseException newErrnoEADDRINUSEError ()
RaiseException newErrnoEAGAINError (String message)
RaiseException newErrnoEBADFError (String message)
RaiseException newErrnoEBADFError ()
RaiseException newErrnoECHILDError ()
RaiseException newErrnoECONNREFUSEDError ()
RaiseException newErrnoECONNRESETError ()
RaiseException newErrnoEDOMError (String message)
RaiseException newErrnoEEXISTError (String message)
RaiseException newErrnoEINVALError (String message)
RaiseException newErrnoEINVALError ()
RaiseException newErrnoEISDirError ()
RaiseException newErrnoENOENTError (String message)
RaiseException newErrnoENOENTError ()
RaiseException newErrnoENOPROTOOPTError ()
RaiseException newErrnoENOTDIRError (String message)
RaiseException newErrnoENOTSOCKError (String message)
RaiseException newErrnoEPIPEError ()
RaiseException newErrnoESPIPEError (String message)
RaiseException newErrnoESPIPEError ()
RubyFileStat newFileStat (FileDescriptor descriptor)
RubyFileStat newFileStat (String filename, boolean lstat)
RubyFixnum newFixnum (int value)
RubyFixnum newFixnum (long value)
RubyFloat newFloat (double value)
RaiseException newFloatDomainError (String message)
RaiseException newFrozenError (String objectType)
RaiseException newIndexError (String message)
RaiseException newInvalidEncoding (String message)
RaiseException newIOError (String message)
RaiseException newIOErrorFromException (IOException ioe)
RaiseException newLoadError (String message)
RaiseException newLocalJumpError (String reason, IRubyObject exitValue, String message)
RaiseException newNameError (String message, String name, Throwable origException, boolean printWhenVerbose)
RaiseException newNameError (String message, String name, Throwable origException)
RaiseException newNameError (String message, String name)
RaiseException newNoMethodError (String message, String name, IRubyObject args)
RaiseException newNotImplementedError (String message)
RubyNumeric newNumeric ()
RubyProc newProc (Block.Type type, Block block)
RaiseException newRangeError (String message)
RaiseException newRedoLocalJumpError ()
RaiseException newRegexpError (String message)
RaiseException newRuntimeError (String message)
RaiseException newSecurityError (String message)
RaiseException newStandardError (String message)
RubyString newString (ByteList byteList)
RubyString newString (String string)
RubyString newString ()
RubyString newStringShared (ByteList byteList)
RubySymbol newSymbol (String name)
RaiseException newSyntaxError (String message)
RaiseException newSystemCallError (String message)
RaiseException newSystemExit (int status)
RaiseException newSystemStackError (String message)
RaiseException newThreadError (String message)
RubyTime newTime (long milliseconds)
RaiseException newTypeError (IRubyObject receivedObject, RubyClass expectedType)
RaiseException newTypeError (String message)
RaiseException newZeroDivisionError ()
Node parse (ByteList content, String file, DynamicScope scope, int lineNumber, boolean extraPositionInformation)
Node parse (String content, String file, DynamicScope scope, int lineNumber, boolean extraPositionInformation)
Node parseEval (ByteList content, String file, DynamicScope scope, int lineNumber)
Node parseEval (String content, String file, DynamicScope scope, int lineNumber)
Node parseFile (InputStream in, String file, DynamicScope scope)
Node parseFromMain (InputStream inputStream, String filename)
Node parseInline (InputStream in, String file, DynamicScope scope)
void printError (RubyException excp)
IRubyObject pushExitBlock (RubyProc proc)
void registerInspecting (Object obj)
void removeEventHook (EventHook hook)
void removeFinalizer (Finalizable finalizer)
void removeInternalFinalizer (Finalizable finalizer)
void runFromMain (InputStream inputStream, String filename)
IRubyObject runNormally (Node scriptNode, boolean yarvCompile)
IRubyObject runWithGetsLoop (Node scriptNode, boolean printing, boolean processLineEnds, boolean split, boolean yarvCompile)
void secure (int level)
void setCurrentDirectory (String dir)
void setDebug (IRubyObject debug)
void setDoNotReverseLookupEnabled (boolean b)
void setEtc (RubyModule etcModule)
void setGlobalAbortOnExceptionEnabled (boolean enable)
void setGlobalVariables (GlobalVariables globalVariables)
void setJRubyHome (String home)
void setKCode (KCode kcode)
void setRandomSeed (long randomSeed)
void setRecordSeparatorVar (GlobalVariable recordSeparatorVar)
void setSafeLevel (int safeLevel)
void setStackTraces (int stackTraces)
void setTraceFunction (RubyProc traceFunction)
void setVerbose (IRubyObject verbose)
void tearDown ()
void unregisterInspecting (Object obj)

Static Public Member Functions

static ClassLoader getClassLoader ()
static Ruby getCurrentInstance ()
static Ruby getDefaultInstance ()
static boolean isSecurityRestricted ()
static Ruby newInstance (InputStream in, PrintStream out, PrintStream err)
static Ruby newInstance (RubyInstanceConfig config)
static Ruby newInstance ()
static void setCurrentInstance (Ruby runtime)
static void setSecurityRestricted (boolean restricted)

Public Attributes

final RubyFixnum[] fixnumCache = new RubyFixnum[256]

Package Functions

Object getRespondToMethod ()
void setArray (RubyClass arrayClass)
void setBignum (RubyClass bignumClass)
void setBinding (RubyClass bindingClass)
void setComparable (RubyModule comparableModule)
void setComplex (RubyClass complexClass)
void setContinuation (RubyClass continuationClass)
void setDefaultThreadGroup (RubyThreadGroup defaultThreadGroup)
void setDir (RubyClass dirClass)
void setEnumerable (RubyModule enumerableModule)
void setEnumerator (RubyClass enumeratorClass)
void setException (RubyClass exceptionClass)
void setFalseClass (RubyClass falseClass)
void setFile (RubyClass fileClass)
void setFileStat (RubyClass fileStatClass)
void setFileTest (RubyModule fileTestModule)
void setFixnum (RubyClass fixnumClass)
void setFloat (RubyClass floatClass)
void setGC (RubyModule gcModule)
void setGroupStruct (RubyClass groupStruct)
void setHash (RubyClass hashClass)
void setInteger (RubyClass integerClass)
void setIO (RubyClass ioClass)
void setKernel (RubyModule kernelModule)
void setMarshal (RubyModule marshalModule)
void setMatchData (RubyClass matchDataClass)
void setMath (RubyModule mathModule)
void setMethod (RubyClass methodClass)
void setNilClass (RubyClass nilClass)
void setNumeric (RubyClass numericClass)
void setObjectSpaceEnabled (boolean objectSpaceEnabled)
void setObjectSpaceModule (RubyModule objectSpaceModule)
void setObjectToYamlMethod (Object otym)
void setPasswdStruct (RubyClass passwdStruct)
void setPrecision (RubyModule precisionModule)
void setProc (RubyClass procClass)
void setProcess (RubyModule processModule)
void setProcGID (RubyModule procGIDModule)
void setProcStatus (RubyClass procStatusClass)
void setProcSys (RubyModule procSysModule)
void setProcUID (RubyModule procUIDModule)
void setRange (RubyClass rangeClass)
void setRational (RubyClass rationalClass)
void setRegexp (RubyClass regexpClass)
void setRespondToMethod (Object rtm)
void setString (RubyClass stringClass)
void setStructClass (RubyClass structClass)
void setSymbol (RubyClass symbolClass)
void setThread (RubyClass threadClass)
void setThreadGroup (RubyClass threadGroupClass)
void setTime (RubyClass timeClass)
void setTmsStruct (RubyClass tmsStruct)
void setTrueClass (RubyClass trueClass)
void setUnboundMethod (RubyClass unboundMethodClass)

Static Package Functions

 [static initializer]

Private Member Functions

void addBuiltinIfAllowed (String name, Library lib)
void addLazyBuiltin (String name, String shortName, String className)
void bootstrap ()
void createSysErr (int i, String name)
RubyClass defineClassIfAllowed (String name, RubyClass superClass)
void init ()
void initBuiltins ()
void initCore ()
void initErrno ()
void initExceptions ()
void initRoot (ThreadContext context)
RaiseException newRaiseException (RubyClass exceptionClass, String message)
void printErrorPos (ThreadContext context, PrintStream errorStream)
 Ruby (RubyInstanceConfig config)
IRubyObject runInterpreter (Node scriptNode)
IRubyObject runScript (Script script)
IRubyObject runYarv (YARVCompiledRunner runner)
Script tryCompile (Node node, JRubyClassLoader classLoader)
Script tryCompile (Node node)
YARVCompiledRunner tryCompileYarv (Node node)

Private Attributes

RubyClass argumentError
RubyClass arrayClass
Stack< RubyProcatExitBlocks = new Stack<RubyProc>()
BeanManager beanManager
RubyClass bignumClass
RubyClass bindingClass
final CacheMap cacheMap
final CallTraceFuncHook callTraceFuncHook = new CallTraceFuncHook()
RubyHash charsetMap
RubyClass classClass
RubyModule comparableModule
RubyClass complexClass
RubyClass concurrencyError
RubyInstanceConfig config
RubyClass continuationClass
String currentDirectory
IRubyObject debug
RubyThreadGroup defaultThreadGroup
Map< Integer, WeakReference
< ChannelDescriptor > > 
descriptors = new ConcurrentHashMap<Integer, WeakReference<ChannelDescriptor>>()
RubyClass dirClass
boolean doNotReverseLookupEnabled = false
RubyClass dummyClass
RubyModule enumerableModule
RubyClass enumeratorClass
RubyClass eofError
PrintStream err
RubyModule errnoModule
Map< Integer, RubyClasserrnos = new HashMap<Integer, RubyClass>()
RubyModule etcModule
List< EventHookeventHooks = new Vector<EventHook>()
RubyClass exceptionClass
ExecutorService executor
RubyClass falseClass
RubyBoolean falseObject
RubyClass fatal
RubyClass fileClass
RubyClass fileStatClass
RubyModule fileTestModule
Map< Finalizable, Object > finalizers
final Object finalizersMutex = new Object()
RubyClass fixnumClass
RubyClass floatClass
RubyClass floatDomainError
RubyModule gcModule
boolean globalAbortOnExceptionEnabled = false
long globalState = 1
GlobalVariables globalVariables = new GlobalVariables(this)
RubyClass groupStruct
boolean hasEventHooks
RubyClass hashClass
InputStream in
RubyClass indexError
ThreadLocal< Map< Object,
Object > > 
inspect = new ThreadLocal<Map<Object, Object>>()
RubyClass integerClass
Map< Finalizable, Object > internalFinalizers
final Object internalFinalizersMutex = new Object()
RubyClass interrupt
RubyClass ioClass
RubyClass ioError
JavaSupport javaSupport
final JITCompiler jitCompiler
final Set< Script > jittedMethods = Collections.synchronizedSet(new WeakHashSet<Script>())
JRubyClassLoader jrubyClassLoader
KCode kcode = KCode.NONE
RubyModule kernelModule
RubyClass loadError
LoadService loadService
RubyClass localJumpError
Map< String, DateTimeZone > localTimeZoneCache = new HashMap<String,DateTimeZone>()
RubyModule marshalModule
RubyClass matchDataClass
RubyModule mathModule
RubyClass methodClass
RubyClass moduleClass
AtomicInteger moduleLastId = new AtomicInteger(0)
RubyClass nameError
RubyClass nameErrorMessage
RubyClass nativeException
RubyClass nilClass
RubyNil nilObject
RubyClass noMemoryError
RubyClass noMethodError
RubyClass notImplementedError
RubyClass numericClass
RubyClass objectClass
ObjectSpace objectSpace = new ObjectSpace()
volatile boolean objectSpaceEnabled
RubyModule objectSpaceModule
Object objectToYamlMethod
PrintStream out
Parser parser = new Parser(this)
RubyClass passwdStruct
POSIX posix
RubyModule precisionModule
RubyClass procClass
RubyModule processModule
RubyModule procGIDModule
RubyClass procStatusClass
RubyModule procSysModule
RubyModule procUIDModule
Profile profile
Random random = new Random()
long randomSeed = 0
long randomSeedSequence = 0
RubyClass rangeClass
RubyClass rangeError
RubyClass rationalClass
GlobalVariable recordSeparatorVar
RubyClass regexpClass
RubyClass regexpError
Object respondToMethod
RubyClass runtimeError
Hashtable< Object, Object > runtimeInformation
int safeLevel = -1
RubyClass scriptError
RubyClass securityError
RubyClass signalException
int stackTraces = 0
RubyClass standardError
long startTime = System.currentTimeMillis()
RubyClass stringClass
RubyClass structClass
RubyClass symbolClass
AtomicInteger symbolLastId = new AtomicInteger(128)
final RubySymbol.SymbolTable symbolTable = new RubySymbol.SymbolTable(this)
RubyClass syntaxError
RubyClass systemCallError
RubyClass systemExit
RubyClass systemStackError
RubyClass threadClass
RubyClass threadError
RubyClass threadGroupClass
final ThreadService threadService
RubyClass timeClass
RubyClass tmsStruct
IRubyObject topSelf
RubyClass trueClass
RubyBoolean trueObject
RubyClass typeError
RubyClass unboundMethodClass
IRubyObject verbose
RubyWarnings warnings = new RubyWarnings(this)
RubyClass zeroDivisionError

Static Private Attributes

static ThreadLocal< RubycurrentRuntime = new ThreadLocal<Ruby>()
static volatile boolean securityRestricted = false


class  CallTraceFuncHook
class  DaemonThreadFactory

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index