01: /*
02: * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
03: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
04: *
05: * This code is free software; you can redistribute it and/or modify it
06: * under the terms of the GNU General Public License version 2 only, as
07: * published by the Free Software Foundation. Sun designates this
08: * particular file as subject to the "Classpath" exception as provided
09: * by Sun in the LICENSE file that accompanied this code.
10: *
11: * This code is distributed in the hope that it will be useful, but WITHOUT
12: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14: * version 2 for more details (a copy is included in the LICENSE file that
15: * accompanied this code).
16: *
17: * You should have received a copy of the GNU General Public License version
18: * 2 along with this work; if not, write to the Free Software Foundation,
19: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20: *
21: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22: * CA 95054 USA or visit www.sun.com if you need additional information or
23: * have any questions.
24: */
25:
26: package sun.reflect;
27:
28: /** This interface provides the declarations for the accessor methods
29: of java.lang.reflect.Field. Each Field object is configured with a
30: (possibly dynamically-generated) class which implements this
31: interface. */
32:
33: public interface FieldAccessor {
34: /** Matches specification in {@link java.lang.reflect.Field} */
35: public Object get(Object obj) throws IllegalArgumentException;
36:
37: /** Matches specification in {@link java.lang.reflect.Field} */
38: public boolean getBoolean(Object obj)
39: throws IllegalArgumentException;
40:
41: /** Matches specification in {@link java.lang.reflect.Field} */
42: public byte getByte(Object obj) throws IllegalArgumentException;
43:
44: /** Matches specification in {@link java.lang.reflect.Field} */
45: public char getChar(Object obj) throws IllegalArgumentException;
46:
47: /** Matches specification in {@link java.lang.reflect.Field} */
48: public short getShort(Object obj) throws IllegalArgumentException;
49:
50: /** Matches specification in {@link java.lang.reflect.Field} */
51: public int getInt(Object obj) throws IllegalArgumentException;
52:
53: /** Matches specification in {@link java.lang.reflect.Field} */
54: public long getLong(Object obj) throws IllegalArgumentException;
55:
56: /** Matches specification in {@link java.lang.reflect.Field} */
57: public float getFloat(Object obj) throws IllegalArgumentException;
58:
59: /** Matches specification in {@link java.lang.reflect.Field} */
60: public double getDouble(Object obj) throws IllegalArgumentException;
61:
62: /** Matches specification in {@link java.lang.reflect.Field} */
63: public void set(Object obj, Object value)
64: throws IllegalArgumentException, IllegalAccessException;
65:
66: /** Matches specification in {@link java.lang.reflect.Field} */
67: public void setBoolean(Object obj, boolean z)
68: throws IllegalArgumentException, IllegalAccessException;
69:
70: /** Matches specification in {@link java.lang.reflect.Field} */
71: public void setByte(Object obj, byte b)
72: throws IllegalArgumentException, IllegalAccessException;
73:
74: /** Matches specification in {@link java.lang.reflect.Field} */
75: public void setChar(Object obj, char c)
76: throws IllegalArgumentException, IllegalAccessException;
77:
78: /** Matches specification in {@link java.lang.reflect.Field} */
79: public void setShort(Object obj, short s)
80: throws IllegalArgumentException, IllegalAccessException;
81:
82: /** Matches specification in {@link java.lang.reflect.Field} */
83: public void setInt(Object obj, int i)
84: throws IllegalArgumentException, IllegalAccessException;
85:
86: /** Matches specification in {@link java.lang.reflect.Field} */
87: public void setLong(Object obj, long l)
88: throws IllegalArgumentException, IllegalAccessException;
89:
90: /** Matches specification in {@link java.lang.reflect.Field} */
91: public void setFloat(Object obj, float f)
92: throws IllegalArgumentException, IllegalAccessException;
93:
94: /** Matches specification in {@link java.lang.reflect.Field} */
95: public void setDouble(Object obj, double d)
96: throws IllegalArgumentException, IllegalAccessException;
97: }
|