1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 only, as
8  * published by the Free Software Foundation.  Oracle designates this
9  * particular file as subject to the "Classpath" exception as provided
10  * by Oracle in the LICENSE file that accompanied this code.
11  *
12  * This code is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15  * version 2 for more details (a copy is included in the LICENSE file that
16  * accompanied this code).
17  *
18  * You should have received a copy of the GNU General Public License version
19  * 2 along with this work; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21  *
22  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23  * or visit www.oracle.com if you need additional information or have any
24  * questions.
25  */
26 
27 package java.lang.reflect;
28 
29 import dalvik.annotation.compat.UnsupportedAppUsage;
30 
31 @SuppressWarnings({"unchecked", "deprecation", "all"})
32 public final class Field extends java.lang.reflect.AccessibleObject
33         implements java.lang.reflect.Member {
34 
Field()35     private Field() {
36         throw new RuntimeException("Stub!");
37     }
38 
getDeclaringClass()39     public java.lang.Class<?> getDeclaringClass() {
40         throw new RuntimeException("Stub!");
41     }
42 
getName()43     public java.lang.String getName() {
44         throw new RuntimeException("Stub!");
45     }
46 
getNameInternal()47     private native java.lang.String getNameInternal();
48 
getModifiers()49     public int getModifiers() {
50         throw new RuntimeException("Stub!");
51     }
52 
isEnumConstant()53     public boolean isEnumConstant() {
54         throw new RuntimeException("Stub!");
55     }
56 
isSynthetic()57     public boolean isSynthetic() {
58         throw new RuntimeException("Stub!");
59     }
60 
getType()61     public java.lang.Class<?> getType() {
62         throw new RuntimeException("Stub!");
63     }
64 
getGenericType()65     public java.lang.reflect.Type getGenericType() {
66         throw new RuntimeException("Stub!");
67     }
68 
getSignatureAttribute()69     private java.lang.String getSignatureAttribute() {
70         throw new RuntimeException("Stub!");
71     }
72 
getSignatureAnnotation()73     private native java.lang.String[] getSignatureAnnotation();
74 
equals(java.lang.Object obj)75     public boolean equals(java.lang.Object obj) {
76         throw new RuntimeException("Stub!");
77     }
78 
hashCode()79     public int hashCode() {
80         throw new RuntimeException("Stub!");
81     }
82 
toString()83     public java.lang.String toString() {
84         throw new RuntimeException("Stub!");
85     }
86 
toGenericString()87     public java.lang.String toGenericString() {
88         throw new RuntimeException("Stub!");
89     }
90 
get(java.lang.Object obj)91     public native java.lang.Object get(java.lang.Object obj)
92             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
93 
getBoolean(java.lang.Object obj)94     public native boolean getBoolean(java.lang.Object obj)
95             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
96 
getByte(java.lang.Object obj)97     public native byte getByte(java.lang.Object obj)
98             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
99 
getChar(java.lang.Object obj)100     public native char getChar(java.lang.Object obj)
101             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
102 
getShort(java.lang.Object obj)103     public native short getShort(java.lang.Object obj)
104             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
105 
getInt(java.lang.Object obj)106     public native int getInt(java.lang.Object obj)
107             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
108 
getLong(java.lang.Object obj)109     public native long getLong(java.lang.Object obj)
110             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
111 
getFloat(java.lang.Object obj)112     public native float getFloat(java.lang.Object obj)
113             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
114 
getDouble(java.lang.Object obj)115     public native double getDouble(java.lang.Object obj)
116             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
117 
set(java.lang.Object obj, java.lang.Object value)118     public native void set(java.lang.Object obj, java.lang.Object value)
119             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
120 
setBoolean(java.lang.Object obj, boolean z)121     public native void setBoolean(java.lang.Object obj, boolean z)
122             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
123 
setByte(java.lang.Object obj, byte b)124     public native void setByte(java.lang.Object obj, byte b)
125             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
126 
setChar(java.lang.Object obj, char c)127     public native void setChar(java.lang.Object obj, char c)
128             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
129 
setShort(java.lang.Object obj, short s)130     public native void setShort(java.lang.Object obj, short s)
131             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
132 
setInt(java.lang.Object obj, int i)133     public native void setInt(java.lang.Object obj, int i)
134             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
135 
setLong(java.lang.Object obj, long l)136     public native void setLong(java.lang.Object obj, long l)
137             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
138 
setFloat(java.lang.Object obj, float f)139     public native void setFloat(java.lang.Object obj, float f)
140             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
141 
setDouble(java.lang.Object obj, double d)142     public native void setDouble(java.lang.Object obj, double d)
143             throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
144 
getAnnotation( java.lang.Class<T> annotationClass)145     public <T extends java.lang.annotation.Annotation> T getAnnotation(
146             java.lang.Class<T> annotationClass) {
147         throw new RuntimeException("Stub!");
148     }
149 
getAnnotationNative( java.lang.Class<A> annotationType)150     private native <A extends java.lang.annotation.Annotation> A getAnnotationNative(
151             java.lang.Class<A> annotationType);
152 
getAnnotationsByType( java.lang.Class<T> annotationClass)153     public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(
154             java.lang.Class<T> annotationClass) {
155         throw new RuntimeException("Stub!");
156     }
157 
isAnnotationPresent( java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)158     public boolean isAnnotationPresent(
159             java.lang.Class<? extends java.lang.annotation.Annotation> annotationType) {
160         throw new RuntimeException("Stub!");
161     }
162 
isAnnotationPresentNative( java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)163     private native boolean isAnnotationPresentNative(
164             java.lang.Class<? extends java.lang.annotation.Annotation> annotationType);
165 
getDeclaredAnnotations()166     public native java.lang.annotation.Annotation[] getDeclaredAnnotations();
167 
getDexFieldIndex()168     public int getDexFieldIndex() {
169         throw new RuntimeException("Stub!");
170     }
171 
172     @UnsupportedAppUsage
getOffset()173     public int getOffset() {
174         throw new RuntimeException("Stub!");
175     }
176 
getArtField()177     public native long getArtField();
178 
179     @UnsupportedAppUsage
180     private int accessFlags;
181 
182     private java.lang.Class<?> declaringClass;
183 
184     private int dexFieldIndex;
185 
186     private int offset;
187 
188     private java.lang.Class<?> type;
189 }
190