Path: blob/master/src/java.base/share/classes/jdk/internal/reflect/FieldAccessorImpl.java
41159 views
/*1* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package jdk.internal.reflect;2627/** Package-private implementation of the FieldAccessor interface28which has access to all classes and all fields, regardless of29language restrictions. See MagicAccessorImpl. */3031abstract class FieldAccessorImpl extends MagicAccessorImpl32implements FieldAccessor {33/** Matches specification in {@link java.lang.reflect.Field} */34public abstract Object get(Object obj)35throws IllegalArgumentException;3637/** Matches specification in {@link java.lang.reflect.Field} */38public abstract boolean getBoolean(Object obj)39throws IllegalArgumentException;4041/** Matches specification in {@link java.lang.reflect.Field} */42public abstract byte getByte(Object obj)43throws IllegalArgumentException;4445/** Matches specification in {@link java.lang.reflect.Field} */46public abstract char getChar(Object obj)47throws IllegalArgumentException;4849/** Matches specification in {@link java.lang.reflect.Field} */50public abstract short getShort(Object obj)51throws IllegalArgumentException;5253/** Matches specification in {@link java.lang.reflect.Field} */54public abstract int getInt(Object obj)55throws IllegalArgumentException;5657/** Matches specification in {@link java.lang.reflect.Field} */58public abstract long getLong(Object obj)59throws IllegalArgumentException;6061/** Matches specification in {@link java.lang.reflect.Field} */62public abstract float getFloat(Object obj)63throws IllegalArgumentException;6465/** Matches specification in {@link java.lang.reflect.Field} */66public abstract double getDouble(Object obj)67throws IllegalArgumentException;6869/** Matches specification in {@link java.lang.reflect.Field} */70public abstract void set(Object obj, Object value)71throws IllegalArgumentException, IllegalAccessException;7273/** Matches specification in {@link java.lang.reflect.Field} */74public abstract void setBoolean(Object obj, boolean z)75throws IllegalArgumentException, IllegalAccessException;7677/** Matches specification in {@link java.lang.reflect.Field} */78public abstract void setByte(Object obj, byte b)79throws IllegalArgumentException, IllegalAccessException;8081/** Matches specification in {@link java.lang.reflect.Field} */82public abstract void setChar(Object obj, char c)83throws IllegalArgumentException, IllegalAccessException;8485/** Matches specification in {@link java.lang.reflect.Field} */86public abstract void setShort(Object obj, short s)87throws IllegalArgumentException, IllegalAccessException;8889/** Matches specification in {@link java.lang.reflect.Field} */90public abstract void setInt(Object obj, int i)91throws IllegalArgumentException, IllegalAccessException;9293/** Matches specification in {@link java.lang.reflect.Field} */94public abstract void setLong(Object obj, long l)95throws IllegalArgumentException, IllegalAccessException;9697/** Matches specification in {@link java.lang.reflect.Field} */98public abstract void setFloat(Object obj, float f)99throws IllegalArgumentException, IllegalAccessException;100101/** Matches specification in {@link java.lang.reflect.Field} */102public abstract void setDouble(Object obj, double d)103throws IllegalArgumentException, IllegalAccessException;104}105106107