1 /*
2 * Copyright (C) 2014 The Android Open Source Project
3 * Copyright (c) 1994, 2014, 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
28 package java.lang;
29
30 import java.lang.reflect.Constructor;
31 import java.lang.reflect.Type;
32 import java.lang.reflect.GenericDeclaration;
33 import java.lang.reflect.TypeVariable;
34 import java.io.Serializable;
35 import java.lang.reflect.Array;
36 import java.lang.reflect.Modifier;
37 import java.lang.reflect.Method;
38 import java.lang.reflect.Field;
39 import java.lang.reflect.Member;
40 import java.io.InputStream;
41 import java.util.HashMap;
42
43 @SuppressWarnings({"unchecked", "deprecation", "all"})
44 public final class Class<T> implements java.io.Serializable, java.lang.reflect.GenericDeclaration, java.lang.reflect.Type, java.lang.reflect.AnnotatedElement {
45
Class()46 Class() { throw new RuntimeException("Stub!"); }
47
toString()48 public java.lang.String toString() { throw new RuntimeException("Stub!"); }
49
toGenericString()50 public java.lang.String toGenericString() { throw new RuntimeException("Stub!"); }
51
forName(java.lang.String className)52 public static java.lang.Class<?> forName(java.lang.String className) throws java.lang.ClassNotFoundException { throw new RuntimeException("Stub!"); }
53
forName(java.lang.String name, boolean initialize, java.lang.ClassLoader loader)54 public static java.lang.Class<?> forName(java.lang.String name, boolean initialize, java.lang.ClassLoader loader) throws java.lang.ClassNotFoundException { throw new RuntimeException("Stub!"); }
55
newInstance()56 public native T newInstance() throws java.lang.IllegalAccessException, java.lang.InstantiationException;
57
isInstance(java.lang.Object obj)58 public boolean isInstance(java.lang.Object obj) { throw new RuntimeException("Stub!"); }
59
isAssignableFrom(java.lang.Class<?> cls)60 public boolean isAssignableFrom(java.lang.Class<?> cls) { throw new RuntimeException("Stub!"); }
61
isInterface()62 public boolean isInterface() { throw new RuntimeException("Stub!"); }
63
isArray()64 public boolean isArray() { throw new RuntimeException("Stub!"); }
65
isPrimitive()66 public boolean isPrimitive() { throw new RuntimeException("Stub!"); }
67
isFinalizable()68 public boolean isFinalizable() { throw new RuntimeException("Stub!"); }
69
isAnnotation()70 public boolean isAnnotation() { throw new RuntimeException("Stub!"); }
71
isSynthetic()72 public boolean isSynthetic() { throw new RuntimeException("Stub!"); }
73
getName()74 public java.lang.String getName() { throw new RuntimeException("Stub!"); }
75
getClassLoader()76 public java.lang.ClassLoader getClassLoader() { throw new RuntimeException("Stub!"); }
77
getTypeParameters()78 public synchronized java.lang.reflect.TypeVariable<java.lang.Class<T>>[] getTypeParameters() { throw new RuntimeException("Stub!"); }
79
getSuperclass()80 public java.lang.Class<? super T> getSuperclass() { throw new RuntimeException("Stub!"); }
81
getGenericSuperclass()82 public java.lang.reflect.Type getGenericSuperclass() { throw new RuntimeException("Stub!"); }
83
getPackage()84 public java.lang.Package getPackage() { throw new RuntimeException("Stub!"); }
85
getPackageName$()86 public java.lang.String getPackageName$() { throw new RuntimeException("Stub!"); }
87
getInterfaces()88 public java.lang.Class<?>[] getInterfaces() { throw new RuntimeException("Stub!"); }
89
getGenericInterfaces()90 public java.lang.reflect.Type[] getGenericInterfaces() { throw new RuntimeException("Stub!"); }
91
getComponentType()92 public java.lang.Class<?> getComponentType() { throw new RuntimeException("Stub!"); }
93
getModifiers()94 public int getModifiers() { throw new RuntimeException("Stub!"); }
95
getSigners()96 public java.lang.Object[] getSigners() { throw new RuntimeException("Stub!"); }
97
getEnclosingMethod()98 public java.lang.reflect.Method getEnclosingMethod() { throw new RuntimeException("Stub!"); }
99
getEnclosingConstructor()100 public java.lang.reflect.Constructor<?> getEnclosingConstructor() { throw new RuntimeException("Stub!"); }
101
getDeclaringClass()102 public native java.lang.Class<?> getDeclaringClass();
103
getEnclosingClass()104 public native java.lang.Class<?> getEnclosingClass();
105
getSimpleName()106 public java.lang.String getSimpleName() { throw new RuntimeException("Stub!"); }
107
getTypeName()108 public java.lang.String getTypeName() { throw new RuntimeException("Stub!"); }
109
getCanonicalName()110 public java.lang.String getCanonicalName() { throw new RuntimeException("Stub!"); }
111
isAnonymousClass()112 public native boolean isAnonymousClass();
113
isLocalClass()114 public boolean isLocalClass() { throw new RuntimeException("Stub!"); }
115
isMemberClass()116 public boolean isMemberClass() { throw new RuntimeException("Stub!"); }
117
getClasses()118 public java.lang.Class<?>[] getClasses() { throw new RuntimeException("Stub!"); }
119
getFields()120 public java.lang.reflect.Field[] getFields() throws java.lang.SecurityException { throw new RuntimeException("Stub!"); }
121
getMethods()122 public java.lang.reflect.Method[] getMethods() throws java.lang.SecurityException { throw new RuntimeException("Stub!"); }
123
getConstructors()124 public java.lang.reflect.Constructor<?>[] getConstructors() throws java.lang.SecurityException { throw new RuntimeException("Stub!"); }
125
getField(java.lang.String name)126 public java.lang.reflect.Field getField(java.lang.String name) throws java.lang.NoSuchFieldException { throw new RuntimeException("Stub!"); }
127
getMethod(java.lang.String name, java.lang.Class<?>... parameterTypes)128 public java.lang.reflect.Method getMethod(java.lang.String name, java.lang.Class<?>... parameterTypes) throws java.lang.NoSuchMethodException, java.lang.SecurityException { throw new RuntimeException("Stub!"); }
129
getConstructor(java.lang.Class<?>.... parameterTypes)130 public java.lang.reflect.Constructor<T> getConstructor(java.lang.Class<?>... parameterTypes) throws java.lang.NoSuchMethodException, java.lang.SecurityException { throw new RuntimeException("Stub!"); }
131
getDeclaredClasses()132 public native java.lang.Class<?>[] getDeclaredClasses();
133
getDeclaredFields()134 public native java.lang.reflect.Field[] getDeclaredFields();
135
getDeclaredFieldsUnchecked(boolean publicOnly)136 public native java.lang.reflect.Field[] getDeclaredFieldsUnchecked(boolean publicOnly);
137
getDeclaredMethods()138 public java.lang.reflect.Method[] getDeclaredMethods() throws java.lang.SecurityException { throw new RuntimeException("Stub!"); }
139
getDeclaredMethodsUnchecked(boolean publicOnly)140 public native java.lang.reflect.Method[] getDeclaredMethodsUnchecked(boolean publicOnly);
141
getDeclaredConstructors()142 public java.lang.reflect.Constructor<?>[] getDeclaredConstructors() throws java.lang.SecurityException { throw new RuntimeException("Stub!"); }
143
getDeclaredField(java.lang.String name)144 public native java.lang.reflect.Field getDeclaredField(java.lang.String name) throws java.lang.NoSuchFieldException;
145
getDeclaredMethod(java.lang.String name, java.lang.Class<?>... parameterTypes)146 public java.lang.reflect.Method getDeclaredMethod(java.lang.String name, java.lang.Class<?>... parameterTypes) throws java.lang.NoSuchMethodException, java.lang.SecurityException { throw new RuntimeException("Stub!"); }
147
getInstanceMethod(java.lang.String name, java.lang.Class<?>[] parameterTypes)148 public java.lang.reflect.Method getInstanceMethod(java.lang.String name, java.lang.Class<?>[] parameterTypes) throws java.lang.IllegalAccessException, java.lang.NoSuchMethodException { throw new RuntimeException("Stub!"); }
149
getDeclaredConstructor(java.lang.Class<?>.... parameterTypes)150 public java.lang.reflect.Constructor<T> getDeclaredConstructor(java.lang.Class<?>... parameterTypes) throws java.lang.NoSuchMethodException, java.lang.SecurityException { throw new RuntimeException("Stub!"); }
151
getResourceAsStream(java.lang.String name)152 public java.io.InputStream getResourceAsStream(java.lang.String name) { throw new RuntimeException("Stub!"); }
153
getResource(java.lang.String name)154 public java.net.URL getResource(java.lang.String name) { throw new RuntimeException("Stub!"); }
155
getProtectionDomain()156 public java.security.ProtectionDomain getProtectionDomain() { throw new RuntimeException("Stub!"); }
157
desiredAssertionStatus()158 public boolean desiredAssertionStatus() { throw new RuntimeException("Stub!"); }
159
isEnum()160 public boolean isEnum() { throw new RuntimeException("Stub!"); }
161
getEnumConstants()162 public T[] getEnumConstants() { throw new RuntimeException("Stub!"); }
163
getEnumConstantsShared()164 public T[] getEnumConstantsShared() { throw new RuntimeException("Stub!"); }
165
cast(java.lang.Object obj)166 public T cast(java.lang.Object obj) { throw new RuntimeException("Stub!"); }
167
asSubclass(java.lang.Class<U> clazz)168 public <U> java.lang.Class<? extends U> asSubclass(java.lang.Class<U> clazz) { throw new RuntimeException("Stub!"); }
169
getAnnotation(java.lang.Class<A> annotationClass)170 public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationClass) { throw new RuntimeException("Stub!"); }
171
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)172 public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) { throw new RuntimeException("Stub!"); }
173
getAnnotationsByType(java.lang.Class<A> annotationClass)174 public <A extends java.lang.annotation.Annotation> A[] getAnnotationsByType(java.lang.Class<A> annotationClass) { throw new RuntimeException("Stub!"); }
175
getAnnotations()176 public java.lang.annotation.Annotation[] getAnnotations() { throw new RuntimeException("Stub!"); }
177
getDeclaredAnnotation(java.lang.Class<A> annotationClass)178 public native <A extends java.lang.annotation.Annotation> A getDeclaredAnnotation(java.lang.Class<A> annotationClass);
179
getDeclaredAnnotations()180 public native java.lang.annotation.Annotation[] getDeclaredAnnotations();
181
isProxy()182 public boolean isProxy() { throw new RuntimeException("Stub!"); }
183
getAccessFlags()184 public int getAccessFlags() { throw new RuntimeException("Stub!"); }
185 }
186
187