org.jruby.runtime.builtin
Interface InternalVariables

All Known Implementing Classes:
AbstractBuffer, AbstractMemory, AbstractMemoryPointer, ArrayJavaProxy, AutoPointer, CallbackInfo, ConcreteJavaProxy, FFIProvider, FiberLibrary.Fiber, FileDescriptorIO, IncludedModuleWrapper, InterfaceJavaProxy, Invoker, JavaAccessibleObject, JavaArray, JavaCallable, JavaClass, JavaConstructor, JavaField, JavaMethod, JavaObject, JavaProxy, JavaProxyClass, JavaProxyClass.ProxyMethodImpl, JavaProxyConstructor, JavaProxyReflectionObject, JNABasePointer, JNABuffer, JNAMemoryPointer, JNAProvider, JNAVariadicInvoker, JRubyObjectInputStream, MetaClass, MiniJava.JavaObjectWrapper, MockRubyObject, NativeException, Pointer, RubyArray, RubyBasicObject, RubyBasicSocket, RubyBigDecimal, RubyBignum, RubyBinding, RubyBoolean, RubyClass, RubyClassPathVariable, RubyComplex, RubyDigest.Base, RubyDir, RubyEncoding, RubyEnumerator, RubyException, RubyFile, RubyFileStat, RubyFixnum, RubyFloat, RubyGlobal.StringOnlyRubyHash, RubyHash, RubyIconv, RubyIconv.RubyFailure, RubyInteger, RubyIO, RubyIPSocket, RubyLocalJumpError, RubyMatchData, RubyMethod, RubyModule, RubyNameError, RubyNameError.RubyNameErrorMessage, RubyNil, RubyNoMethodError, RubyNumeric, RubyObject, RubyProc, RubyProcess.RubyStatus, RubyRange, RubyRational, RubyRegexp, RubySocket, RubyString, RubyStringIO, RubyStringScanner, RubyStruct, RubySymbol, RubySystemCallError, RubySystemExit, RubyTCPServer, RubyTCPSocket, RubyThread, RubyThreadGroup, RubyTime, RubyUDPSocket, RubyUnboundMethod, RubyUNIXServer, RubyUNIXSocket, RubyZlib.Deflate, RubyZlib.Inflate, RubyZlib.RubyGzipFile, RubyZlib.RubyGzipReader, RubyZlib.RubyGzipWriter, RubyZlib.ZStream, StructLayout, StructLayoutBuilder, ThreadLibrary.ConditionVariable, ThreadLibrary.Mutex, ThreadLibrary.Queue, ThreadLibrary.SizedQueue, WeakRef

public interface InternalVariables

Interface that gives access to the internal variables of a Ruby object.

Author:
headius

Method Summary
 IRubyObject fastGetInternalVariable(java.lang.String internedName)
          Returns the named internal variable if present, else null.
 boolean fastHasInternalVariable(java.lang.String internedName)
          Returns true if object has the named internal variable.
 void fastSetInternalVariable(java.lang.String internedName, IRubyObject value)
          Sets the named internal variable to the specified value.
 IRubyObject getInternalVariable(java.lang.String name)
          Returns the named internal variable if present, else null.
 java.util.List<Variable<IRubyObject>> getInternalVariableList()
           
 boolean hasInternalVariable(java.lang.String name)
          Returns true if object has the named internal variable.
 IRubyObject removeInternalVariable(java.lang.String name)
          Removes the named internal variable, if present, returning its value.
 void setInternalVariable(java.lang.String name, IRubyObject value)
          Sets the named internal variable to the specified value.
 

Method Detail

hasInternalVariable

boolean hasInternalVariable(java.lang.String name)
Returns true if object has the named internal variable. Use only for internal variables (not ivar/cvar/constant).

Parameters:
name - the name of an internal variable
Returns:
true if object has the named internal variable.

fastHasInternalVariable

boolean fastHasInternalVariable(java.lang.String internedName)
Returns true if object has the named internal variable. Use only for internal variables (not ivar/cvar/constant). The supplied name must have been previously interned.

Parameters:
internedName - the interned name of an internal variable
Returns:
true if object has the named internal variable, else false

getInternalVariable

IRubyObject getInternalVariable(java.lang.String name)
Returns the named internal variable if present, else null. Use only for internal variables (not ivar/cvar/constant).

Parameters:
name - the name of an internal variable
Returns:
the named internal variable if present, else null

fastGetInternalVariable

IRubyObject fastGetInternalVariable(java.lang.String internedName)
Returns the named internal variable if present, else null. Use only for internal variables (not ivar/cvar/constant). The supplied name must have been previously interned.

Parameters:
internedName - the interned name of an internal variable
Returns:
he named internal variable if present, else null

setInternalVariable

void setInternalVariable(java.lang.String name,
                         IRubyObject value)
Sets the named internal variable to the specified value. Use only for internal variables (not ivar/cvar/constant).

Parameters:
name - the name of an internal variable
value - the value to be set

fastSetInternalVariable

void fastSetInternalVariable(java.lang.String internedName,
                             IRubyObject value)
Sets the named internal variable to the specified value. Use only for internal variables (not ivar/cvar/constant). The supplied name must have been previously interned.

Parameters:
internedName - the interned name of an internal variable
value - the value to be set

removeInternalVariable

IRubyObject removeInternalVariable(java.lang.String name)
Removes the named internal variable, if present, returning its value. Use only for internal variables (not ivar/cvar/constant).

Parameters:
name - the name of the variable to remove
Returns:
the value of the remove variable, if present; else null

getInternalVariableList

java.util.List<Variable<IRubyObject>> getInternalVariableList()
Returns:
only internal variables (NOT ivar/cvar/constant)


Copyright © 2002-2007 JRuby Team. All Rights Reserved.