org.jruby.runtime.builtin
Interface InstanceVariables

All Known Implementing Classes:
FiberLibrary.Fiber, IncludedModuleWrapper, JavaAccessibleObject, JavaArray, JavaCallable, JavaClass, JavaConstructor, JavaField, JavaMethod, JavaObject, JavaProxyClass, JavaProxyClass.ProxyMethodImpl, JavaProxyConstructor, JavaProxyReflectionObject, JRubyObjectInputStream, MetaClass, MiniJava.JavaObjectWrapper, MockRubyObject, NativeException, RubyArray, RubyBasicSocket, RubyBigDecimal, RubyBignum, RubyBinding, RubyBoolean, RubyClass, RubyClassPathVariable, RubyDigest.Base, RubyDir, 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, 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, ThreadLibrary.ConditionVariable, ThreadLibrary.Mutex, ThreadLibrary.Queue, ThreadLibrary.SizedQueue, WeakRef

public interface InstanceVariables

Interface that represents the instance variable aspect of Ruby objects.

Author:
headius

Method Summary
 IRubyObject fastGetInstanceVariable(java.lang.String internedName)
          Returns the named instance variable if present, else null.
 boolean fastHasInstanceVariable(java.lang.String internedName)
          Returns true if object has the named instance variable.
 IRubyObject fastSetInstanceVariable(java.lang.String internedName, IRubyObject value)
          Sets the named instance variable to the specified value.
 IRubyObject getInstanceVariable(java.lang.String name)
          Returns the named instance variable if present, else null.
 java.util.List<Variable<IRubyObject>> getInstanceVariableList()
           
 java.util.List<java.lang.String> getInstanceVariableNameList()
           
 boolean hasInstanceVariable(java.lang.String name)
          Returns true if object has the named instance variable.
 IRubyObject removeInstanceVariable(java.lang.String name)
          Removes the named instance variable, if present, returning its value.
 IRubyObject setInstanceVariable(java.lang.String name, IRubyObject value)
          Sets the named instance variable to the specified value.
 

Method Detail

hasInstanceVariable

boolean hasInstanceVariable(java.lang.String name)
Returns true if object has the named instance variable.

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

fastHasInstanceVariable

boolean fastHasInstanceVariable(java.lang.String internedName)
Returns true if object has the named instance variable. The supplied name must have been previously interned.

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

getInstanceVariable

IRubyObject getInstanceVariable(java.lang.String name)
Returns the named instance variable if present, else null.

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

fastGetInstanceVariable

IRubyObject fastGetInstanceVariable(java.lang.String internedName)
Returns the named instance variable if present, else null. The supplied name must have been previously interned.

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

setInstanceVariable

IRubyObject setInstanceVariable(java.lang.String name,
                                IRubyObject value)
Sets the named instance variable to the specified value.

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

fastSetInstanceVariable

IRubyObject fastSetInstanceVariable(java.lang.String internedName,
                                    IRubyObject value)
Sets the named instance variable to the specified value. The supplied name must have been previously interned.

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

removeInstanceVariable

IRubyObject removeInstanceVariable(java.lang.String name)
Removes the named instance variable, if present, returning its value.

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

getInstanceVariableList

java.util.List<Variable<IRubyObject>> getInstanceVariableList()
Returns:
instance variables

getInstanceVariableNameList

java.util.List<java.lang.String> getInstanceVariableNameList()
Returns:
instance variable names


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