- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 35 for setAccessible (0.06 seconds)
-
impl/maven-core/src/test/java/org/apache/maven/project/DefaultProjectBuilderTest.java
Method extractProjectIdMethod = DefaultProjectBuilder.class.getDeclaredMethod("extractProjectId", ModelBuilderResult.class); extractProjectIdMethod.setAccessible(true); // Create a mock ModelBuilderResult with null effectiveModel but available rawModel ModelBuilderResult mockResult = new MockModelBuilderResult( null, // effectiveModel is nullCreated: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Tue Nov 18 17:20:31 GMT 2025 - 7.5K bytes - Click Count (0) -
mockwebserver-junit5/src/main/kotlin/mockwebserver3/junit5/internal/StartStopExtension.kt
val staticFields = findAnnotatedFields( context.requiredTestClass, StartStop::class.java, ) { Modifier.isStatic(it.modifiers) } for (field in staticFields) { field.setAccessible(true) val server = field.get(null) as? MockWebServer ?: continue // Put the instance in the store, so JUnit closes it for us in afterAll. store.put(field, server) server.start() }Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Thu Jun 19 11:44:16 GMT 2025 - 2.3K bytes - Click Count (0) -
android/guava/src/com/google/common/reflect/Invokable.java
public abstract TypeVariable<?>[] getTypeParameters(); /** See {@link java.lang.reflect.AccessibleObject#setAccessible(boolean)}. */ public final void setAccessible(boolean flag) { accessibleObject.setAccessible(flag); } /** See {@link java.lang.reflect.AccessibleObject#trySetAccessible()}. */ @SuppressWarnings("CatchingUnchecked") // sneaky checked exception
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Mar 17 20:26:29 GMT 2025 - 18.4K bytes - Click Count (0) -
build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/JapicmpTaskWithKotlin.java
try { Field additionalJapicmpClasspathField = JapicmpTask.class.getDeclaredField("additionalJapicmpClasspath"); additionalJapicmpClasspathField.setAccessible(true); ConfigurableFileCollection additionalJapicmpClasspath = (ConfigurableFileCollection) additionalJapicmpClasspathField.get(this); additionalJapicmpClasspath.from(resolveKotlinCompilerEmbeddable());Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Wed Dec 24 14:15:15 GMT 2025 - 2.3K bytes - Click Count (0) -
compat/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Mon Sep 29 14:45:25 GMT 2025 - 14.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/ForwardingObjectTester.java
@NullUnmarked final class ForwardingObjectTester { private static final Method DELEGATE_METHOD; static { try { DELEGATE_METHOD = ForwardingObject.class.getDeclaredMethod("delegate"); DELEGATE_METHOD.setAccessible(true); } catch (SecurityException e) { throw new RuntimeException(e); } catch (NoSuchMethodException e) { throw new AssertionError(e); } } /**Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Sun Aug 10 19:54:19 GMT 2025 - 2.8K bytes - Click Count (0) -
impl/maven-core/src/test/java/org/apache/maven/lifecycle/internal/LifecycleModuleBuilderTest.java
currentProjects); } static void set(Object obj, String field, Object v) throws NoSuchFieldException, IllegalAccessException { Field f = obj.getClass().getDeclaredField(field); f.setAccessible(true); f.set(obj, v); }Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Fri Oct 25 12:31:46 GMT 2024 - 4.1K bytes - Click Count (0) -
compat/maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReaderTest.java
ArgumentCaptor<RepositoryEvent> event = ArgumentCaptor.forClass(RepositoryEvent.class); Field field = DefaultArtifactDescriptorReader.class.getDeclaredField("repositoryEventDispatcher"); field.setAccessible(true); field.set(reader, eventDispatcher); ArtifactDescriptorRequest request = new ArtifactDescriptorRequest(); request.addRepository(newTestRepository());Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Fri Oct 25 12:31:46 GMT 2024 - 3.2K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java
Method tryInternalFastPathGetFailureMethod = abstractFutureClass.getDeclaredMethod("tryInternalFastPathGetFailure"); tryInternalFastPathGetFailureMethod.setAccessible(true); return (Throwable) tryInternalFastPathGetFailureMethod.invoke(future); }Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Oct 28 16:03:47 GMT 2025 - 6.2K bytes - Click Count (0) -
guava/src/com/google/common/eventbus/Subscriber.java
private final Executor executor; private Subscriber(EventBus bus, Object target, Method method) { this.bus = bus; this.target = checkNotNull(target); this.method = method; method.setAccessible(true); this.executor = bus.executor(); } /** Dispatches {@code event} to this subscriber using the proper executor. */ final void dispatchEvent(Object event) { executor.execute( () -> {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Wed May 14 19:40:47 GMT 2025 - 4.7K bytes - Click Count (0)