Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for setAccessible (0.14 sec)

  1. compat/maven-compat/src/main/java/org/apache/maven/project/interpolation/StringSearchModelInterpolator.java

                        Class<?> type = field.getType();
                        if (isQualifiedForInterpolation(field, type)) {
                            boolean isAccessible = field.isAccessible();
                            field.setAccessible(true);
                            try {
                                try {
                                    if (String.class == type) {
                                        String value = (String) field.get(target);
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  2. 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());
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/base/FinalizableReferenceQueueClassLoaderUnloadingTest.java

        Class<?> sepFrqSystemLoaderC =
            sepLoader.loadClass(FinalizableReferenceQueue.SystemLoader.class.getName());
        Field disabled = sepFrqSystemLoaderC.getDeclaredField("disabled");
        disabled.setAccessible(true);
        disabled.set(null, true);
    
        // Now make a parallel FRQ and an associated FinalizableWeakReference to an object, in order to
        // exercise some classes from the parallel ClassLoader.
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. guava/src/com/google/common/reflect/Types.java

            if (method.getDeclaringClass().equals(TypeVariableImpl.class)) {
              try {
                method.setAccessible(true);
              } catch (AccessControlException e) {
                // OK: the method is accessible to us anyway. The setAccessible call is only for
                // unusual execution environments where that might not be true.
              }
              builder.put(method.getName(), method);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 23K bytes
    - Viewed (0)
  5. android/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
    - 20.8K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  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