- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for getDeclaredMethod (0.08 sec)
-
src/test/java/jcifs/smb/MultiChannelManagerBasicTest.java
// Use reflection to access private method for testing Exception exception = assertThrows(Exception.class, () -> { java.lang.reflect.Method method = MultiChannelManager.class.getDeclaredMethod("createChannelTransport", InetAddress.class, InetAddress.class); method.setAccessible(true); method.invoke(multiChannelManager, null, null); });Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 4K bytes - Viewed (0) -
impl/maven-core/src/test/java/org/apache/maven/project/DefaultProjectBuilderTest.java
@Test void testExtractProjectIdFallback() throws Exception { // Use reflection to access the private extractProjectId method Method extractProjectIdMethod = DefaultProjectBuilder.class.getDeclaredMethod("extractProjectId", ModelBuilderResult.class); extractProjectIdMethod.setAccessible(true); // Create a mock ModelBuilderResult with null effectiveModel but available rawModelRegistered: Sun Dec 28 03:35:09 UTC 2025 - Last Modified: Tue Nov 18 17:20:31 UTC 2025 - 7.5K bytes - Viewed (0) -
src/test/java/org/codelibs/core/lang/ModifierUtilTest.java
*/ public void testIsPublic() throws Exception { final Field f = Hoge.class.getDeclaredField("s"); assertTrue(ModifierUtil.isPublicStaticFinalField(f)); final Method m = Hoge.class.getDeclaredMethod("hoge", new Class[] {}); assertTrue(ModifierUtil.isPublic(m)); } /** * @throws Exception */ public void testIsInstanceField() throws Exception {Registered: Sat Dec 20 08:55:33 UTC 2025 - Last Modified: Sat May 10 01:32:17 UTC 2025 - 2.4K bytes - Viewed (0) -
src/test/java/org/codelibs/core/beans/impl/MethodDescTest.java
assertThat(bar, is(notNullValue())); assertThat(bar.getBeanDesc(), is(sameInstance(beanDesc))); assertThat(bar.getMethod(), is(MyBean.class.getDeclaredMethod("bar", String.class))); assertThat(bar.getParameterTypes().length, is(1)); assertThat(bar.getMethodName(), is("bar")); assertThat(bar.isPublic(), is(true));
Registered: Sat Dec 20 08:55:33 UTC 2025 - Last Modified: Sat May 10 01:32:17 UTC 2025 - 3.4K bytes - Viewed (0) -
android-test-app/src/main/kotlin/okhttp/android/testapp/TestApplication.kt
private fun getProcess(): String? = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { getProcessName() } else { Class .forName("android.app.ActivityThread") .getDeclaredMethod("currentProcessName") .apply { isAccessible = true } .invoke(null) as String }
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Aug 19 08:10:39 UTC 2025 - 1.3K bytes - Viewed (0) -
src/test/java/jcifs/https/HandlerTest.java
void testProtectedMethodAccess() throws Exception { // Given Handler testHandler = new Handler(null); // When Method method = Handler.class.getDeclaredMethod("getDefaultPort"); // Then assertTrue(Modifier.isProtected(method.getModifiers())); method.setAccessible(true); // Required to invoke protected method
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ForwardingObjectTester.java
* * @author Ben Yu */ @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); }Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Sun Aug 10 19:54:19 UTC 2025 - 2.8K bytes - Viewed (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/AndroidPlatform.kt
// private TrustAnchor findTrustAnchorByIssuerAndSignature(X509Certificate lastCert); val method = trustManager.javaClass.getDeclaredMethod( "findTrustAnchorByIssuerAndSignature", X509Certificate::class.java, ) method.isAccessible = true CustomTrustRootIndex(trustManager, method)
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Oct 10 05:19:46 UTC 2025 - 6.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java
* trivially, but it's enough to skip these ones. */ ) { continue; } Class<?> clazz = info.load(); try { Method unused = clazz.getDeclaredMethod("writeReplace"); continue; // It overrides writeReplace, so it's safe. } catch (NoSuchMethodException e) { // This is a class whose supertypes we want to examine. We'll do that below. }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Jul 01 03:07:54 UTC 2025 - 5.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/trans/TransTransactNamedPipeResponseTest.java
// Test getResponseLength method // First, set dataCount using reflection (since setDataCount is in parent class) Method setDataCountMethod = SmbComTransactionResponse.class.getDeclaredMethod("setDataCount", int.class); setDataCountMethod.setAccessible(true); setDataCountMethod.invoke(response, 256); int responseLength = response.getResponseLength();Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.5K bytes - Viewed (0)