Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.

1 /***** BEGIN LICENSE BLOCK *****2 * Version: CPL 1.0/GPL 2.0/LGPL 2.13 *4 * The contents of this file are subject to the Common Public5 * License Version 1.0 (the "License"); you may not use this file6 * except in compliance with the License. You may obtain a copy of7 * the License at http://www.eclipse.org/legal/cpl-v10.html8 *9 * Software distributed under the License is distributed on an "AS10 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or11 * implied. See the License for the specific language governing12 * rights and limitations under the License.13 *14 * Copyright (C) 2002-2004 Jan Arne Petersen <jpetersen@uni-bonn.de>15 * 16 * Alternatively, the contents of this file may be used under the terms of17 * either of the GNU General Public License Version 2 or later (the "GPL"),18 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),19 * in which case the provisions of the GPL or the LGPL are applicable instead20 * of those above. If you wish to allow use of your version of this file only21 * under the terms of either the GPL or the LGPL, and not to allow others to22 * use your version of this file under the terms of the CPL, indicate your23 * decision by deleting the provisions above and replace them with the notice24 * and other provisions required by the GPL or the LGPL. If you do not delete25 * the provisions above, a recipient may use your version of this file under26 * the terms of any one of the CPL, the GPL or the LGPL.27 ***** END LICENSE BLOCK *****/28 package org.jruby.internal.runtime;29 30 importorg.jruby.runtime.IAccessor;31 importorg.jruby.runtime.builtin.IRubyObject;32 33 /**34 * 35 * @author jpetersen36 */37 publicclass ValueAccessor implementsIAccessor {38 privateIRubyObject value;39 40 public ValueAccessor(IRubyObject value) {41 assert value != null;42 43 this.value = value;44 }45 46 publicIRubyObject getValue() {47 return value;48 }49 50 publicIRubyObject setValue(IRubyObject newValue) {51 value = newValue;52 53 return newValue;54 }55 }56