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 
86 @libcore.api.CorePlatformApi
getPackageName$()87 public java.lang.String getPackageName$() { throw new RuntimeException("Stub!"); }
88 
getInterfaces()89 public java.lang.Class<?>[] getInterfaces() { throw new RuntimeException("Stub!"); }
90 
getGenericInterfaces()91 public java.lang.reflect.Type[] getGenericInterfaces() { throw new RuntimeException("Stub!"); }
92 
getComponentType()93 public java.lang.Class<?> getComponentType() { throw new RuntimeException("Stub!"); }
94 
getModifiers()95 public int getModifiers() { throw new RuntimeException("Stub!"); }
96 
getSigners()97 public java.lang.Object[] getSigners() { throw new RuntimeException("Stub!"); }
98 
getEnclosingMethod()99 public java.lang.reflect.Method getEnclosingMethod() { throw new RuntimeException("Stub!"); }
100 
getEnclosingConstructor()101 public java.lang.reflect.Constructor<?> getEnclosingConstructor() { throw new RuntimeException("Stub!"); }
102 
getDeclaringClass()103 public native java.lang.Class<?> getDeclaringClass();
104 
getEnclosingClass()105 public native java.lang.Class<?> getEnclosingClass();
106 
getSimpleName()107 public java.lang.String getSimpleName() { throw new RuntimeException("Stub!"); }
108 
getTypeName()109 public java.lang.String getTypeName() { throw new RuntimeException("Stub!"); }
110 
getCanonicalName()111 public java.lang.String getCanonicalName() { throw new RuntimeException("Stub!"); }
112 
isAnonymousClass()113 public native boolean isAnonymousClass();
114 
isLocalClass()115 public boolean isLocalClass() { throw new RuntimeException("Stub!"); }
116 
isMemberClass()117 public boolean isMemberClass() { throw new RuntimeException("Stub!"); }
118 
getClasses()119 public java.lang.Class<?>[] getClasses() { throw new RuntimeException("Stub!"); }
120 
getFields()121 public java.lang.reflect.Field[] getFields() throws java.lang.SecurityException { throw new RuntimeException("Stub!"); }
122 
getMethods()123 public java.lang.reflect.Method[] getMethods() throws java.lang.SecurityException { throw new RuntimeException("Stub!"); }
124 
getConstructors()125 public java.lang.reflect.Constructor<?>[] getConstructors() throws java.lang.SecurityException { throw new RuntimeException("Stub!"); }
126 
getField(java.lang.String name)127 public java.lang.reflect.Field getField(java.lang.String name) throws java.lang.NoSuchFieldException { throw new RuntimeException("Stub!"); }
128 
getMethod(java.lang.String name, java.lang.Class<?>... parameterTypes)129 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!"); }
130 
getConstructor(java.lang.Class<?>.... parameterTypes)131 public java.lang.reflect.Constructor<T> getConstructor(java.lang.Class<?>... parameterTypes) throws java.lang.NoSuchMethodException, java.lang.SecurityException { throw new RuntimeException("Stub!"); }
132 
getDeclaredClasses()133 public native java.lang.Class<?>[] getDeclaredClasses();
134 
getDeclaredFields()135 public native java.lang.reflect.Field[] getDeclaredFields();
136 
137 @libcore.api.CorePlatformApi
getDeclaredFieldsUnchecked(boolean publicOnly)138 public native java.lang.reflect.Field[] getDeclaredFieldsUnchecked(boolean publicOnly);
139 
getDeclaredMethods()140 public java.lang.reflect.Method[] getDeclaredMethods() throws java.lang.SecurityException { throw new RuntimeException("Stub!"); }
141 
142 @libcore.api.CorePlatformApi
getDeclaredMethodsUnchecked(boolean publicOnly)143 public native java.lang.reflect.Method[] getDeclaredMethodsUnchecked(boolean publicOnly);
144 
getDeclaredConstructors()145 public java.lang.reflect.Constructor<?>[] getDeclaredConstructors() throws java.lang.SecurityException { throw new RuntimeException("Stub!"); }
146 
getDeclaredField(java.lang.String name)147 public native java.lang.reflect.Field getDeclaredField(java.lang.String name) throws java.lang.NoSuchFieldException;
148 
getDeclaredMethod(java.lang.String name, java.lang.Class<?>... parameterTypes)149 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!"); }
150 
getInstanceMethod(java.lang.String name, java.lang.Class<?>[] parameterTypes)151 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!"); }
152 
getDeclaredConstructor(java.lang.Class<?>.... parameterTypes)153 public java.lang.reflect.Constructor<T> getDeclaredConstructor(java.lang.Class<?>... parameterTypes) throws java.lang.NoSuchMethodException, java.lang.SecurityException { throw new RuntimeException("Stub!"); }
154 
getResourceAsStream(java.lang.String name)155 public java.io.InputStream getResourceAsStream(java.lang.String name) { throw new RuntimeException("Stub!"); }
156 
getResource(java.lang.String name)157 public java.net.URL getResource(java.lang.String name) { throw new RuntimeException("Stub!"); }
158 
getProtectionDomain()159 public java.security.ProtectionDomain getProtectionDomain() { throw new RuntimeException("Stub!"); }
160 
desiredAssertionStatus()161 public boolean desiredAssertionStatus() { throw new RuntimeException("Stub!"); }
162 
isEnum()163 public boolean isEnum() { throw new RuntimeException("Stub!"); }
164 
getEnumConstants()165 public T[] getEnumConstants() { throw new RuntimeException("Stub!"); }
166 
getEnumConstantsShared()167 public T[] getEnumConstantsShared() { throw new RuntimeException("Stub!"); }
168 
cast(java.lang.Object obj)169 public T cast(java.lang.Object obj) { throw new RuntimeException("Stub!"); }
170 
asSubclass(java.lang.Class<U> clazz)171 public <U> java.lang.Class<? extends U> asSubclass(java.lang.Class<U> clazz) { throw new RuntimeException("Stub!"); }
172 
getAnnotation(java.lang.Class<A> annotationClass)173 public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationClass) { throw new RuntimeException("Stub!"); }
174 
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)175 public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass) { throw new RuntimeException("Stub!"); }
176 
getAnnotationsByType(java.lang.Class<A> annotationClass)177 public <A extends java.lang.annotation.Annotation> A[] getAnnotationsByType(java.lang.Class<A> annotationClass) { throw new RuntimeException("Stub!"); }
178 
getAnnotations()179 public java.lang.annotation.Annotation[] getAnnotations() { throw new RuntimeException("Stub!"); }
180 
getDeclaredAnnotation(java.lang.Class<A> annotationClass)181 public native <A extends java.lang.annotation.Annotation> A getDeclaredAnnotation(java.lang.Class<A> annotationClass);
182 
getDeclaredAnnotations()183 public native java.lang.annotation.Annotation[] getDeclaredAnnotations();
184 
isProxy()185 public boolean isProxy() { throw new RuntimeException("Stub!"); }
186 
getAccessFlags()187 public int getAccessFlags() { throw new RuntimeException("Stub!"); }
188 }
189 
190