org.jruby
Class BasicObjectStub.DummyInstanceVariables

java.lang.Object
  extended by org.jruby.BasicObjectStub.DummyInstanceVariables
All Implemented Interfaces:
InstanceVariables
Enclosing class:
BasicObjectStub

public static class BasicObjectStub.DummyInstanceVariables
extends java.lang.Object
implements InstanceVariables


Constructor Summary
BasicObjectStub.DummyInstanceVariables(IRubyObject nil)
           
 
Method Summary
 void copyInstanceVariablesInto(InstanceVariables other)
          Copies all instance variables from the given object into the receiver
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicObjectStub.DummyInstanceVariables

public BasicObjectStub.DummyInstanceVariables(IRubyObject nil)
Method Detail

hasInstanceVariable

public boolean hasInstanceVariable(java.lang.String name)
Description copied from interface: InstanceVariables
Returns true if object has the named instance variable.

Specified by:
hasInstanceVariable in interface InstanceVariables
Parameters:
name - the name of an instance variable
Returns:
true if object has the named instance variable.

fastHasInstanceVariable

public boolean fastHasInstanceVariable(java.lang.String internedName)
Description copied from interface: InstanceVariables
Returns true if object has the named instance variable. The supplied name must have been previously interned.

Specified by:
fastHasInstanceVariable in interface InstanceVariables
Parameters:
internedName - the interned name of an instance variable
Returns:
true if object has the named instance variable, else false

getInstanceVariable

public IRubyObject getInstanceVariable(java.lang.String name)
Description copied from interface: InstanceVariables
Returns the named instance variable if present, else null.

Specified by:
getInstanceVariable in interface InstanceVariables
Parameters:
name - the name of an instance variable
Returns:
the named instance variable if present, else null

fastGetInstanceVariable

public IRubyObject fastGetInstanceVariable(java.lang.String internedName)
Description copied from interface: InstanceVariables
Returns the named instance variable if present, else null. The supplied name must have been previously interned.

Specified by:
fastGetInstanceVariable in interface InstanceVariables
Parameters:
internedName - the interned name of an instance variable
Returns:
he named instance variable if present, else null

setInstanceVariable

public IRubyObject setInstanceVariable(java.lang.String name,
                                       IRubyObject value)
Description copied from interface: InstanceVariables
Sets the named instance variable to the specified value.

Specified by:
setInstanceVariable in interface InstanceVariables
Parameters:
name - the name of an instance variable
value - the value to be set

fastSetInstanceVariable

public IRubyObject fastSetInstanceVariable(java.lang.String internedName,
                                           IRubyObject value)
Description copied from interface: InstanceVariables
Sets the named instance variable to the specified value. The supplied name must have been previously interned.

Specified by:
fastSetInstanceVariable in interface InstanceVariables
Parameters:
internedName - the interned name of an instance variable
value - the value to be set

removeInstanceVariable

public IRubyObject removeInstanceVariable(java.lang.String name)
Description copied from interface: InstanceVariables
Removes the named instance variable, if present, returning its value.

Specified by:
removeInstanceVariable in interface InstanceVariables
Parameters:
name - the name of the variable to remove
Returns:
the value of the remove variable, if present; else null

getInstanceVariableList

public java.util.List<Variable<IRubyObject>> getInstanceVariableList()
Specified by:
getInstanceVariableList in interface InstanceVariables
Returns:
instance variables

getInstanceVariableNameList

public java.util.List<java.lang.String> getInstanceVariableNameList()
Specified by:
getInstanceVariableNameList in interface InstanceVariables
Returns:
instance variable names

copyInstanceVariablesInto

public void copyInstanceVariablesInto(InstanceVariables other)
Description copied from interface: InstanceVariables
Copies all instance variables from the given object into the receiver

Specified by:
copyInstanceVariablesInto in interface InstanceVariables


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