- Sort Score
- Num 10 results
- Language All
Results 121 - 130 of 167 for setAccessible (0.11 seconds)
-
android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureFallbackAtomicHelperTest.java
Class<?> abstractFutureStateClass = classLoader.loadClass(AbstractFutureState.class.getName()); Method helperMethod = abstractFutureStateClass.getDeclaredMethod("atomicHelperTypeForTest"); helperMethod.setAccessible(true); assertThat(helperMethod.invoke(null)).isEqualTo(expectedHelperClassName); } private static ClassLoader getClassLoader(Set<String> disallowedClassNames) {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Mar 07 02:20:33 GMT 2026 - 8.3K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/base/FinalizableReferenceQueueClassLoaderUnloadingTest.java
Class<?> sepFrqSystemLoaderC = sepLoader.loadClass(FinalizableReferenceQueue.SystemLoader.class.getName()); Field disabled = sepFrqSystemLoaderC.getDeclaredField("disabled"); disabled.setAccessible(true); disabled.set(null, true); // Now make a parallel FRQ and an associated FinalizableWeakReference to an object, in order to // exercise some classes from the parallel ClassLoader.
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Feb 26 02:41:17 GMT 2026 - 7.7K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java
checkNotNull(wrapperFunction); checkArgument(interfaceType.isInterface(), "%s isn't an interface", interfaceType); Method[] methods = getMostConcreteMethods(interfaceType); AccessibleObject.setAccessible(methods, true); for (Method method : methods) { // Interfaces can have default methods that aren't abstract. // No need to verify them. // Can't check isDefault() for Android compatibility.
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue May 13 17:27:14 GMT 2025 - 9.1K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/helper/KeyMatchHelperTest.java
public void test_toLowerCase_privateMethod() throws Exception { // Test private method using reflection Method method = KeyMatchHelper.class.getDeclaredMethod("toLowerCase", String.class); method.setAccessible(true); String result = (String) method.invoke(keyMatchHelper, "JAVA"); assertEquals("java", result); result = (String) method.invoke(keyMatchHelper, "Mixed_Case");
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Fri Mar 13 23:01:26 GMT 2026 - 10.4K bytes - Click Count (0) -
src/test/java/org/codelibs/curl/CurlTest.java
// ## Test that protected constructor can be accessed via reflection ## // ## Act ## final Constructor<Curl> constructor = Curl.class.getDeclaredConstructor(); constructor.setAccessible(true); final Curl instance = constructor.newInstance(); // ## Assert ## assertNotNull(instance); } @Test public void test_TraceMethodInEnum() {Created: Thu Apr 02 15:34:12 GMT 2026 - Last Modified: Thu Nov 20 13:34:13 GMT 2025 - 16.3K bytes - Click Count (0) -
android/guava/src/com/google/common/cache/Striped64.java
@Override public Unsafe run() throws Exception { Class<Unsafe> k = Unsafe.class; for (Field f : k.getDeclaredFields()) { f.setAccessible(true); Object x = f.get(null); if (k.isInstance(x)) return k.cast(x); } throw new NoSuchFieldError("the Unsafe"); } });Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Jan 15 22:17:15 GMT 2025 - 11.4K bytes - Click Count (0) -
src/main/java/jcifs/smb/SmbOperationException.java
// Package-private setter for attempt number try { java.lang.reflect.Field field = SmbOperationException.class.getDeclaredField("attemptNumber"); field.setAccessible(true); field.set(this, attemptNumber); } catch (Exception e) { // Ignore } } private static String formatMessage(ErrorCode errorCode, String message) {Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 16.5K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/job/SuggestJobTest.java
java.lang.reflect.Field propField = org.lastaflute.core.direction.ObjectiveConfig.class.getDeclaredField("_javaPropertiesResult"); propField.setAccessible(true); // Create a mock JavaPropertiesResult java.util.Properties props = new java.util.Properties(); props.setProperty("job.max.crawler.processes", "5");Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Fri Mar 13 23:01:26 GMT 2026 - 31.6K bytes - Click Count (0) -
guava/src/com/google/common/base/internal/Finalizer.java
*/ return null; } try { Field inheritableThreadLocals = Thread.class.getDeclaredField("inheritableThreadLocals"); inheritableThreadLocals.setAccessible(true); return inheritableThreadLocals; } catch (Throwable t) { logger.log( Level.INFO, "Couldn't access Thread.inheritableThreadLocals. Reference finalizer threads will "Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 11 03:19:29 GMT 2026 - 9.6K bytes - Click Count (0) -
src/test/java/jcifs/smb/SecurityBlobTest.java
// Force internal field to null via reflection to exercise defensive branch Field field = SecurityBlob.class.getDeclaredField("b"); field.setAccessible(true); field.set(blob, null); // Act & Assert assertEquals(0, blob.length(), "length() should return 0 when internal array is null"); } @SpyCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 9.4K bytes - Click Count (0)