/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
D | OldAndroidClassTest.java | 231 Class<?> clazz = this.getClass(); in testVariousClassNames() local 232 String pkg = (clazz.getPackage() == null ? "" : clazz.getPackage().getName() + "."); in testVariousClassNames() 236 assertEquals(pkg + "OldAndroidClassTest", clazz.getName()); in testVariousClassNames() 237 assertEquals("OldAndroidClassTest", clazz.getSimpleName()); in testVariousClassNames() 238 assertEquals(pkg + "OldAndroidClassTest", clazz.getCanonicalName()); in testVariousClassNames() 240 clazz = MemberClass.class; in testVariousClassNames() 242 assertEquals(pkg + "OldAndroidClassTest$MemberClass", clazz.getName()); in testVariousClassNames() 243 assertEquals("MemberClass", clazz.getSimpleName()); in testVariousClassNames() 244 assertEquals(pkg + "OldAndroidClassTest.MemberClass", clazz.getCanonicalName()); in testVariousClassNames() 250 clazz = LocalClass.class; in testVariousClassNames() [all …]
|
D | OldGenericTypesTest.java | 66 Class<? extends ConstructorGenericType> clazz = ConstructorGenericType.class; in testConstructorGenericType() local 67 TypeVariable<Class> typeVariable = getTypeParameter(clazz); in testConstructorGenericType() 68 Constructor<?> constructor = clazz.getDeclaredConstructor(Object.class); in testConstructorGenericType() 77 Class<? extends GenericType> clazz = GenericType.class; in testStaticMethodGenericType() local 78 TypeVariable<Class> typeVariable = getTypeParameter(clazz); in testStaticMethodGenericType() 80 Method method = clazz.getDeclaredMethod("staticMethodGenericType", Object.class); in testStaticMethodGenericType() 90 Class<? extends GenericType> clazz = GenericType.class; in testHidingMethodGenericType() local 91 TypeVariable<Class> typeVariable = getTypeParameter(clazz); in testHidingMethodGenericType() 93 Method method = clazz.getDeclaredMethod("hidingMethodGenericType", Object.class); in testHidingMethodGenericType() 110 Class<? extends MultipleGenericTypes> clazz = MultipleGenericTypes.class; in testMultipleGenericTypes() local [all …]
|
D | OldGenericReflectionCornerCases.java | 40 Class<? extends WildcardEquality> clazz = WildcardEquality.class; in testWildcardEquality() local 42 Method method = clazz.getDeclaredMethod("wildcardEquality", Pair.class); in testWildcardEquality() 43 TypeVariable<?>[] typeParameters = clazz.getTypeParameters(); in testWildcardEquality() 83 Class<? extends WildcardUnEquality> clazz = WildcardUnEquality.class; in testWildcardUnEquality() local 85 Method method = clazz.getDeclaredMethod("wildcardUnEquality", Pair.class); in testWildcardUnEquality() 86 TypeVariable<?>[] typeParameters = clazz.getTypeParameters(); in testWildcardUnEquality() 125 …Class<? extends MultipleBoundedWildcardUnEquality> clazz = MultipleBoundedWildcardUnEquality.class; in testMultipleBoundedWildcardUnEquality() local 130 Method method = clazz.getDeclaredMethod("multipleBoundedWildcardUnEquality", Pair.class); in testMultipleBoundedWildcardUnEquality() 131 TypeVariable<?>[] typeParameters = clazz.getTypeParameters(); in testMultipleBoundedWildcardUnEquality() 180 … Class<? extends MultipleBoundedWildcardEquality> clazz = MultipleBoundedWildcardEquality.class; in testMultipleBoundedWildcard() local [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/ |
D | TypeVariableTest.java | 32 Class<? extends A> clazz = A.class; in testSimpleTypeVariableOnClass() local 33 TypeVariable[] typeParameters = clazz.getTypeParameters(); in testSimpleTypeVariableOnClass() 36 assertEquals(clazz, typeVariable.getGenericDeclaration()); in testSimpleTypeVariableOnClass() 49 Class<? extends B> clazz = B.class; in testSimpleTypeVariableOnMethod() local 50 Method method = clazz.getDeclaredMethod("b"); in testSimpleTypeVariableOnMethod() 67 Class<? extends C> clazz = C.class; in testSimpleTypeVariableOnConstructor() local 68 Constructor<?> constructor = clazz.getDeclaredConstructor(); in testSimpleTypeVariableOnConstructor() 83 Class<? extends D> clazz = D.class; in testMultipleTypeVariablesOnClass() local 84 TypeVariable<?>[] typeParameters = clazz.getTypeParameters(); in testMultipleTypeVariablesOnClass() 87 assertEquals(clazz, typeParameters[0].getGenericDeclaration()); in testMultipleTypeVariablesOnClass() [all …]
|
D | GenericArrayTypeTest.java | 35 Class<? extends A> clazz = GenericArrayTypeTest.A.class; in testGetGenericComponentType() local 36 Field field = clazz.getDeclaredField("array"); in testGetGenericComponentType() 43 assertEquals(getTypeParameter(clazz), componentType); in testGetGenericComponentType() 47 assertEquals(clazz, componentTypeVariable.getGenericDeclaration()); in testGetGenericComponentType() 55 Class<? extends B> clazz = GenericArrayTypeTest.B.class; in testParameterizedComponentType() local 56 Field field = clazz.getDeclaredField("array"); in testParameterizedComponentType() 68 assertEquals(clazz, parameterizedType.getRawType()); in testParameterizedComponentType() 69 assertEquals(clazz.getTypeParameters()[0], parameterizedType.getActualTypeArguments()[0]); in testParameterizedComponentType()
|
D | GenericMethodsTests.java | 42 private static Class<? extends GenericMethods> clazz = GenericMethodsTests.GenericMethods.class; field in GenericMethodsTests 48 assertLenghtZero(clazz.getTypeParameters()); in testGenericMethods() 87 Method method = clazz.getMethod("noParamNoReturn"); in testNoParamNoReturn() 92 Method method = clazz.getMethod("paramNoReturn", Object.class); in testParamNoReturn() 98 Method method = clazz.getMethod("noParamReturn"); in testNoParamReturn() 104 Method method = clazz.getMethod("paramReturn", Object.class); in testParamReturn() 110 Method method0 = clazz.getMethod("paramNoReturn", Object.class); in testIndependencyOfMethodTypeParameters() 113 Method method1 = clazz.getMethod("noParamNoReturn"); in testIndependencyOfMethodTypeParameters()
|
D | ParameterizedTypeTest.java | 32 Class<? extends B> clazz = B.class; in testStringParameterizedSuperClass() local 33 Type genericSuperclass = clazz.getGenericSuperclass(); in testStringParameterizedSuperClass() 53 Class<? extends D> clazz = D.class; in testTypeParameterizedSuperClass() local 54 Type genericSuperclass = clazz.getGenericSuperclass(); in testTypeParameterizedSuperClass() 76 Class<? extends F> clazz = F.class; in testParameterizedMemeber() local 77 Field field = clazz.getDeclaredField("e"); in testParameterizedMemeber() 89 assertEquals(getTypeParameter(clazz), actualTypeArguments[0]); in testParameterizedMemeber()
|
D | BoundedGenericMethodsTests.java | 41 …private static Class<? extends BoundedGenericMethods> clazz = BoundedGenericMethodsTests.BoundedGe… field in BoundedGenericMethodsTests 105 assertLenghtOne(clazz.getTypeParameters()); in testBoundedGenericMethods() 108 Method method = clazz.getMethod("noParamNoReturn"); in testNoParamNoReturn() 112 Method method = clazz.getMethod("paramNoReturn", BoundedGenericMethods.class); in testUnboundedParamNoReturn() 117 Method method = clazz.getMethod("noParamReturn"); in testNoParamReturn() 123 Method method = clazz.getMethod("paramReturn", BoundedGenericMethods.class); in testUnboundedParamReturn()
|
/libcore/ojluni/src/main/java/sun/security/jca/ |
D | GetInstance.java | 152 public static Instance getInstance(String type, Class<?> clazz, in getInstance() argument 164 return getInstance(firstService, clazz); in getInstance() 176 return getInstance(s, clazz); in getInstance() 184 public static Instance getInstance(String type, Class<?> clazz, in getInstance() argument 190 return getInstance(s, clazz, param); in getInstance() 203 public static Instance getInstance(String type, Class<?> clazz, in getInstance() argument 206 return getInstance(getService(type, algorithm, provider), clazz); in getInstance() 209 public static Instance getInstance(String type, Class<?> clazz, in getInstance() argument 212 return getInstance(getService(type, algorithm, provider), clazz, param); in getInstance() 215 public static Instance getInstance(String type, Class<?> clazz, in getInstance() argument [all …]
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | ObjectStreamClassTest.java | 109 public void computeDefaultSUID_current(Class<?> clazz, long suid, in computeDefaultSUID_current() argument 111 checkSerialVersionUID(suid, clazz, false); in computeDefaultSUID_current() 117 public void computeDefaultSUID_targetSdkVersion_23(Class<?> clazz, long suid, long suid23) { in computeDefaultSUID_targetSdkVersion_23() argument 120 checkSerialVersionUID(suid23, clazz, expectedWarning); in computeDefaultSUID_targetSdkVersion_23() 124 long expectedSUID, Class<?> clazz, boolean expectedWarning) { in checkSerialVersionUID() argument 133 savedListener.warnDefaultSUIDTargetVersionDependent(clazz, hash); in checkSerialVersionUID() 135 assertEquals(clazz, c); in checkSerialVersionUID() 146 defaultSUID = (Long) computeDefaultSUIDMethod.invoke(null, clazz); in checkSerialVersionUID()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | OldClassTest.java | 115 Object clazz; field in OldClassTest.PublicTestClass 120 clazz = new LocalClass(); in PublicTestClass() 260 Class<?> clazz = Class.forName(classes[i].getName(), true, pcl); in test_forNameLjava_lang_StringLbooleanLClassLoader() local 261 assertEquals(classes[i], clazz); in test_forNameLjava_lang_StringLbooleanLClassLoader() 263 clazz = Class.forName(classes[i].getName(), false, pcl); in test_forNameLjava_lang_StringLbooleanLClassLoader() 264 assertEquals(classes[i], clazz); in test_forNameLjava_lang_StringLbooleanLClassLoader() 271 Class<?> clazz = Class.forName(systemClasses[i].getName(), true, in test_forNameLjava_lang_StringLbooleanLClassLoader() local 273 assertEquals(systemClasses[i], clazz); in test_forNameLjava_lang_StringLbooleanLClassLoader() 275 clazz = Class.forName(systemClasses[i].getName(), false, in test_forNameLjava_lang_StringLbooleanLClassLoader() 277 assertEquals(systemClasses[i], clazz); in test_forNameLjava_lang_StringLbooleanLClassLoader() [all …]
|
D | ClassTest.java | 169 Class clazz = getPrimitiveType(name); in checkPrimitiveType() local 170 assertEquals(name, clazz.getName()); in checkPrimitiveType() 171 assertTrue(clazz.isPrimitive()); in checkPrimitiveType() 172 assertEquals(expected, clazz); in checkPrimitiveType() 300 private static void assertToString(String expected, Class<?> clazz) { in assertToString() argument 301 assertEquals(expected, clazz.toString()); in assertToString() 329 private void assertGetTypeName(String expected, Class<?> clazz) { in assertGetTypeName() argument 330 assertEquals(expected, clazz.getTypeName()); in assertGetTypeName() 366 private static void assertToGenericString(String expected, Class<?> clazz) { in assertToGenericString() argument 367 assertEquals(expected, clazz.toGenericString()); in assertToGenericString()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | ClassTest.java | 471 Class<?> clazz = null; in test_isArray() local 472 clazz = Class.forName("[I"); in test_isArray() 473 assertTrue("int Array type claims not to be.", clazz.isArray()); in test_isArray() 475 clazz = Class.forName("[Ljava.lang.Object;"); in test_isArray() 476 assertTrue("Object Array type claims not to be.", clazz.isArray()); in test_isArray() 478 clazz = Class.forName("java.lang.Object"); in test_isArray() 479 assertTrue("Non-array Object type claims to be.", !clazz.isArray()); in test_isArray() 506 Class<?> clazz = null; in test_isInterface() local 507 clazz = Class.forName("[I"); in test_isInterface() 508 assertTrue("Prim Array type claims to be interface.", !clazz.isInterface()); in test_isInterface() [all …]
|
/libcore/ojluni/src/main/java/sun/reflect/misc/ |
D | ReflectUtil.java | 128 public static void checkPackageAccess(Class<?> clazz) { in checkPackageAccess() argument 129 checkPackageAccess(clazz.getName()); in checkPackageAccess() 130 if (isNonPublicProxyClass(clazz)) { in checkPackageAccess() 131 checkProxyPackageAccess(clazz); in checkPackageAccess() 158 public static boolean isPackageAccessible(Class<?> clazz) { in isPackageAccessible() argument 160 checkPackageAccess(clazz); in isPackageAccessible() 207 public static void checkProxyPackageAccess(Class<?> clazz) { in checkProxyPackageAccess() argument 211 if (Proxy.isProxyClass(clazz)) { in checkProxyPackageAccess() 212 for (Class<?> intf : clazz.getInterfaces()) { in checkProxyPackageAccess()
|
/libcore/ojluni/src/main/native/ |
D | LinuxWatchService.c | 55 Java_sun_nio_fs_LinuxWatchService_eventSize(JNIEnv *env, jclass clazz) in Java_sun_nio_fs_LinuxWatchService_eventSize() argument 61 Java_sun_nio_fs_LinuxWatchService_eventOffsets(JNIEnv *env, jclass clazz) in Java_sun_nio_fs_LinuxWatchService_eventOffsets() argument 79 (JNIEnv* env, jclass clazz) in Java_sun_nio_fs_LinuxWatchService_inotifyInit() argument 90 (JNIEnv* env, jclass clazz, jint fd, jlong address, jint mask) in Java_sun_nio_fs_LinuxWatchService_inotifyAddWatch() argument 104 (JNIEnv* env, jclass clazz, jint fd, jint wd) in Java_sun_nio_fs_LinuxWatchService_inotifyRmWatch() argument 113 (JNIEnv* env, jclass clazz, jint fd, jboolean blocking) in Java_sun_nio_fs_LinuxWatchService_configureBlocking() argument 125 (JNIEnv* env, jclass clazz, jintArray sv) in Java_sun_nio_fs_LinuxWatchService_socketpair() argument 140 (JNIEnv* env, jclass clazz, jint fd1, jint fd2) in Java_sun_nio_fs_LinuxWatchService_poll() argument
|
D | LinuxNativeDispatcher.c | 63 Java_sun_nio_fs_LinuxNativeDispatcher_init(JNIEnv *env, jclass clazz) in Java_sun_nio_fs_LinuxNativeDispatcher_init() argument 70 clazz = (*env)->FindClass(env, "sun/nio/fs/UnixMountEntry"); in Java_sun_nio_fs_LinuxNativeDispatcher_init() 71 CHECK_NULL(clazz); in Java_sun_nio_fs_LinuxNativeDispatcher_init() 72 entry_name = (*env)->GetFieldID(env, clazz, "name", "[B"); in Java_sun_nio_fs_LinuxNativeDispatcher_init() 74 entry_dir = (*env)->GetFieldID(env, clazz, "dir", "[B"); in Java_sun_nio_fs_LinuxNativeDispatcher_init() 76 entry_fstype = (*env)->GetFieldID(env, clazz, "fstype", "[B"); in Java_sun_nio_fs_LinuxNativeDispatcher_init() 78 entry_options = (*env)->GetFieldID(env, clazz, "opts", "[B"); in Java_sun_nio_fs_LinuxNativeDispatcher_init() 83 Java_sun_nio_fs_LinuxNativeDispatcher_fgetxattr0(JNIEnv* env, jclass clazz, in Java_sun_nio_fs_LinuxNativeDispatcher_fgetxattr0() argument 102 Java_sun_nio_fs_LinuxNativeDispatcher_fsetxattr0(JNIEnv* env, jclass clazz, in Java_sun_nio_fs_LinuxNativeDispatcher_fsetxattr0() argument 120 Java_sun_nio_fs_LinuxNativeDispatcher_fremovexattr0(JNIEnv* env, jclass clazz, in Java_sun_nio_fs_LinuxNativeDispatcher_fremovexattr0() argument [all …]
|
D | DatagramChannelImpl.c | 61 Java_sun_nio_ch_DatagramChannelImpl_initIDs(JNIEnv *env, jclass clazz) in Java_sun_nio_ch_DatagramChannelImpl_initIDs() argument 63 clazz = (*env)->FindClass(env, "java/net/InetSocketAddress"); in Java_sun_nio_ch_DatagramChannelImpl_initIDs() 64 CHECK_NULL(clazz); in Java_sun_nio_ch_DatagramChannelImpl_initIDs() 65 isa_class = (*env)->NewGlobalRef(env, clazz); in Java_sun_nio_ch_DatagramChannelImpl_initIDs() 70 isa_ctorID = (*env)->GetMethodID(env, clazz, "<init>", in Java_sun_nio_ch_DatagramChannelImpl_initIDs() 74 clazz = (*env)->FindClass(env, "sun/nio/ch/DatagramChannelImpl"); in Java_sun_nio_ch_DatagramChannelImpl_initIDs() 75 CHECK_NULL(clazz); in Java_sun_nio_ch_DatagramChannelImpl_initIDs() 76 dci_senderID = (*env)->GetFieldID(env, clazz, "sender", in Java_sun_nio_ch_DatagramChannelImpl_initIDs() 79 dci_senderAddrID = (*env)->GetFieldID(env, clazz, in Java_sun_nio_ch_DatagramChannelImpl_initIDs() 83 dci_senderPortID = (*env)->GetFieldID(env, clazz, in Java_sun_nio_ch_DatagramChannelImpl_initIDs()
|
D | IOUtil.c | 47 jclass clazz = (*env)->FindClass(env, "java/io/FileDescriptor"); in IOUtil_initIDs() local 48 CHECK_NULL(clazz); in IOUtil_initIDs() 49 fd_fdID = (*env)->GetFieldID(env, clazz, "descriptor", "I"); in IOUtil_initIDs() 54 IOUtil_randomBytes(JNIEnv *env, jclass clazz, in IOUtil_randomBytes() argument 62 IOUtil_fdVal(JNIEnv *env, jclass clazz, jobject fdo) in IOUtil_fdVal() argument 68 IOUtil_setfdVal(JNIEnv *env, jclass clazz, jobject fdo, jint val) in IOUtil_setfdVal() argument 83 IOUtil_configureBlocking(JNIEnv *env, jclass clazz, in IOUtil_configureBlocking() argument
|
/libcore/ojluni/src/main/java/javax/crypto/ |
D | JceSecurity.java | 104 static Instance getInstance(String type, Class<?> clazz, String algorithm, in getInstance() argument 114 return GetInstance.getInstance(s, clazz); in getInstance() 117 static Instance getInstance(String type, Class<?> clazz, String algorithm, in getInstance() argument 126 return GetInstance.getInstance(s, clazz); in getInstance() 129 static Instance getInstance(String type, Class<?> clazz, String algorithm) in getInstance() argument 139 Instance instance = GetInstance.getInstance(s, clazz); in getInstance() 234 static URL getCodeBase(final Class<?> clazz) { in getCodeBase() argument 236 URL url = codeBaseCacheRef.get(clazz); in getCodeBase() 240 ProtectionDomain pd = clazz.getProtectionDomain(); in getCodeBase() 250 codeBaseCacheRef.put(clazz, url); in getCodeBase()
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/lang/invoke/ |
D | DeserializeMethodTest.java | 39 private void assertDeserializeMethod(Class<?> clazz, boolean expectedPresent) { in assertDeserializeMethod() argument 41 Method m = clazz.getDeclaredMethod("$deserializeLambda$", SerializedLambda.class); in assertDeserializeMethod() 43 fail("Unexpected $deserializeLambda$ in " + clazz); in assertDeserializeMethod() 47 fail("Expected to find $deserializeLambda$ in " + clazz); in assertDeserializeMethod()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | Enum.java | 204 Class<?> clazz = getClass(); in getDeclaringClass() local 205 Class<?> zuper = clazz.getSuperclass(); in getDeclaringClass() 206 return (zuper == Enum.class) ? (Class<E>)clazz : (Class<E>)zuper; in getDeclaringClass() 260 private static Object[] enumValues(Class<? extends Enum> clazz) { in enumValues() argument 261 if (!clazz.isEnum()) { in enumValues() 267 Method valueMethod = clazz.getDeclaredMethod("values"); in enumValues()
|
/libcore/ojluni/src/main/java/sun/security/x509/ |
D | OIDMap.java | 177 Class clazz) { in addInternal() argument 178 OIDInfo info = new OIDInfo(name, oid, clazz); in addInternal() 190 private volatile Class<?> clazz; field in OIDMap.OIDInfo 192 OIDInfo(String name, ObjectIdentifier oid, Class<?> clazz) { in OIDInfo() argument 195 this.clazz = clazz; in OIDInfo() 202 return clazz; in getClazz() 217 public static void addAttribute(String name, String oid, Class<?> clazz) in addAttribute() argument 226 OIDInfo info = new OIDInfo(name, objId, clazz); in addAttribute()
|
/libcore/ojluni/src/main/java/java/lang/reflect/ |
D | AccessibleObject.java | 148 Class<?> clazz = c.getDeclaringClass(); in setAccessible0() local 149 if (clazz == Class.class) { in setAccessible0() 152 } else if (clazz == Method.class) { in setAccessible0() 155 } else if (clazz == Field.class) { in setAccessible0()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/ |
D | IncompleteAnnotationExceptionTest.java | 50 Class clazz = String.class; in test_constructorLjava_lang_Class_Ljava_lang_String() local 53 clazz, elementName); in test_constructorLjava_lang_Class_Ljava_lang_String() 55 assertSame("wrong annotation type", clazz, e.annotationType()); in test_constructorLjava_lang_Class_Ljava_lang_String()
|
/libcore/ojluni/annotations/hiddenapi/sun/security/jca/ |
D | GetInstance.java | 73 java.lang.String type, java.lang.Class<?> clazz, java.lang.String algorithm) in getInstance() argument 81 java.lang.Class<?> clazz, in getInstance() argument 90 java.lang.Class<?> clazz, in getInstance() argument 100 java.lang.Class<?> clazz, in getInstance() argument 110 java.lang.Class<?> clazz, in getInstance() argument 120 java.lang.Class<?> clazz, in getInstance() argument 129 java.security.Provider.Service s, java.lang.Class<?> clazz) in getInstance() argument 135 java.security.Provider.Service s, java.lang.Class<?> clazz, java.lang.Object param) in getInstance() argument
|