/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | ClassTest.java | 91 Object.class, Class.forName("java.lang.Object")); in test_forNameLjava_lang_String() 93 Object[][].class, Class.forName("[[Ljava.lang.Object;")); in test_forNameLjava_lang_String() 96 int[].class, Class.forName("[I")); in test_forNameLjava_lang_String() 99 Class.forName("int"); in test_forNameLjava_lang_String() 105 Class.forName("byte"); in test_forNameLjava_lang_String() 110 Class.forName("char"); in test_forNameLjava_lang_String() 116 Class.forName("void"); in test_forNameLjava_lang_String() 122 Class.forName("short"); in test_forNameLjava_lang_String() 127 Class.forName("long"); in test_forNameLjava_lang_String() 133 Class.forName("boolean"); in test_forNameLjava_lang_String() [all …]
|
/libcore/libart/src/main/java/java/lang/reflect/ |
D | Proxy.java | 55 Class<?> aClass = a.getDeclaringClass(); 56 Class<?> bClass = b.getDeclaringClass(); 109 public static Class<?> getProxyClass(ClassLoader loader, Class<?>... interfaces) in getProxyClass() 121 final List<Class<?>> interfaceList = new ArrayList<Class<?>>(interfaces.length); in getProxyClass() 128 final Set<Class<?>> interfaceSet = new HashSet<Class<?>>(interfaceList); in getProxyClass() 138 Class<?> proxy = loader.proxyCache.get(interfaceList); in getProxyClass() 145 for (Class<?> c : interfaces) { in getProxyClass() 168 List<Class<?>[]> exceptions = deduplicateAndGetExceptions(methods); in getProxyClass() 170 Class<?>[][] exceptionsArray = exceptions.toArray(new Class<?>[exceptions.size()][]); in getProxyClass() 176 Class<?> result; in getProxyClass() [all …]
|
D | Constructor.java | 91 @Override public Class<T> getDeclaringClass() { in getDeclaringClass() 92 return (Class<T>) super.getDeclaringClass(); in getDeclaringClass() 100 public Class<?>[] getExceptionTypes() { in getExceptionTypes() 110 @Override public Class<?>[] getParameterTypes() { in getParameterTypes() 189 @Override public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { in isAnnotationPresent() 196 @Override public <A extends Annotation> A getAnnotation(Class<A> annotationType) { in getAnnotation() 228 Class<?>[] parameterTypes = getParameterTypes(); in getSignature() 229 for (Class<?> parameterType : parameterTypes) { in getSignature() 313 Class<?>[] parameterTypes = getParameterTypes(); in toString() 316 Class<?>[] exceptionTypes = getExceptionTypes(); in toString() [all …]
|
D | Method.java | 63 Class<?> aReturnType = a.getReturnType(); 64 Class<?> bReturnType = b.getReturnType(); 141 @Override public Class<?> getDeclaringClass() { in getDeclaringClass() 151 public Class<?>[] getExceptionTypes() { in getExceptionTypes() 160 private native Class<?>[] getExceptionTypesNative(); in getExceptionTypesNative() 169 @Override public Class<?>[] getParameterTypes() { in getParameterTypes() 179 public Class<?> getReturnType() { in getReturnType() 249 @Override public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { in isAnnotationPresent() 296 @Override public <A extends Annotation> A getAnnotation(Class<A> annotationType) { in getAnnotation() 408 Class<?>[] parameterTypes = getParameterTypes(); in toString() [all …]
|
D | AbstractMethod.java | 61 protected Class<?> declaringClass; 65 protected Class<?> declaringClassOfOverriddenMethod; 77 public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { in getAnnotation() 129 Class<?> getDeclaringClass() { in getDeclaringClass() 157 Class<?>[] getParameterTypes() { in getParameterTypes() 163 Class<?>[] parametersArray = new Class[types.length]; in getParameterTypes() 202 @Override public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) { in isAnnotationPresent() 254 Class<?>[] exceptionTypes; in getMethodOrConstructorGenericInfo() 278 protected boolean equalMethodParameters(Class<?>[] params) { in equalMethodParameters() 292 protected int compareParameters(Class<?>[] params) { in compareParameters() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
D | OldAndroidClassTest.java | 32 Class helloClass = Class.forName(OldAndroidClassTest.class.getName()); in testNewInstance() 39 Class.forName("this.class.DoesNotExist"); in testForName() 47 Class.forName(packageName + ".ClassWithPrivateConstructor").newInstance(); in testNewInstancePrivateConstructor() 54 Class helloClass = Class.forName(OldAndroidClassTest.class.getName()); in testGetDeclaredMethod() 55 Method method = helloClass.getDeclaredMethod("method", (Class[]) null); in testGetDeclaredMethod() 60 Class helloClass = Class.forName(OldAndroidClassTest.class.getName()); in testGetDeclaredMethodWithArgs() 70 Class helloClass = Class.forName(OldAndroidClassTest.class.getName()); in testGetDeclaredMethodPrivate() 71 Method method = helloClass.getDeclaredMethod("privateMethod", (Class[]) null); in testGetDeclaredMethodPrivate() 76 Class helloClass = Class.forName(OldAndroidClassTest.class.getName()); in testGetSuperclass() 77 Class objectClass = Class.forName("java.lang.Object"); in testGetSuperclass() [all …]
|
D | OldGenericTypesTest.java | 66 Class<? extends ConstructorGenericType> clazz = ConstructorGenericType.class; in testConstructorGenericType() 67 TypeVariable<Class> typeVariable = getTypeParameter(clazz); in testConstructorGenericType() 77 Class<? extends GenericType> clazz = GenericType.class; in testStaticMethodGenericType() 78 TypeVariable<Class> typeVariable = getTypeParameter(clazz); in testStaticMethodGenericType() 90 Class<? extends GenericType> clazz = GenericType.class; in testHidingMethodGenericType() 91 TypeVariable<Class> typeVariable = getTypeParameter(clazz); in testHidingMethodGenericType() 110 Class<? extends MultipleGenericTypes> clazz = MultipleGenericTypes.class; in testMultipleGenericTypes() 121 …Method multipleGenericTypesT = clazz.getDeclaredMethod("multipleGenericTypesT", new Class[]{Object… in testMultipleGenericTypes() 128 …Method multipleGenericTypesS = clazz.getDeclaredMethod("multipleGenericTypesS", new Class[]{Object… in testMultipleGenericTypes() 135 …Method multipleGenericTypesTS = clazz.getDeclaredMethod("multipleGenericTypesTS", new Class[]{Obje… in testMultipleGenericTypes() [all …]
|
D | MethodTest.java | 25 Method method = MethodTestHelper.class.getMethod("m1", new Class[0]); in test_getExceptionTypes() 26 Class[] exceptions = method.getExceptionTypes(); in test_getExceptionTypes() 37 Class[] expectedParameters = new Class[] { Object.class }; in test_getParameterTypes() 39 Class[] parameters = method.getParameterTypes(); in test_getParameterTypes() 88 Method m1 = MethodTestHelper.class.getMethod("m1", (Class[]) null); in testGetMethodWithNullArgumentsArray() 94 MethodTestHelper.class.getMethod("m2", new Class[] { null }); in testGetMethodWithNullArgument() 188 Object.class.getMethod("notify", new Class[] { }).toString()); in testMethodToString() 190 Object.class.getMethod("toString", new Class[] { }).toString()); in testMethodToString() 193 Object.class.getMethod("wait", new Class[] { long.class, int.class }).toString()); in testMethodToString() 195 Object.class.getMethod("equals", new Class[] { Object.class }).toString()); in testMethodToString() [all …]
|
D | ProxyTest.java | 48 Class[] interfacesA = { loaderA.loadClass(prefix + "$Echo") }; in testClassLoaderMustSeeImplementedInterfaces() 63 Class[] interfacesA = { loaderA.loadClass(prefix + "$Echo") }; in testClassLoaderDoesNotNeedToSeeInvocationHandlerLoader() 71 Proxy.newProxyInstance(loader, new Class[] {ReturnsInt.class, ReturnsFloat.class}, in testIncompatibleReturnTypesPrimitiveAndPrimitive() 80 Proxy.newProxyInstance(loader, new Class[] {ReturnsInt.class, ReturnsInteger.class}, in testIncompatibleReturnTypesPrimitiveAndWrapper() 89 Proxy.newProxyInstance(loader, new Class[] {ReturnsInt.class, ReturnsVoid.class}, in testIncompatibleReturnTypesPrimitiveAndVoid() 98 Proxy.newProxyInstance(loader, new Class[] {ReturnsInteger.class, ReturnsString.class }, in testIncompatibleReturnTypesIncompatibleObjects() 106 Proxy.newProxyInstance(loader, new Class[] {ReturnsString.class, ReturnsCharSequence.class}, in testCompatibleReturnTypesImplementedInterface() 108 Proxy.newProxyInstance(loader, new Class[]{ReturnsObject.class, ReturnsCharSequence.class, in testCompatibleReturnTypesImplementedInterface() 110 Proxy.newProxyInstance(loader, new Class[]{ReturnsObject.class, ReturnsCharSequence.class, in testCompatibleReturnTypesImplementedInterface() 117 Proxy.newProxyInstance(loader, new Class[] {ReturnsString.class, ReturnsObject.class}, in testCompatibleReturnTypesSuperclass() [all …]
|
D | ConstructorTest.java | 24 Constructor<?> constructor = ConstructorTestHelper.class.getConstructor(new Class[0]); in test_getExceptionTypes() 25 Class[] exceptions = constructor.getExceptionTypes(); in test_getExceptionTypes() 36 Class[] expectedParameters = new Class[] { Object.class }; in test_getParameterTypes() 38 Class[] parameters = constructor.getParameterTypes(); in test_getParameterTypes() 49 Constructor<?> constructor = ConstructorTestHelper.class.getConstructor((Class[]) null); in testGetConstructorWithNullArgumentsArray() 55 ConstructorTestHelper.class.getConstructor(new Class[] { null }); in testGetConstructorWithNullArgument()
|
/libcore/libart/src/main/java/java/lang/ |
D | Class.java | 122 public final class Class<T> implements Serializable, AnnotatedElement, GenericDeclaration, Type { class 133 private transient Class<?> componentType; 163 private transient Class<? super T> superClass; 166 private transient Class<?> verifyErrorClass; 259 private Class() { in Class() method in Class 284 public static Class<?> forName(String className) throws ClassNotFoundException { in forName() 310 public static Class<?> forName(String className, boolean shouldInitialize, in forName() 322 Class<?> result; in forName() 335 static native Class<?> classForName(String className, boolean shouldInitialize, in classForName() 346 public Class<?>[] getClasses() { in getClasses() [all …]
|
D | Enum.java | 34 private static final BasicLruCache<Class<? extends Enum>, Object[]> sharedConstantsCache 35 = new BasicLruCache<Class<? extends Enum>, Object[]>(64) { 36 @Override protected Object[] create(Class<? extends Enum> enumType) { 161 public final Class<E> getDeclaringClass() { in getDeclaringClass() 162 Class<?> myClass = getClass(); in getDeclaringClass() 163 Class<?> mySuperClass = myClass.getSuperclass(); in getDeclaringClass() 165 return (Class<E>)myClass; in getDeclaringClass() 167 return (Class<E>)mySuperClass; in getDeclaringClass() 185 public static <T extends Enum<T>> T valueOf(Class<T> enumType, String name) { in valueOf() 210 public static <T extends Enum<T>> T[] getSharedConstants(Class<T> enumType) { in getSharedConstants()
|
D | ClassLoader.java | 103 public final Map<List<Class<?>>, Class<?>> proxyCache = 104 new HashMap<List<Class<?>>, Class<?>>(); 236 protected final Class<?> defineClass(byte[] classRep, int offset, int length) in defineClass() 263 protected final Class<?> defineClass(String className, byte[] classRep, int offset, int length) in defineClass() 298 protected final Class<?> defineClass(String className, byte[] classRep, int offset, int length, in defineClass() 324 protected final Class<?> defineClass(String name, ByteBuffer b, in defineClass() 343 protected Class<?> findClass(String className) throws ClassNotFoundException { in findClass() 356 protected final Class<?> findLoadedClass(String className) { in findLoadedClass() 375 protected final Class<?> findSystemClass(String className) throws ClassNotFoundException { in findSystemClass() 376 return Class.forName(className, false, getSystemClassLoader()); in findSystemClass() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/ |
D | ConstructorTest.java | 114 Set<Class<?>> ignoreOrder = new HashSet<Class<?>>(); in test_getParameterAnnotations() 127 ctor1 = ConstructorTestHelper.class.getConstructor(new Class[0]); in test_getDeclaredAnnotations() 131 Set<Class<?>> ignoreOrder = new HashSet<Class<?>>(); in test_getDeclaredAnnotations() 181 new Class[0]); in test_equalsLjava_lang_Object() 192 Class<? extends ConstructorTestHelper> pclass = new ConstructorTestHelper().getClass(); in test_getDeclaringClass() 193 Constructor<? extends ConstructorTestHelper> ctor = pclass.getConstructor(new Class[0]); in test_getDeclaringClass() 204 Class[] exceptions = null; in test_getExceptionTypes() 205 Class<? extends IndexOutOfBoundsException> ex = null; in test_getExceptionTypes() 208 .getConstructor(new Class[0]); in test_getExceptionTypes() 224 .getConstructor(new Class[0]); in test_getModifiers() [all …]
|
D | MethodTest.java | 201 m1 = TestMethod.class.getMethod("invokeInstanceTest", new Class[0]); in test_equalsLjava_lang_Object() 203 new Class[0]); in test_equalsLjava_lang_Object() 210 m1 = TestMethod.class.getMethod("invokeStaticTest", new Class[0]); in test_equalsLjava_lang_Object() 212 .getMethod("invokeStaticTest", new Class[0]); in test_equalsLjava_lang_Object() 224 Method m1 = TestMethod.class.getMethod("invokeInstanceTest", new Class[0]); in test_getMethod() 225 Method m2 = TestMethod.class.getMethod("invokeInstanceTest", (Class[]) null); in test_getMethod() 234 Method m1 = TestMethod.class.getDeclaredMethod("invokeInstanceTest", new Class[0]); in test_getDeclaredMethod() 235 Method m2 = TestMethod.class.getDeclaredMethod("invokeInstanceTest", (Class[]) null); in test_getDeclaredMethod() 267 Method mth = TestMethod.class.getMethod("voidMethod", new Class[0]); in test_getExceptionTypes() 268 Class[] ex = mth.getExceptionTypes(); in test_getExceptionTypes() [all …]
|
D | ProxyTest.java | 72 Class proxy = Proxy.getProxyClass(Support_Proxy_I1.class in test_getProxyClassLjava_lang_ClassLoader$Ljava_lang_Class() 73 .getClassLoader(), new Class[] { Support_Proxy_I1.class }); in test_getProxyClassLjava_lang_ClassLoader$Ljava_lang_Class() 82 new Class[] { Comparable.class }))); in test_getProxyClassLjava_lang_ClassLoader$Ljava_lang_Class() 86 (Class<?>[]) null); in test_getProxyClassLjava_lang_ClassLoader$Ljava_lang_Class() 93 new Class<?>[] {Support_Proxy_I1.class, null}); in test_getProxyClassLjava_lang_ClassLoader$Ljava_lang_Class() 120 .getClassLoader(), new Class[] { Support_Proxy_I1.class, in test_newProxyInstanceLjava_lang_ClassLoader$Ljava_lang_ClassLjava_lang_reflect_InvocationHandler() 175 .getClassLoader(), new Class[] { Broken1.class }, in test_newProxyInstanceLjava_lang_ClassLoader$Ljava_lang_ClassLjava_lang_reflect_InvocationHandler() 186 Class proxy = Proxy.getProxyClass(Support_Proxy_I1.class in test_isProxyClassLjava_lang_Class() 187 .getClassLoader(), new Class[] { Support_Proxy_I1.class }); in test_isProxyClassLjava_lang_Class() 228 .getClassLoader(), new Class[] { Support_Proxy_I1.class }, in test_getInvocationHandlerLjava_lang_Object() [all …]
|
D | TypeVariableTest.java | 32 Class<? extends A> clazz = A.class; in testSimpleTypeVariableOnClass() 35 TypeVariable<Class> typeVariable = typeParameters[0]; in testSimpleTypeVariableOnClass() 47 Class<? extends B> clazz = B.class; in testSimpleTypeVariableOnMethod() 63 Class<? extends C> clazz = C.class; in testSimpleTypeVariableOnConstructor() 77 Class<? extends D> clazz = D.class; in testMultipleTypeVariablesOnClass() 95 Class<? extends E> clazz = E.class; in testMultipleTypeVariablesOnMethod() 114 Class<? extends F> clazz = F.class; in testMultipleTypeVariablesOnConstructor() 132 Class<? extends G> clazz = G.class; in testSingleBound() 134 TypeVariable<Class> typeVariable = typeParameters[0]; in testSingleBound() 142 Class<? extends H> clazz = H.class; in testMultipleBound() [all …]
|
/libcore/luni/src/main/java/libcore/reflect/ |
D | AnnotationAccess.java | 54 private static final Class<?>[] NO_ARGUMENTS = null; 67 Class<?> c, Class<A> annotationType) { in getAnnotation() 78 for (Class<?> sup = c.getSuperclass(); sup != null; sup = sup.getSuperclass()) { in getAnnotation() 94 private static boolean isInherited(Class<? extends Annotation> annotationType) { in isInherited() 98 public static Annotation[] getAnnotations(Class<?> c) { in getAnnotations() 110 HashMap<Class<?>, Annotation> map = new HashMap<Class<?>, Annotation>(); in getAnnotations() 114 for (Class<?> sup = c.getSuperclass(); sup != null; sup = sup.getSuperclass()) { in getAnnotations() 116 Class<? extends Annotation> clazz = declaredAnnotation.annotationType(); in getAnnotations() 132 Class<?> c, Class<? extends Annotation> annotationType) { in isAnnotationPresent() 142 for (Class<?> sup = c.getSuperclass(); sup != null; sup = sup.getSuperclass()) { in isAnnotationPresent() [all …]
|
/libcore/luni/src/main/java/java/io/ |
D | ObjectStreamField.java | 60 public ObjectStreamField(String name, Class<?> cl) { in ObjectStreamField() 79 public ObjectStreamField(String name, Class<?> cl, boolean unshared) { in ObjectStreamField() 86 this.type = (cl.getClassLoader() == null) ? cl : new WeakReference<Class<?>>(cl); in ObjectStreamField() 161 /* package */ Class<?> getTypeInternal() { in getTypeInternal() 163 return (Class<?>) ((WeakReference<?>) type).get(); in getTypeInternal() 165 return (Class<?>) type; in getTypeInternal() 173 public Class<?> getType() { in getType() 174 Class<?> cl = getTypeInternal(); in getType() 204 private char typeCodeOf(Class<?> type) { in typeCodeOf() 240 Class<?> t = getTypeInternal(); in getTypeString() [all …]
|
D | ObjectStreamClass.java | 70 private static final Class<?>[] READ_PARAM_TYPES = new Class[] { ObjectInputStream.class }; 71 private static final Class<?>[] WRITE_PARAM_TYPES = new Class[] { ObjectOutputStream.class }; 81 static final Class<?> ARRAY_OF_FIELDS; 85 ARRAY_OF_FIELDS = Class.forName("[Ljava.io.ObjectStreamField;"); 99 private static final Class<Serializable> SERIALIZABLE = Serializable.class; 101 private static final Class<Externalizable> EXTERNALIZABLE = Externalizable.class; 104 static final Class<String> STRINGCLASS = String.class; 106 static final Class<?> CLASSCLASS = Class.class; 108 static final Class<ObjectStreamClass> OBJECTSTREAMCLASSCLASS = ObjectStreamClass.class; 147 private transient Class<?> resolvedClass; [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | ReflectionBenchmark.java | 33 Class<?> klass = C.class; in timeClass_getField() 40 Class<?> klass = C.class; in timeClass_getDeclaredField() 47 Class<?> klass = C.class; in timeClass_getConstructor() 54 Class<?> klass = C.class; in timeClass_newInstance() 62 Class<?> klass = C.class; in timeClass_getMethod() 69 Class<?> klass = C.class; in timeClass_getDeclaredMethod() 76 Class<?> klass = C.class; in timeField_setInt() 85 Class<?> klass = C.class; in timeField_getInt() 94 Class<?> klass = C.class; in timeMethod_invokeV() 103 Class<?> klass = C.class; in timeMethod_invokeStaticV() [all …]
|
/libcore/luni/src/main/java/java/sql/ |
D | Array.java | 70 public Object getArray(long index, int count, Map<String, Class<?>> map) in getArray() 83 public Object getArray(Map<String, Class<?>> map) throws SQLException; in getArray() 150 Map<String, Class<?>> map) throws SQLException; in getResultSet() 163 public ResultSet getResultSet(Map<String, Class<?>> map) in getResultSet()
|
/libcore/libart/src/main/java/sun/misc/ |
D | Unsafe.java | 79 public int arrayBaseOffset(Class clazz) { in arrayBaseOffset() 80 Class<?> component = clazz.getComponentType(); in arrayBaseOffset() 93 public int arrayIndexScale(Class clazz) { in arrayIndexScale() 94 Class<?> component = clazz.getComponentType(); in arrayIndexScale() 101 private static native int getArrayBaseOffsetForComponentType(Class component_class); in getArrayBaseOffsetForComponentType() 102 private static native int getArrayIndexScaleForComponentType(Class component_class); in getArrayIndexScaleForComponentType() 323 public native Object allocateInstance(Class<?> c); in allocateInstance()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | OldClassTest.java | 81 static class StaticMember$Class { 86 class Member$Class { 245 Class<? extends Annotation> type = annotations[i].annotationType(); in test_getAnnotations() 256 Class<?> [] classes = {PublicTestClass.class, ExtendTestClass.class, in test_forNameLjava_lang_StringLbooleanLClassLoader() 260 Class<?> clazz = Class.forName(classes[i].getName(), true, pcl); in test_forNameLjava_lang_StringLbooleanLClassLoader() 263 clazz = Class.forName(classes[i].getName(), false, pcl); in test_forNameLjava_lang_StringLbooleanLClassLoader() 267 Class<?> [] systemClasses = {String.class, Integer.class, Object.class, in test_forNameLjava_lang_StringLbooleanLClassLoader() 271 Class<?> clazz = Class.forName(systemClasses[i].getName(), true, in test_forNameLjava_lang_StringLbooleanLClassLoader() 275 clazz = Class.forName(systemClasses[i].getName(), false, in test_forNameLjava_lang_StringLbooleanLClassLoader() 281 Class.forName(null, true, pcl); in test_forNameLjava_lang_StringLbooleanLClassLoader() [all …]
|
/libcore/luni/src/test/java/libcore/java/math/ |
D | RunCSVTestsStrict.java | 26 Class<StrictMath> mathClass = StrictMath.class; in runTest() 27 Method m = mathClass.getMethod(func, new Class[] { Double.TYPE }); in runTest() 45 Class<StrictMath> mathClass = StrictMath.class; in run2InputTest() 49 m = mathClass.getMethod(func, new Class[] { Double.TYPE, Integer.TYPE }); in run2InputTest() 52 m = mathClass.getMethod(func, new Class[] { Double.TYPE, Double.TYPE }); in run2InputTest()
|