Class VariableAccessorField

java.lang.Object
org.jruby.runtime.ivars.VariableAccessorField

public final class VariableAccessorField extends Object
A lazy mechanism for accessing VariableAccessors for a given variable name.
  • Constructor Details

    • VariableAccessorField

      public VariableAccessorField(String name)
      Construct a new VariableAccessorField for the given named variable.
      Parameters:
      name - the name of the variable
  • Method Details

    • getVariableAccessorForRead

      public VariableAccessor getVariableAccessorForRead()
      Retrieve the variable accessor for read.
      Returns:
      the variable accessor appropriate for reads
    • getVariableAccessorForWrite

      public VariableAccessor getVariableAccessorForWrite(VariableTableManager tableMgr)
      Retrieve the variable access for write.
      Parameters:
      tableMgr - the VariableTableManager for which to allocate an accessor, if it has not already been allocated.
      Returns:
      the variable accessor appropriate for writes.