Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 84 for asSubclass (0.07 sec)

  1. guava/src/com/google/common/util/concurrent/FuturesGetChecked.java

              new ClassValue<Boolean>() {
                @Override
                protected Boolean computeValue(Class<?> type) {
                  checkExceptionClassValidity(type.asSubclass(Exception.class));
                  return true;
                }
              };
    
          @Override
          public void validateClass(Class<? extends Exception> exceptionClass) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 17:40:56 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/base/EnumsBenchmark.java

        Preconditions.checkArgument(hitRate >= 0 && hitRate <= 1, "hitRate must be in the range [0,1]");
    
        enumType =
            Class.forName(EnumsBenchmark.class.getCanonicalName() + "$" + enumSize + "Enum")
                .asSubclass(Enum.class);
    
        Enum<?>[] allConstants = enumType.getEnumConstants();
        List<String> hits = new ArrayList<>();
        for (int i = 0; i < hitRate * 256 / 3; ++i) {
          hits.add(allConstants[0].name());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 17:15:24 UTC 2024
    - 29.4K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/base/EnumsBenchmark.java

        Preconditions.checkArgument(hitRate >= 0 && hitRate <= 1, "hitRate must be in the range [0,1]");
    
        enumType =
            Class.forName(EnumsBenchmark.class.getCanonicalName() + "$" + enumSize + "Enum")
                .asSubclass(Enum.class);
    
        Enum<?>[] allConstants = enumType.getEnumConstants();
        List<String> hits = new ArrayList<>();
        for (int i = 0; i < hitRate * 256 / 3; ++i) {
          hits.add(allConstants[0].name());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 17:15:24 UTC 2024
    - 29.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/reflect/TypeTokenSubtypeTest.java

      public void testSubtypeOfInnerClass_nonStaticAnonymousClass() {
        TypeToken<?> supertype = new TypeToken<Mall<Outdoor>.Shop<Electronics>>() {};
        Class<?> subclass = new Mall<Outdoor>().new Shop<Electronics>() {}.getClass();
        assertTrue(TypeToken.of(subclass).isSubtypeOf(supertype));
      }
    
      @SuppressWarnings("RestrictedApiChecker") // crashes under JDK8, which EP no longer supports
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 20.3K bytes
    - Viewed (0)
  5. docs/en/docs/how-to/custom-request-and-route.md

    * Decompressing gzip-compressed request bodies.
    * Automatically logging all request bodies.
    
    ## Handling custom request body encodings
    
    Let's see how to make use of a custom `Request` subclass to decompress gzip requests.
    
    And an `APIRoute` subclass to use that custom request class.
    
    ### Create a custom `GzipRequest` class
    
    /// tip
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 22:39:38 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/body-fields.md

    /// note | "Technical Details"
    
    Actually, `Query`, `Path` and others you'll see next create objects of subclasses of a common `Param` class, which is itself a subclass of Pydantic's `FieldInfo` class.
    
    And Pydantic's `Field` returns an instance of `FieldInfo` as well.
    
    `Body` also returns objects of a subclass of `FieldInfo` directly. And there are others you will see later that are subclasses of the `Body` class.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 17:01:18 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/reflect/SubtypeTester.java

            // The raw class isn't even a subclass.
          }
        }
        if (!spec.suppressGetSupertype()) {
          try {
            assertThat(getSupertype(paramType, TypeToken.of(returnType).getRawType()))
                .isNotEqualTo(returnType);
          } catch (IllegalArgumentException notSubtype2) {
            // The raw class isn't even a subclass.
          }
        }
        return null;
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Apr 19 19:24:36 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/reflect/SubtypeTester.java

            // The raw class isn't even a subclass.
          }
        }
        if (!spec.suppressGetSupertype()) {
          try {
            assertThat(getSupertype(paramType, TypeToken.of(returnType).getRawType()))
                .isNotEqualTo(returnType);
          } catch (IllegalArgumentException notSubtype2) {
            // The raw class isn't even a subclass.
          }
        }
        return null;
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Apr 19 19:24:36 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/RangeGwtSerializationDependencies.java

     *
     * <p>For details about this hack, see {@code GwtSerializationDependencies}, which takes the same
     * approach but with a subclass rather than a superclass.
     *
     * <p>TODO(cpovirk): Consider applying this subclass approach to our other types.
     */
    @SuppressWarnings("rawtypes") // https://github.com/google/guava/issues/989
    @GwtCompatible(emulated = true)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java

     * subclasses. Without such overrides, optimizers might put a {@code writeReplace}-containing class
     * and its subclass in different packages, causing the serialization system to fail to invoke {@code
     * writeReplace} when serializing an instance of the subclass. For an example of this problem, see
     * b/310253115.
     */
    public class WriteReplaceOverridesTest extends TestCase {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 18:53:31 UTC 2024
    - 5.2K bytes
    - Viewed (0)
Back to top