// $Id: ArrayBasic.java,v 1.1 1998/05/29 16:07:00 oliva Exp $

/* Copyright 1998 Alexandre Oliva <oliva@dcc.unicamp.br>
 *
 * This file is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

/**
 * This program demonstrates that Guarana can also intercept array
 * operations, such as reading the array length, an array element, or
 * assigning to an array element.
 *
 * @author Alexandre Oliva
 * @version $Revision: 1.1 $
 */
public class ArrayBasic {
    public static void main(String[ ] argv) {
	Object[ ] array = new Object[3];
	BR.unicamp.Guarana.MetaObject mo = new MetaLogger();
	BR.unicamp.Guarana.Guarana.reconfigure(array, null, mo);
	array[0] = new Integer(array.length);
	array[1] = array[0].toString();
	array[2] = array.getClass().getClass();
    }
}
