- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for proxy (0.28 sec)
-
guava-tests/test/com/google/common/reflect/AbstractInvocationHandlerTest.java
assertEquals(LIST1, ImmutableList.copyOf(newDelegatingListWithEquals(LIST1))); } public void testToString() { List<String> proxy = newDelegatingList(LIST1); assertEquals(Proxy.getInvocationHandler(proxy).toString(), proxy.toString()); } interface A {} interface B {} public void testEquals() { class AB implements A, B {} class BA implements B, A {}
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Mon Apr 17 15:49:06 GMT 2023 - 5.8K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/TimeLimiter.java
* TargetType proxy = limiter.newProxy( * target, TargetType.class, 50, TimeUnit.MILLISECONDS); * try { * return proxy.someMethod(); * } catch (UncheckedTimeoutException e) { * return DEFAULT_VALUE; * } * </pre> * * @param target the object to proxy * @param interfaceType the interface you wish the returned proxy to implement
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Fri May 12 18:32:03 GMT 2023 - 8.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/ForwardingCacheTest.java
@SuppressWarnings({"unchecked", "DoNotMock"}) // mock @Override public void setUp() throws Exception { super.setUp(); /* * Class parameters must be raw, so we can't create a proxy with generic * type arguments. The created proxy only records calls and returns null, so * the type is irrelevant at runtime. */ mock = mock(Cache.class); forward = new ForwardingCache<String, Boolean>() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Apr 17 12:41:04 GMT 2023 - 3.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java
} public void testNewProxy_goodMethodWithEnoughTime() throws Exception { SampleImpl target = new SampleImpl(DELAY_MS); Sample proxy = service.newProxy(target, Sample.class, ENOUGH_MS, MILLISECONDS); Stopwatch stopwatch = Stopwatch.createStarted(); String result = proxy.sleepThenReturnInput("x"); assertThat(result).isEqualTo("x");
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 9.5K bytes - Viewed (0) -
android/guava/src/com/google/common/reflect/Reflection.java
throw new AssertionError(e); } } } /** * Returns a proxy instance that implements {@code interfaceType} by dispatching method * invocations to {@code handler}. The class loader of {@code interfaceType} will be used to * define the proxy class. To implement multiple interfaces or specify a class loader, use {@link * Proxy#newProxyInstance}. *
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Oct 10 19:45:10 GMT 2022 - 3.5K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java
private static <T> void testToString( Class<T> interfaceType, Function<? super T, ? extends T> wrapperFunction) { T proxy = new FreshValueGenerator().newFreshProxy(interfaceType); assertEquals( "toString() isn't properly forwarded", proxy.toString(), wrapperFunction.apply(proxy).toString()); } private static @Nullable Object[] getParameterValues(Method method) {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Thu Feb 08 17:31:55 GMT 2024 - 9.1K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/ForwardingWrapperTester.java
private static <T> void testToString( Class<T> interfaceType, Function<? super T, ? extends T> wrapperFunction) { T proxy = new FreshValueGenerator().newFreshProxy(interfaceType); assertEquals( "toString() isn't properly forwarded", proxy.toString(), wrapperFunction.apply(proxy).toString()); } private static @Nullable Object[] getParameterValues(Method method) {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Feb 08 17:31:55 GMT 2024 - 9.1K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java
import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Set; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors;
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Jun 27 14:21:11 GMT 2023 - 9.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java
} public void testNewProxy_goodMethodWithEnoughTime() throws Exception { SampleImpl target = new SampleImpl(DELAY_MS); Sample proxy = service.newProxy(target, Sample.class, ENOUGH_MS, MILLISECONDS); Stopwatch stopwatch = Stopwatch.createStarted(); String result = proxy.sleepThenReturnInput("x"); assertThat(result).isEqualTo("x");
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 9.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/ForwardingLoadingCacheTest.java
@SuppressWarnings({"unchecked", "DoNotMock"}) // mock @Override public void setUp() throws Exception { super.setUp(); /* * Class parameters must be raw, so we can't create a proxy with generic * type arguments. The created proxy only records calls and returns null, so * the type is irrelevant at runtime. */ mock = mock(LoadingCache.class); forward = new ForwardingLoadingCache<String, Boolean>() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Apr 17 12:41:04 GMT 2023 - 3.4K bytes - Viewed (0)