001    /*
002    This project provide access to non public fields
003    and methods as help for writing tests.
004    Copyright (C) 2007  Christof Lehmann
005    
006    This program is free software; you can redistribute it and/or
007    modify it under the terms of the GNU General Public License
008    as published by the Free Software Foundation; either version 2
009    of the License, or (at your option) any later version.
010    
011    This program is distributed in the hope that it will be useful,
012    but WITHOUT ANY WARRANTY; without even the implied warranty of
013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014    GNU General Public License for more details.
015    
016    You should have received a copy of the GNU General Public License
017    along with this program; if not, write to the Free Software
018    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
019     */
020    package net.sf.testextensions;
021    
022    /**
023     * The interface <code>AccessField</code> defines the methods
024     * for accessing a member.
025     * @author forge-cl
026     *
027     */
028    public interface AccessField {
029    
030            /**
031             * The method <code>setValue</code> set the selected
032             * field to the given value.
033             * @param aNewValue the value, which should the selected
034             * field contains after this method call.
035             * @throws TestExtensionException if the dstValue does not
036             * suite to the field or any other exception occures.
037             */
038            void setValue(final Object aNewValue) throws TestExtensionException;
039    
040            /**
041             * The method <code>getValue</code> give the value of the
042             * selected field.
043             * @return the value of the selected field.
044             * @throws TestExtensionException shows, that an error
045             * occures during field access.
046             */
047            Object getValue() throws TestExtensionException;
048    }