1 /* |
|
2 * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
5 * This code is free software; you can redistribute it and/or modify it |
|
6 * under the terms of the GNU General Public License version 2 only, as |
|
7 * published by the Free Software Foundation. Oracle designates this |
|
8 * particular file as subject to the "Classpath" exception as provided |
|
9 * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 * or visit www.oracle.com if you need additional information or have any |
|
23 * 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) throws IllegalArgumentException; |
|
39 |
|
40 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
41 public byte getByte(Object obj) throws IllegalArgumentException; |
|
42 |
|
43 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
44 public char getChar(Object obj) throws IllegalArgumentException; |
|
45 |
|
46 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
47 public short getShort(Object obj) throws IllegalArgumentException; |
|
48 |
|
49 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
50 public int getInt(Object obj) throws IllegalArgumentException; |
|
51 |
|
52 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
53 public long getLong(Object obj) throws IllegalArgumentException; |
|
54 |
|
55 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
56 public float getFloat(Object obj) throws IllegalArgumentException; |
|
57 |
|
58 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
59 public double getDouble(Object obj) throws IllegalArgumentException; |
|
60 |
|
61 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
62 public void set(Object obj, Object value) |
|
63 throws IllegalArgumentException, IllegalAccessException; |
|
64 |
|
65 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
66 public void setBoolean(Object obj, boolean z) |
|
67 throws IllegalArgumentException, IllegalAccessException; |
|
68 |
|
69 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
70 public void setByte(Object obj, byte b) |
|
71 throws IllegalArgumentException, IllegalAccessException; |
|
72 |
|
73 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
74 public void setChar(Object obj, char c) |
|
75 throws IllegalArgumentException, IllegalAccessException; |
|
76 |
|
77 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
78 public void setShort(Object obj, short s) |
|
79 throws IllegalArgumentException, IllegalAccessException; |
|
80 |
|
81 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
82 public void setInt(Object obj, int i) |
|
83 throws IllegalArgumentException, IllegalAccessException; |
|
84 |
|
85 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
86 public void setLong(Object obj, long l) |
|
87 throws IllegalArgumentException, IllegalAccessException; |
|
88 |
|
89 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
90 public void setFloat(Object obj, float f) |
|
91 throws IllegalArgumentException, IllegalAccessException; |
|
92 |
|
93 /** Matches specification in {@link java.lang.reflect.Field} */ |
|
94 public void setDouble(Object obj, double d) |
|
95 throws IllegalArgumentException, IllegalAccessException; |
|
96 } |
|