986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje/*
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje *
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * This code is free software; you can redistribute it and/or modify it
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * under the terms of the GNU General Public License version 2 only, as
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * published by the Free Software Foundation. Oracle designates this
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * particular file as subject to the "Classpath" exception as provided
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * by Oracle in the LICENSE file that accompanied this code.
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje *
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * This code is distributed in the hope that it will be useful, but WITHOUT
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * version 2 for more details (a copy is included in the LICENSE file that
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * accompanied this code).
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje *
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * You should have received a copy of the GNU General Public License version
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * 2 along with this work; if not, write to the Free Software Foundation,
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje *
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c713350eb0c205161e2a4ab06cd996300721ac78John Johnson * or visit www.oracle.com if you need additional information or have any
c713350eb0c205161e2a4ab06cd996300721ac78John Johnson * questions.
c713350eb0c205161e2a4ab06cd996300721ac78John Johnson */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setjepackage sun.reflect;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
c713350eb0c205161e2a4ab06cd996300721ac78John Johnson/** This interface provides the declarations for the accessor methods
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje of java.lang.reflect.Field. Each Field object is configured with a
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje (possibly dynamically-generated) class which implements this
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje interface. */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setjepublic interface FieldAccessor {
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public Object get(Object obj) throws IllegalArgumentException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public boolean getBoolean(Object obj) throws IllegalArgumentException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public byte getByte(Object obj) throws IllegalArgumentException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw public char getChar(Object obj) throws IllegalArgumentException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public short getShort(Object obj) throws IllegalArgumentException;
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
e7cbe64f7a72dae5cb44f100db60ca88f3313c65gw public int getInt(Object obj) throws IllegalArgumentException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public long getLong(Object obj) throws IllegalArgumentException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public float getFloat(Object obj) throws IllegalArgumentException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public double getDouble(Object obj) throws IllegalArgumentException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public void set(Object obj, Object value)
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje throws IllegalArgumentException, IllegalAccessException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public void setBoolean(Object obj, boolean z)
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje throws IllegalArgumentException, IllegalAccessException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public void setByte(Object obj, byte b)
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje throws IllegalArgumentException, IllegalAccessException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public void setChar(Object obj, char c)
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje throws IllegalArgumentException, IllegalAccessException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public void setShort(Object obj, short s)
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje throws IllegalArgumentException, IllegalAccessException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public void setInt(Object obj, int i)
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje throws IllegalArgumentException, IllegalAccessException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public void setLong(Object obj, long l)
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje throws IllegalArgumentException, IllegalAccessException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public void setFloat(Object obj, float f)
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje throws IllegalArgumentException, IllegalAccessException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje /** Matches specification in {@link java.lang.reflect.Field} */
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje public void setDouble(Object obj, double d)
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje throws IllegalArgumentException, IllegalAccessException;
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje}
986fd29a0dc13f7608ef7f508f6e700bd7bc2720setje