Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 33 for setAccessible (0.08 sec)

  1. guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

        Method tryInternalFastPathGetFailureMethod =
            abstractFutureClass.getDeclaredMethod("tryInternalFastPathGetFailure");
        tryInternalFastPathGetFailureMethod.setAccessible(true);
        return (Throwable) tryInternalFastPathGetFailureMethod.invoke(future);
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

        Method tryInternalFastPathGetFailureMethod =
            abstractFutureClass.getDeclaredMethod("tryInternalFastPathGetFailure");
        tryInternalFastPathGetFailureMethod.setAccessible(true);
        return (Throwable) tryInternalFastPathGetFailureMethod.invoke(future);
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  3. 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 Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  4. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 13:00:28 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/base/internal/Finalizer.java

      @CheckForNull
      private static Field getInheritableThreadLocalsField() {
        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 "
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Aug 23 12:54:09 UTC 2023
    - 9.4K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/Serialization.java

      // Secret sauce for setting final fields; don't make it public.
      static final class FieldSetter<T> {
        private final Field field;
    
        private FieldSetter(Field field) {
          this.field = field;
          field.setAccessible(true);
        }
    
        void set(T instance, Object value) {
          try {
            field.set(instance, value);
          } catch (IllegalAccessException impossible) {
            throw new AssertionError(impossible);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Mar 06 16:06:58 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  7. guava/src/com/google/common/hash/LittleEndianByteArray.java

                (PrivilegedExceptionAction<Unsafe>)
                    () -> {
                      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);
                        }
                      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/opensearch/extension/analysis/ReloadableKuromojiTokenizerFactory.java

            return AccessController.doPrivileged((PrivilegedAction<Field>) () -> {
                try {
                    final Field field = clazz.getDeclaredField(name);
                    field.setAccessible(true);
                    return field;
                } catch (final Exception e) {
                    throw new IllegalArgumentException("Failed to load fields.", e);
                }
            });
        }
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:54 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

        final 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/testing/NullPointerTester.java

       */
      public void testMethodParameter(
          @Nullable final Object instance, final Method method, int paramIndex) {
        method.setAccessible(true);
        testParameter(instance, invokable(instance, method), paramIndex, method.getDeclaringClass());
      }
    
      /**
       * Verifies that {@code ctor} produces a {@link NullPointerException} or {@link
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jun 11 16:13:05 UTC 2024
    - 23.2K bytes
    - Viewed (0)
Back to top