001: /*
002: * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025:
026: package sun.reflect;
027:
028: /** Package-private implementation of the FieldAccessor interface
029: which has access to all classes and all fields, regardless of
030: language restrictions. See MagicAccessorImpl. */
031:
032: abstract class FieldAccessorImpl extends MagicAccessorImpl implements
033: FieldAccessor {
034: /** Matches specification in {@link java.lang.reflect.Field} */
035: public abstract Object get(Object obj)
036: throws IllegalArgumentException;
037:
038: /** Matches specification in {@link java.lang.reflect.Field} */
039: public abstract boolean getBoolean(Object obj)
040: throws IllegalArgumentException;
041:
042: /** Matches specification in {@link java.lang.reflect.Field} */
043: public abstract byte getByte(Object obj)
044: throws IllegalArgumentException;
045:
046: /** Matches specification in {@link java.lang.reflect.Field} */
047: public abstract char getChar(Object obj)
048: throws IllegalArgumentException;
049:
050: /** Matches specification in {@link java.lang.reflect.Field} */
051: public abstract short getShort(Object obj)
052: throws IllegalArgumentException;
053:
054: /** Matches specification in {@link java.lang.reflect.Field} */
055: public abstract int getInt(Object obj)
056: throws IllegalArgumentException;
057:
058: /** Matches specification in {@link java.lang.reflect.Field} */
059: public abstract long getLong(Object obj)
060: throws IllegalArgumentException;
061:
062: /** Matches specification in {@link java.lang.reflect.Field} */
063: public abstract float getFloat(Object obj)
064: throws IllegalArgumentException;
065:
066: /** Matches specification in {@link java.lang.reflect.Field} */
067: public abstract double getDouble(Object obj)
068: throws IllegalArgumentException;
069:
070: /** Matches specification in {@link java.lang.reflect.Field} */
071: public abstract void set(Object obj, Object value)
072: throws IllegalArgumentException, IllegalAccessException;
073:
074: /** Matches specification in {@link java.lang.reflect.Field} */
075: public abstract void setBoolean(Object obj, boolean z)
076: throws IllegalArgumentException, IllegalAccessException;
077:
078: /** Matches specification in {@link java.lang.reflect.Field} */
079: public abstract void setByte(Object obj, byte b)
080: throws IllegalArgumentException, IllegalAccessException;
081:
082: /** Matches specification in {@link java.lang.reflect.Field} */
083: public abstract void setChar(Object obj, char c)
084: throws IllegalArgumentException, IllegalAccessException;
085:
086: /** Matches specification in {@link java.lang.reflect.Field} */
087: public abstract void setShort(Object obj, short s)
088: throws IllegalArgumentException, IllegalAccessException;
089:
090: /** Matches specification in {@link java.lang.reflect.Field} */
091: public abstract void setInt(Object obj, int i)
092: throws IllegalArgumentException, IllegalAccessException;
093:
094: /** Matches specification in {@link java.lang.reflect.Field} */
095: public abstract void setLong(Object obj, long l)
096: throws IllegalArgumentException, IllegalAccessException;
097:
098: /** Matches specification in {@link java.lang.reflect.Field} */
099: 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: }
|