Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for getEnumConstants (0.15 sec)

  1. guava-tests/test/com/google/common/base/EnumsTest.java

          assertThat(result).isPresent();
          shadowConstants.add(result.get());
        }
        assertEquals(ImmutableSet.<Object>copyOf(shadowTestEnum.getEnumConstants()), shadowConstants);
        Optional<TestEnum> result = Enums.getIfPresent(shadowTestEnum, "blibby");
        assertThat(result).isAbsent();
        return new WeakReference<>(shadowLoader);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

        }
        Class<? extends T> implementation = getImplementation(type);
        if (implementation != null) {
          return get(implementation);
        }
        if (type.isEnum()) {
          T[] enumConstants = type.getEnumConstants();
          return (enumConstants == null || enumConstants.length == 0) ? null : enumConstants[0];
        }
        if (type.isArray()) {
          return createEmptyArray(type);
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

          return get(implementation);
        }
        if (type == Stream.class) {
          return type.cast(Stream.empty());
        }
        if (type.isEnum()) {
          T[] enumConstants = type.getEnumConstants();
          return (enumConstants == null || enumConstants.length == 0) ? null : enumConstants[0];
        }
        if (type.isArray()) {
          return createEmptyArray(type);
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

        Object sample = pickInstance(samples, null);
        if (sample != null) {
          return sample;
        }
        if (rawType.isEnum()) {
          return pickInstance(rawType.getEnumConstants(), null);
        }
        if (type.isArray()) {
          TypeToken<?> componentType = requireNonNull(type.getComponentType());
          Object array = Array.newInstance(componentType.getRawType(), 1);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

        Object sample = pickInstance(samples, null);
        if (sample != null) {
          return sample;
        }
        if (rawType.isEnum()) {
          return pickInstance(rawType.getEnumConstants(), null);
        }
        if (type.isArray()) {
          TypeToken<?> componentType = requireNonNull(type.getComponentType());
          Object array = Array.newInstance(componentType.getRawType(), 1);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java

          throws ParameterNotInstantiableException,
              IllegalAccessException,
              InvocationTargetException,
              FactoryMethodReturnsNullException {
        if (cls.isEnum()) {
          T[] constants = cls.getEnumConstants();
          if (constants != null && constants.length > 0) {
            return constants[0];
          } else {
            return null;
          }
        }
        TypeToken<T> type = TypeToken.of(cls);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:18:12 UTC 2024
    - 32.7K bytes
    - Viewed (0)
Back to top