Home
last modified time | relevance | path

Searched refs:getClass (Results 1 – 25 of 393) sorted by relevance

12345678910>>...16

/libcore/luni/src/test/java/libcore/libcore/reflect/
DInternalNamesTest.java28 InternalNames.getClass(loader, null); in testGetClassNull()
43 assertEquals(byte.class, InternalNames.getClass(loader, "B")); in testInternalNameToPrimitive()
44 assertEquals(char.class, InternalNames.getClass(loader, "C")); in testInternalNameToPrimitive()
45 assertEquals(double.class, InternalNames.getClass(loader, "D")); in testInternalNameToPrimitive()
46 assertEquals(float.class, InternalNames.getClass(loader, "F")); in testInternalNameToPrimitive()
47 assertEquals(int.class, InternalNames.getClass(loader, "I")); in testInternalNameToPrimitive()
48 assertEquals(long.class, InternalNames.getClass(loader, "J")); in testInternalNameToPrimitive()
49 assertEquals(short.class, InternalNames.getClass(loader, "S")); in testInternalNameToPrimitive()
50 assertEquals(boolean.class, InternalNames.getClass(loader, "Z")); in testInternalNameToPrimitive()
51 assertEquals(void.class, InternalNames.getClass(loader, "V")); in testInternalNameToPrimitive()
[all …]
/libcore/luni/src/test/java/libcore/javax/net/ssl/
DSSLServerSocketFactoryTest.java40 assertTrue(SSLServerSocketFactory.class.isAssignableFrom(sf1.getClass())); in test_SSLServerSocketFactory_getDefault_cacheInvalidate()
52 assertTrue(SSLServerSocketFactory.class.isAssignableFrom(sf4.getClass())); in test_SSLServerSocketFactory_getDefault_cacheInvalidate()
54 assertNotEquals(sf1.getClass(), sf4.getClass()); in test_SSLServerSocketFactory_getDefault_cacheInvalidate()
62 assertTrue(SSLServerSocketFactory.class.isAssignableFrom(sf3.getClass())); in test_SSLServerSocketFactory_getDefault_cacheInvalidate()
64 assertEquals(sf1.getClass() + " should be " + sf3.getClass(), sf1.getClass(), in test_SSLServerSocketFactory_getDefault_cacheInvalidate()
65 sf3.getClass()); in test_SSLServerSocketFactory_getDefault_cacheInvalidate()
71 assertTrue(SSLServerSocketFactory.class.isAssignableFrom(sf2.getClass())); in test_SSLServerSocketFactory_getDefault_cacheInvalidate()
73 assertNotEquals(sf1.getClass(), sf2.getClass()); in test_SSLServerSocketFactory_getDefault_cacheInvalidate()
74 assertEquals(sf2.getClass(), sf4.getClass()); in test_SSLServerSocketFactory_getDefault_cacheInvalidate()
DSSLSocketFactoryTest.java42 assertTrue(SSLSocketFactory.class.isAssignableFrom(sf1.getClass())); in test_SSLSocketFactory_getDefault_cacheInvalidate()
54 assertTrue(SSLSocketFactory.class.isAssignableFrom(sf4.getClass())); in test_SSLSocketFactory_getDefault_cacheInvalidate()
56 assertNotEquals(sf1.getClass(), sf4.getClass()); in test_SSLSocketFactory_getDefault_cacheInvalidate()
64 assertTrue(SSLSocketFactory.class.isAssignableFrom(sf3.getClass())); in test_SSLSocketFactory_getDefault_cacheInvalidate()
66 assertEquals(sf1.getClass(), sf3.getClass()); in test_SSLSocketFactory_getDefault_cacheInvalidate()
72 assertTrue(SSLSocketFactory.class.isAssignableFrom(sf2.getClass())); in test_SSLSocketFactory_getDefault_cacheInvalidate()
74 assertNotEquals(sf1.getClass(), sf2.getClass()); in test_SSLSocketFactory_getDefault_cacheInvalidate()
75 assertEquals(sf2.getClass(), sf4.getClass()); in test_SSLSocketFactory_getDefault_cacheInvalidate()
/libcore/luni/src/main/java/libcore/util/
DObjects.java32 Class<?> c = o.getClass(); in toString()
51 if (value.getClass().isArray()) { in toString()
52 if (value.getClass() == boolean[].class) { in toString()
54 } else if (value.getClass() == byte[].class) { in toString()
56 } else if (value.getClass() == char[].class) { in toString()
58 } else if (value.getClass() == double[].class) { in toString()
60 } else if (value.getClass() == float[].class) { in toString()
62 } else if (value.getClass() == int[].class) { in toString()
64 } else if (value.getClass() == long[].class) { in toString()
66 } else if (value.getClass() == short[].class) { in toString()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DDateFormatTest.java56 f1.format(new Date()).getClass() == String.class); in test_getAvailableLocales()
76 assertTrue("Wrong class", f2.getClass() == SimpleDateFormat.class); in test_getDateInstance()
81 f2.format(new Date()).getClass() == String.class); in test_getDateInstance()
93 assertTrue("Wrong class1", f2.getClass() == SimpleDateFormat.class); in test_getDateInstanceI()
99 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceI()
102 assertTrue("Wrong class2", f2.getClass() == SimpleDateFormat.class); in test_getDateInstanceI()
108 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceI()
111 assertTrue("Wrong class3", f2.getClass() == SimpleDateFormat.class); in test_getDateInstanceI()
117 f2.format(new Date()).getClass() == String.class); in test_getDateInstanceI()
120 assertTrue("Wrong class4", f2.getClass() == SimpleDateFormat.class); in test_getDateInstanceI()
[all …]
/libcore/luni/src/main/java/javax/xml/parsers/
DSAXParserFactory.java261 + this.getClass().getPackage().getSpecificationTitle() in getSchema()
263 + this.getClass().getPackage().getSpecificationVersion() in getSchema()
320 + this.getClass().getPackage().getSpecificationTitle() in setSchema()
322 + this.getClass().getPackage().getSpecificationVersion() in setSchema()
349 + this.getClass().getPackage().getSpecificationTitle() in setXIncludeAware()
351 + this.getClass().getPackage().getSpecificationVersion() in setXIncludeAware()
371 + this.getClass().getPackage().getSpecificationTitle() in isXIncludeAware()
373 + this.getClass().getPackage().getSpecificationVersion() in isXIncludeAware()
DDocumentBuilderFactory.java378 + this.getClass().getPackage().getSpecificationTitle() in getSchema()
380 + this.getClass().getPackage().getSpecificationVersion() in getSchema()
444 + this.getClass().getPackage().getSpecificationTitle() in setSchema()
446 + this.getClass().getPackage().getSpecificationVersion() in setSchema()
473 + this.getClass().getPackage().getSpecificationTitle() in setXIncludeAware()
475 + this.getClass().getPackage().getSpecificationVersion() in setXIncludeAware()
495 + this.getClass().getPackage().getSpecificationTitle() in isXIncludeAware()
497 + this.getClass().getPackage().getSpecificationVersion() in isXIncludeAware()
DDocumentBuilder.java80 …"This DocumentBuilder, \"" + this.getClass().getName() + "\", does not support the reset functiona… in reset()
81 + " Specification \"" + this.getClass().getPackage().getSpecificationTitle() + "\"" in reset()
82 + " version \"" + this.getClass().getPackage().getSpecificationVersion() + "\"" in reset()
282 + this.getClass().getPackage().getSpecificationTitle() in getSchema()
284 + this.getClass().getPackage().getSpecificationVersion() in getSchema()
310 + this.getClass().getPackage().getSpecificationTitle() in isXIncludeAware()
312 + this.getClass().getPackage().getSpecificationVersion() in isXIncludeAware()
DSAXParser.java102 … "This SAXParser, \"" + this.getClass().getName() + "\", does not support the reset functionality." in reset()
103 + " Specification \"" + this.getClass().getPackage().getSpecificationTitle() + "\"" in reset()
104 + " version \"" + this.getClass().getPackage().getSpecificationVersion() + "\"" in reset()
491 + this.getClass().getPackage().getSpecificationTitle() in getSchema()
493 + this.getClass().getPackage().getSpecificationVersion() in getSchema()
518 + this.getClass().getPackage().getSpecificationTitle() in isXIncludeAware()
520 + this.getClass().getPackage().getSpecificationVersion() in isXIncludeAware()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DUnsupportedOperationExceptionTest.java52 assertEquals(emptyThrowable.getClass().getName(), emptyException.getMessage()); in test_ConstructorLjava_lang_Throwable()
53 assertEquals(emptyThrowable.getClass().getName(), emptyException.getLocalizedMessage()); in test_ConstructorLjava_lang_Throwable()
54 assertEquals(emptyThrowable.getClass().getName(), emptyException.getCause().toString()); in test_ConstructorLjava_lang_Throwable()
58 assertEquals(throwable.getClass().getName() + ": " + "msg", exception.getMessage()); in test_ConstructorLjava_lang_Throwable()
59 assertEquals(throwable.getClass().getName(), emptyException.getLocalizedMessage()); in test_ConstructorLjava_lang_Throwable()
60 assertEquals(throwable.getClass().getName(), emptyException.getCause().toString()); in test_ConstructorLjava_lang_Throwable()
72 assertEquals(emptyThrowable.getClass().getName(), emptyException.getCause().toString()); in test_ConstructorLjava_lang_StringLjava_lang_Throwable()
79 assertEquals(throwable.getClass().getName() + ": " + throwable.getMessage(), exception in test_ConstructorLjava_lang_StringLjava_lang_Throwable()
DIllegalStateExceptionTest.java51 assertEquals(emptyThrowable.getClass().getName(), emptyException.getMessage()); in test_ConstructorLjava_lang_Throwable()
52 assertEquals(emptyThrowable.getClass().getName(), emptyException.getLocalizedMessage()); in test_ConstructorLjava_lang_Throwable()
53 assertEquals(emptyThrowable.getClass().getName(), emptyException.getCause().toString()); in test_ConstructorLjava_lang_Throwable()
57 assertEquals(throwable.getClass().getName() + ": " + "msg", exception.getMessage()); in test_ConstructorLjava_lang_Throwable()
58 assertEquals(throwable.getClass().getName(), emptyException.getLocalizedMessage()); in test_ConstructorLjava_lang_Throwable()
59 assertEquals(throwable.getClass().getName(), emptyException.getCause().toString()); in test_ConstructorLjava_lang_Throwable()
70 assertEquals(emptyThrowable.getClass().getName(), emptyException.getCause().toString()); in test_ConstructorLjava_lang_StringLjava_lang_Throwable()
76 assertEquals(throwable.getClass().getName() + ": " + throwable.getMessage(), exception in test_ConstructorLjava_lang_StringLjava_lang_Throwable()
DRuntimeExceptionTest.java49 assertEquals(emptyThrowable.getClass().getName(), emptyException.getMessage()); in test_ConstructorLjava_lang_Throwable()
50 assertEquals(emptyThrowable.getClass().getName(), emptyException.getLocalizedMessage()); in test_ConstructorLjava_lang_Throwable()
51 assertEquals(emptyThrowable.getClass().getName(), emptyException.getCause().toString()); in test_ConstructorLjava_lang_Throwable()
55 assertEquals(throwable.getClass().getName() + ": " + "msg", exception.getMessage()); in test_ConstructorLjava_lang_Throwable()
56 assertEquals(throwable.getClass().getName(), emptyException.getLocalizedMessage()); in test_ConstructorLjava_lang_Throwable()
57 assertEquals(throwable.getClass().getName(), emptyException.getCause().toString()); in test_ConstructorLjava_lang_Throwable()
DIllegalArgumentExceptionTest.java51 assertEquals(emptyThrowable.getClass().getName(), emptyException.getMessage()); in test_ConstructorLjava_lang_Throwable()
52 assertEquals(emptyThrowable.getClass().getName(), emptyException.getLocalizedMessage()); in test_ConstructorLjava_lang_Throwable()
53 assertEquals(emptyThrowable.getClass().getName(), emptyException.getCause().toString()); in test_ConstructorLjava_lang_Throwable()
57 assertEquals(exception.getClass().getName() + ": " + "msg", e.getMessage()); in test_ConstructorLjava_lang_Throwable()
58 assertEquals(exception.getClass().getName(), emptyException.getLocalizedMessage()); in test_ConstructorLjava_lang_Throwable()
59 assertEquals(exception.getClass().getName(), emptyException.getCause().toString()); in test_ConstructorLjava_lang_Throwable()
DTypeNotPresentExceptionTest.java32 e = new TypeNotPresentException(getClass().getName(), null); in test_constructorLjava_lang_StringLjava_lang_Throwable()
38 e = new TypeNotPresentException(getClass().getName(), npe); in test_constructorLjava_lang_StringLjava_lang_Throwable()
50 e = new TypeNotPresentException(getClass().getName(), null); in test_typeName()
51 assertEquals(getClass().getName(), e.typeName()); in test_typeName()
DClassTest.java432 URL res = getClass().getResource(name); in test_getResourceLjava_lang_String()
441 InputStream str2 = getClass().getResourceAsStream(name); in test_getResourceAsStreamLjava_lang_String()
446 getClass().getResourceAsStream(nameBadURI)); in test_getResourceAsStreamLjava_lang_String()
541 clazz, clazz.newInstance().getClass()); in test_newInstance()
555 assertNull(getClass().getResourceAsStream(SHARP_RESOURCE_ABS_NAME)); in test_getResourceAsStream_withSharpChar()
560 this.getClass().getClassLoader().getResourceAsStream(SHARP_RESOURCE_ABS_NAME); in test_getResourceAsStream_withSharpChar()
567 assertNull(getClass().getResource(SHARP_RESOURCE_ABS_NAME)); in test_getResource_withSharpChar()
568 URL absoluteURL = getClass().getResource("/" + SHARP_RESOURCE_ABS_NAME); in test_getResource_withSharpChar()
575 URL relativeURL = getClass().getResource(SHARP_RESOURCE_RELATIVE_NAME); in test_getResource_withSharpChar()
581 assertNull(getClass().getResourceAsStream(QUERY_RESOURCE_ABS_NAME)); in test_getResourceAsStream_withQueryChar()
[all …]
DBooleanTest.java76 System.setProperty(getClass().getName(), "true"); in test_getBooleanLjava_lang_String()
77 assertTrue(Boolean.getBoolean(getClass().getName())); in test_getBooleanLjava_lang_String()
79 System.setProperty(getClass().getName(), "TRUE"); in test_getBooleanLjava_lang_String()
80 assertTrue(Boolean.getBoolean(getClass().getName())); in test_getBooleanLjava_lang_String()
82 System.setProperty(getClass().getName(), "false"); in test_getBooleanLjava_lang_String()
83 assertFalse(Boolean.getBoolean(getClass().getName())); in test_getBooleanLjava_lang_String()
/libcore/ojluni/src/main/java/java/util/
DPrimitiveIterator.java127 Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfInt.nextInt()"); in next()
149 …Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfInt.forEachRemainingInt(action::accept)… in forEachRemaining()
201 Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfLong.nextLong()"); in next()
223 …Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfLong.forEachRemainingLong(action::accep… in forEachRemaining()
274 Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfDouble.nextLong()"); in next()
297 …Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfDouble.forEachRemainingDouble(action::a… in forEachRemaining()
DSpliterator.java674 Tripwire.trip(getClass(), in tryAdvance()
697 Tripwire.trip(getClass(), in forEachRemaining()
738 Tripwire.trip(getClass(), in tryAdvance()
761 Tripwire.trip(getClass(), in forEachRemaining()
802 Tripwire.trip(getClass(), in tryAdvance()
826 Tripwire.trip(getClass(), in forEachRemaining()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DConstructorTest.java192 Class<? extends ConstructorTestHelper> pclass = new ConstructorTestHelper().getClass(); in test_getDeclaringClass()
207 … Constructor<? extends ConstructorTestHelper> ctor = new ConstructorTestHelper().getClass() in test_getExceptionTypes()
210 ex = new IndexOutOfBoundsException().getClass(); in test_getExceptionTypes()
223 … Constructor<? extends ConstructorTestHelper> ctor = new ConstructorTestHelper().getClass() in test_getModifiers()
234 … Constructor<? extends ConstructorTestHelper> ctor = new ConstructorTestHelper().getClass() in test_getModifiers()
245 … Constructor<? extends ConstructorTestHelper> ctor = new ConstructorTestHelper().getClass() in test_getModifiers()
260 … Constructor<? extends ConstructorTestHelper> ctor = new ConstructorTestHelper().getClass() in test_getName()
278 … Constructor<? extends ConstructorTestHelper> ctor = new ConstructorTestHelper().getClass() in test_getParameterTypes()
290 parms[0] = new Object().getClass(); in test_getParameterTypes()
291 … Constructor<? extends ConstructorTestHelper> ctor = new ConstructorTestHelper().getClass() in test_getParameterTypes()
[all …]
/libcore/luni/src/test/java/libcore/java/lang/reflect/
DReflectionTest.java82 assertEquals("libcore.java.lang.reflect.ReflectionTest", getClass().getName()); in testClassGetName()
83 assertEquals(getClass().getName() + "$A", A.class.getName()); in testClassGetName()
84 assertEquals(getClass().getName() + "$B", B.class.getName()); in testClassGetName()
85 assertEquals(getClass().getName() + "$DefinesMember", DefinesMember.class.getName()); in testClassGetName()
93 assertEquals("libcore.java.lang.reflect.ReflectionTest", getClass().getCanonicalName()); in testClassGetCanonicalName()
94 assertEquals(getClass().getName() + ".A", A.class.getCanonicalName()); in testClassGetCanonicalName()
95 assertEquals(getClass().getName() + ".B", B.class.getCanonicalName()); in testClassGetCanonicalName()
96 assertEquals(getClass().getName() + ".DefinesMember", in testClassGetCanonicalName()
316 assertFalse(CLASS_LEVEL_ANONYMOUS.getClass().isLocalClass()); in testIsLocalClass()
317 assertFalse(methodLevelAnonymous.getClass().isLocalClass()); in testIsLocalClass()
[all …]
DMethodTest.java175 Method method = anonymous.getClass().getMethod("a"); in testImplementedInterfaceMethodOfAnonymousClass()
176 assertEquals(anonymous.getClass(), method.getDeclaringClass()); in testImplementedInterfaceMethodOfAnonymousClass()
184 Method method = anonymous.getClass().getMethod("a"); in testPublicMethodOfAnonymousClass()
185 assertEquals(anonymous.getClass(), method.getDeclaringClass()); in testPublicMethodOfAnonymousClass()
194 anonymous.getClass().getMethod("a"); in testGetMethodDoesNotReturnPrivateMethodOfAnonymousClass()
205 Method method = anonymous.getClass().getDeclaredMethod("a"); in testGetDeclaredMethodReturnsPrivateMethodOfAnonymousClass()
206 assertEquals(anonymous.getClass(), method.getDeclaringClass()); in testGetDeclaredMethodReturnsPrivateMethodOfAnonymousClass()
411 Class<?> anonClass = anon.getClass(); in testDefaultMethod_inheritance()
438 Class<? extends InterfaceWithDefault> anonClass = anon.getClass(); in testDefaultMethod_override()
458 Method defaultMethod = anon.getClass().getMethod("defaultMethod"); in testDefaultMethod_setAccessible()
[all …]
/libcore/luni/src/test/java/libcore/java/lang/
DOldClassTest.java43 final String packageName = getClass().getPackage().getName();
254 ClassLoader pcl = getClass().getClassLoader(); in test_forNameLjava_lang_StringLbooleanLClassLoader()
315 URL url = getClass().getClassLoader().getResource( in test_forNameLjava_lang_StringLbooleanLClassLoader_AndroidOnly()
319 getClass().getClassLoader()); in test_forNameLjava_lang_StringLbooleanLClassLoader_AndroidOnly()
334 true, getClass().getClassLoader()); in test_forNameLjava_lang_StringLbooleanLClassLoader_AndroidOnly()
373 assertEquals(getClass(), Cls1.class.getEnclosingClass()); in test_getEnclosingClass()
374 assertEquals(getClass(), Intf1.class.getEnclosingClass()); in test_getEnclosingClass()
375 assertEquals(getClass(), Cls4.class.getEnclosingClass()); in test_getEnclosingClass()
387 ptc.getLocalClass().getClass().getEnclosingMethod()); in test_getEnclosingMethod()
399 ptc.clazz.getClass().getEnclosingConstructor()); in test_getEnclosingConstructor()
[all …]
DPackageTest.java39 assertEquals(1, getClass().getPackage().getAnnotations().length); in test_getAnnotations()
40 assertEquals(1, getClass().getPackage().getDeclaredAnnotations().length); in test_getAnnotations()
46 assertEquals(getClass().getPackage(), libcoreJavaLang); in testGetPackage()
65 assertTrue(packages.contains(getClass().getPackage())); in testGetPackages()
/libcore/luni/src/test/java/libcore/java/nio/file/
DFileSystemsTest.java97 FileSystems.newFileSystem(testPath.toUri(), stubEnv, getClass().getClassLoader()); in test_newFileSystem$URI$Map$ClassLoader()
133 assertEquals("mypackage.MockFileSystem", fs.getClass().getName()); in test_newFileSystem$URI$Map$ClassLoader_customClassLoader()
134 assertSame(stubURI, fs.getClass().getDeclaredMethod("getURI").invoke(fs)); in test_newFileSystem$URI$Map$ClassLoader_customClassLoader()
135 assertSame(stubEnv, fs.getClass().getDeclaredMethod("getEnv").invoke(fs)); in test_newFileSystem$URI$Map$ClassLoader_customClassLoader()
170 assertEquals("mypackage.MockFileSystem", fs.getClass().getName()); in test_newFileSystem$Path$ClassLoader_customClassLoader()
172 Path pathValue = (Path)fs.getClass().getDeclaredMethod("getPath").invoke(fs); in test_newFileSystem$Path$ClassLoader_customClassLoader()
184 try (InputStream in = getClass().getResource("/filesystemstest.jar").openStream(); in createClassLoaderForTestFileSystems()
190 return new PathClassLoader(jarFile.getAbsolutePath(), getClass().getClassLoader()); in createClassLoaderForTestFileSystems()
/libcore/luni/src/main/java/javax/xml/transform/
DTransformer.java72 …"This Transformer, \"" + this.getClass().getName() + "\", does not support the reset functionality… in reset()
73 + " Specification \"" + this.getClass().getPackage().getSpecificationTitle() + "\"" in reset()
74 + " version \"" + this.getClass().getPackage().getSpecificationVersion() + "\"" in reset()

12345678910>>...16