- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 143 for setAccessible (0.08 sec)
-
compat/maven-compat/src/test/java/org/apache/maven/project/ProjectClasspathTestType.java
(DefaultArtifactDescriptorReader) getContainer().lookup(ArtifactDescriptorReader.class); Field field = DefaultArtifactDescriptorReader.class.getDeclaredField("artifactResolver"); field.setAccessible(true); field.set(pomReader, resolver); projectBuilder = getContainer().lookup(ProjectBuilder.class, "classpath"); } @Test void testProjectClasspath() throws Exception {
Registered: Sun Sep 07 03:35:12 UTC 2025 - Last Modified: Fri Mar 21 04:56:21 UTC 2025 - 6.4K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
} Constructor<T> constructor; try { constructor = type.getConstructor(); } catch (NoSuchMethodException e) { return arbitraryConstantInstanceOrNull(type); } constructor.setAccessible(true); // accessibility check is too slow try { return constructor.newInstance(); } catch (InstantiationException | IllegalAccessException impossible) { throw new AssertionError(impossible);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 20.9K bytes - Viewed (0) -
src/test/java/jcifs/smb/DirFileEntryEnumIterator1Test.java
private static void setField(Object target, Class<?> declaring, String name, Object value) { try { Field f = declaring.getDeclaredField(name); f.setAccessible(true); f.set(target, value); } catch (Exception e) { throw new RuntimeException(e); } } // Simple FileEntry stub for tests
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.7K bytes - Viewed (0) -
src/test/java/jcifs/smb1/util/LogStreamTest.java
private void resetLogStreamInstance() throws Exception { // Use reflection to reset the static instance field to null Field instanceField = LogStream.class.getDeclaredField("inst"); instanceField.setAccessible(true); instanceField.set(null, null); } @Test void testConstructor() { // Test constructor creates a LogStream that extends PrintStream
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/reflect/SubtypeTester.java
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 6.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AggregateFutureStateFallbackAtomicHelperTest.java
Class<?> aggregateFutureStateClass = classLoader.loadClass(AggregateFutureState.class.getName()); Field helperField = aggregateFutureStateClass.getDeclaredField("ATOMIC_HELPER"); helperField.setAccessible(true); assertEquals(expectedHelperClassName, helperField.get(null).getClass().getSimpleName()); } private static ClassLoader getClassLoader(Set<String> blocklist) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 6.5K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/ClassSanityTester.java
ImmutableList.Builder<Invokable<?, ?>> builder = ImmutableList.builder(); for (Method method : cls.getDeclaredMethods()) { Invokable<?, ?> invokable = Invokable.from(method); invokable.setAccessible(true); if (invokable.isPublic() && invokable.isStatic() && !invokable.isSynthetic()) { builder.add(invokable); } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 32.5K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/query/QueryCommandTest.java
try { java.lang.reflect.Field propField = org.lastaflute.core.direction.ObjectiveConfig.class.getDeclaredField("prop"); propField.setAccessible(true); propField.set(this, new org.dbflute.helper.jprop.ObjectiveProperties("test")); } catch (Exception e) {
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Tue Aug 19 14:09:36 UTC 2025 - 10K bytes - Viewed (0) -
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) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 7.3K bytes - Viewed (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.
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 9.1K bytes - Viewed (0)