/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() 47 Class<? extends B> clazz = B.class; in testSimpleTypeVariableOnMethod() local 48 Method method = clazz.getDeclaredMethod("b"); in testSimpleTypeVariableOnMethod() 63 Class<? extends C> clazz = C.class; in testSimpleTypeVariableOnConstructor() local 64 Constructor<?> constructor = clazz.getDeclaredConstructor(); in testSimpleTypeVariableOnConstructor() 77 Class<? extends D> clazz = D.class; in testMultipleTypeVariablesOnClass() local 78 TypeVariable<?>[] typeParameters = clazz.getTypeParameters(); in testMultipleTypeVariablesOnClass() 81 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() 40 assertEquals(getTypeParameter(clazz), componentType); in testGetGenericComponentType() 44 assertEquals(clazz, componentTypeVariable.getGenericDeclaration()); in testGetGenericComponentType() 52 Class<? extends B> clazz = GenericArrayTypeTest.B.class; in testParameterizedComponentType() local 53 Field field = clazz.getDeclaredField("array"); in testParameterizedComponentType() 61 assertEquals(clazz, parameteriezdType.getRawType()); in testParameterizedComponentType() 62 assertEquals(clazz.getTypeParameters()[0], parameteriezdType.getActualTypeArguments()[0]); in testParameterizedComponentType()
|
D | ParameterizedTypeTest.java | 32 Class<? extends B> clazz = B.class; in testStringParameterizedSuperClass() local 33 Type genericSuperclass = clazz.getGenericSuperclass(); in testStringParameterizedSuperClass() 48 Class<? extends D> clazz = D.class; in testTypeParameterizedSuperClass() local 49 Type genericSuperclass = clazz.getGenericSuperclass(); in testTypeParameterizedSuperClass() 66 Class<? extends F> clazz = F.class; in testParameterizedMemeber() local 67 Field field = clazz.getDeclaredField("e"); in testParameterizedMemeber() 75 assertEquals(getTypeParameter(clazz), actualTypeArguments[0]); in testParameterizedMemeber()
|
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 | 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()
|
D | WildcardTypeTest.java | 43 …private static Class<? extends BoundedWildcardsGenericMethods> clazz = BoundedWildcardsGenericMeth… field in WildcardTypeTest 49 assertLenghtOne(clazz.getTypeParameters()); in testBoundedGenericMethods() 125 …Method method = clazz.getMethod("upperBoundedParamNoReturn", BoundedWildcardsGenericMethods.class); in testUpperBoundedParamNoReturn() 131 … Method method = clazz.getMethod("lowerBoundedParamReturn", BoundedWildcardsGenericMethods.class); in testLowerBoundedParamReturn() 138 … Method method = clazz.getMethod("upperBoundedParamReturn", BoundedWildcardsGenericMethods.class); in testUpperBoundedParamReturn() 145 …Method method = clazz.getMethod("lowerBoundedParamNoReturn", BoundedWildcardsGenericMethods.class); in testLowerBoundedParamNoReturn()
|
D | GenericReflectionTestsBase.java | 48 public TypeVariable<Class> getTypeParameter(Class<?> clazz) { in getTypeParameter() argument 49 TypeVariable[] typeParameters = clazz.getTypeParameters(); in getTypeParameter() 52 assertEquals(clazz, typeVariable.getGenericDeclaration()); in getTypeParameter()
|
D | GenericSignatureFormatErrorTest.java | 78 Class clazz = cl.loadClass("demo/HelloWorld"); in test_signatureFormatError() local 79 TypeVariable[] tvs = clazz.getTypeParameters(); in test_signatureFormatError()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | ClassTest.java | 464 Class<?> clazz = null; in test_isArray() local 465 clazz = Class.forName("[I"); in test_isArray() 466 assertTrue("int Array type claims not to be.", clazz.isArray()); in test_isArray() 468 clazz = Class.forName("[Ljava.lang.Object;"); in test_isArray() 469 assertTrue("Object Array type claims not to be.", clazz.isArray()); in test_isArray() 471 clazz = Class.forName("java.lang.Object"); in test_isArray() 472 assertTrue("Non-array Object type claims to be.", !clazz.isArray()); in test_isArray() 499 Class<?> clazz = null; in test_isInterface() local 500 clazz = Class.forName("[I"); in test_isInterface() 501 assertTrue("Prim Array type claims to be interface.", !clazz.isInterface()); in test_isInterface() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | ResourceLeakageDetector.java | 34 Class<?> clazz; 41 clazz = classLoader.loadClass("dalvik.system.CloseGuardMonitor"); 49 clazz = null; 52 CLOSE_GUARD_MONITOR_CLASS = clazz;
|
/libcore/libart/src/main/java/sun/misc/ |
D | Unsafe.java | 79 public int arrayBaseOffset(Class clazz) { in arrayBaseOffset() argument 80 Class<?> component = clazz.getComponentType(); in arrayBaseOffset() 82 throw new IllegalArgumentException("Valid for array classes only: " + clazz); in arrayBaseOffset() 93 public int arrayIndexScale(Class clazz) { in arrayIndexScale() argument 94 Class<?> component = clazz.getComponentType(); in arrayIndexScale() 96 throw new IllegalArgumentException("Valid for array classes only: " + clazz); in arrayIndexScale()
|
/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/luni/src/test/java/libcore/java/lang/ |
D | OldClassTest.java | 120 Object clazz; field in OldClassTest.PublicTestClass 125 clazz = new LocalClass(); in PublicTestClass() 265 Class<?> clazz = Class.forName(classes[i].getName(), true, pcl); in test_forNameLjava_lang_StringLbooleanLClassLoader() local 266 assertEquals(classes[i], clazz); in test_forNameLjava_lang_StringLbooleanLClassLoader() 268 clazz = Class.forName(classes[i].getName(), false, pcl); in test_forNameLjava_lang_StringLbooleanLClassLoader() 269 assertEquals(classes[i], clazz); in test_forNameLjava_lang_StringLbooleanLClassLoader() 276 Class<?> clazz = Class.forName(systemClasses[i].getName(), true, in test_forNameLjava_lang_StringLbooleanLClassLoader() local 278 assertEquals(systemClasses[i], clazz); in test_forNameLjava_lang_StringLbooleanLClassLoader() 280 clazz = Class.forName(systemClasses[i].getName(), false, in test_forNameLjava_lang_StringLbooleanLClassLoader() 282 assertEquals(systemClasses[i], clazz); in test_forNameLjava_lang_StringLbooleanLClassLoader() [all …]
|
/libcore/libart/src/main/java/java/lang/ |
D | ClassLoader.java | 499 Class<?> clazz = findLoadedClass(className); in loadClass() local 501 if (clazz == null) { in loadClass() 504 clazz = parent.loadClass(className, false); in loadClass() 509 if (clazz == null) { in loadClass() 511 clazz = findClass(className); in loadClass() 519 return clazz; in loadClass() 533 protected final void resolveClass(Class<?> clazz) { in resolveClass() argument 838 Class<?> clazz = findLoadedClass(className); in loadClass() local 840 if (clazz == null) { in loadClass() 841 clazz = findClass(className); in loadClass() [all …]
|
/libcore/luni/src/main/java/java/lang/ |
D | InstantiationException.java | 52 InstantiationException(Class<?> clazz) { in InstantiationException() argument 53 super(clazz.getName()); in InstantiationException()
|
D | InstantiationError.java | 55 InstantiationError(Class<?> clazz) { in InstantiationError() argument 56 super(clazz.getName()); in InstantiationError()
|
/libcore/luni/src/main/java/javax/xml/xpath/ |
D | XPathFactoryFinder.java | 238 Class clazz; in createInstance() local 240 clazz = classLoader.loadClass(className); in createInstance() 242 clazz = Class.forName(className); in createInstance() 243 if(debug) debugPrintln("loaded it from "+which(clazz)); in createInstance() 244 Object o = clazz.newInstance(); in createInstance() 354 private static String which( Class clazz ) { in which() argument 355 return which( clazz.getName(), clazz.getClassLoader() ); in which()
|
/libcore/luni/src/main/java/javax/xml/validation/ |
D | SchemaFactoryFinder.java | 263 Class clazz; in createInstance() local 265 clazz = classLoader.loadClass(className); in createInstance() 267 clazz = Class.forName(className); in createInstance() 268 if(debug) debugPrintln("loaded it from "+which(clazz)); in createInstance() 269 Object o = clazz.newInstance(); in createInstance() 394 private static String which( Class clazz ) { in which() argument 395 return which( clazz.getName(), clazz.getClassLoader() ); in which()
|
/libcore/luni/src/main/java/libcore/reflect/ |
D | Types.java | 64 public static String getSignature(Class<?> clazz) { in getSignature() argument 65 String primitiveSignature = PRIMITIVE_TO_SIGNATURE.get(clazz); in getSignature() 68 } else if (clazz.isArray()) { in getSignature() 69 return "[" + getSignature(clazz.getComponentType()); in getSignature() 72 return "L" + clazz.getName() + ";"; in getSignature()
|
/libcore/luni/src/main/native/ |
D | org_apache_harmony_xml_ExpatParser.cpp | 1213 static jstring ExpatAttributes_getValueForQName(JNIEnv* env, jobject clazz, in ExpatAttributes_getValueForQName() argument 1215 jint index = ExpatAttributes_getIndexForQName(env, clazz, attributePointer, qName); in ExpatAttributes_getValueForQName() 1217 : ExpatAttributes_getValueByIndex(env, clazz, attributePointer, index); in ExpatAttributes_getValueForQName() 1229 static jstring ExpatAttributes_getValue(JNIEnv* env, jobject clazz, in ExpatAttributes_getValue() argument 1231 jint index = ExpatAttributes_getIndex(env, clazz, attributePointer, uri, localName); in ExpatAttributes_getValue() 1233 : ExpatAttributes_getValueByIndex(env, clazz, attributePointer, index); in ExpatAttributes_getValue() 1293 jclass clazz = reinterpret_cast<jclass>(classObject); in ExpatParser_staticInitialize() local 1294 startElementMethod = env->GetMethodID(clazz, "startElement", in ExpatParser_staticInitialize() 1298 endElementMethod = env->GetMethodID(clazz, "endElement", in ExpatParser_staticInitialize() 1302 textMethod = env->GetMethodID(clazz, "text", "([CI)V"); in ExpatParser_staticInitialize() [all …]
|
D | java_lang_System.cpp | 66 static void System_setFieldImpl(JNIEnv* env, jclass clazz, in System_setFieldImpl() argument 76 jfieldID fieldID = env->GetStaticFieldID(clazz, name.c_str(), signature.c_str()); in System_setFieldImpl() 77 env->SetStaticObjectField(clazz, fieldID, object); in System_setFieldImpl()
|
/libcore/luni/src/main/java/javax/xml/datatype/ |
D | FactoryFinder.java | 317 private static String which(Class clazz) { in which() argument 319 String classnameAsResource = clazz.getName().replace('.', '/') + ".class"; in which() 321 ClassLoader loader = clazz.getClassLoader(); in which()
|