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 26package jdk.internal.reflect; 27 28/** Package-private implementation of the FieldAccessor interface 29 which has access to all classes and all fields, regardless of 30 language restrictions. See MagicAccessorImpl. */ 31 32abstract class FieldAccessorImpl extends MagicAccessorImpl 33 implements FieldAccessor { 34 /** Matches specification in {@link java.lang.reflect.Field} */ 35 public abstract Object get(Object obj) 36 throws IllegalArgumentException; 37 38 /** Matches specification in {@link java.lang.reflect.Field} */ 39 public abstract boolean getBoolean(Object obj) 40 throws IllegalArgumentException; 41 42 /** Matches specification in {@link java.lang.reflect.Field} */ 43 public abstract byte getByte(Object obj) 44 throws IllegalArgumentException; 45 46 /** Matches specification in {@link java.lang.reflect.Field} */ 47 public abstract char getChar(Object obj) 48 throws IllegalArgumentException; 49 50 /** Matches specification in {@link java.lang.reflect.Field} */ 51 public abstract short getShort(Object obj) 52 throws IllegalArgumentException; 53 54 /** Matches specification in {@link java.lang.reflect.Field} */ 55 public abstract int getInt(Object obj) 56 throws IllegalArgumentException; 57 58 /** Matches specification in {@link java.lang.reflect.Field} */ 59 public abstract long getLong(Object obj) 60 throws IllegalArgumentException; 61 62 /** Matches specification in {@link java.lang.reflect.Field} */ 63 public abstract float getFloat(Object obj) 64 throws IllegalArgumentException; 65 66 /** Matches specification in {@link java.lang.reflect.Field} */ 67 public abstract double getDouble(Object obj) 68 throws IllegalArgumentException; 69 70 /** Matches specification in {@link java.lang.reflect.Field} */ 71 public abstract void set(Object obj, Object value) 72 throws IllegalArgumentException, IllegalAccessException; 73 74 /** Matches specification in {@link java.lang.reflect.Field} */ 75 public abstract void setBoolean(Object obj, boolean z) 76 throws IllegalArgumentException, IllegalAccessException; 77 78 /** Matches specification in {@link java.lang.reflect.Field} */ 79 public abstract void setByte(Object obj, byte b) 80 throws IllegalArgumentException, IllegalAccessException; 81 82 /** Matches specification in {@link java.lang.reflect.Field} */ 83 public abstract void setChar(Object obj, char c) 84 throws IllegalArgumentException, IllegalAccessException; 85 86 /** Matches specification in {@link java.lang.reflect.Field} */ 87 public abstract void setShort(Object obj, short s) 88 throws IllegalArgumentException, IllegalAccessException; 89 90 /** Matches specification in {@link java.lang.reflect.Field} */ 91 public abstract void setInt(Object obj, int i) 92 throws IllegalArgumentException, IllegalAccessException; 93 94 /** Matches specification in {@link java.lang.reflect.Field} */ 95 public abstract void setLong(Object obj, long l) 96 throws IllegalArgumentException, IllegalAccessException; 97 98 /** Matches specification in {@link java.lang.reflect.Field} */ 99 public abstract void setFloat(Object obj, float f) 100 throws IllegalArgumentException, IllegalAccessException; 101 102 /** Matches specification in {@link java.lang.reflect.Field} */ 103 public abstract void setDouble(Object obj, double d) 104 throws IllegalArgumentException, IllegalAccessException; 105} 106