Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for getEnumConstants (0.19 sec)

  1. build-logic/documentation/src/main/groovy/gradlebuild/docs/dsl/source/model/ClassMetaData.java

            return constants;
        }
    
        public void addEnumConstant(String name) {
            enumConstants.add(new EnumConstantMetaData(name, this));
        }
    
        public List<EnumConstantMetaData> getEnumConstants() {
            return enumConstants;
        }
    
        public EnumConstantMetaData getEnumConstant(String name) {
            for (EnumConstantMetaData enumConstant : enumConstants) {
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 10.1K bytes
    - Viewed (0)
  2. guava/src/com/google/common/util/concurrent/FuturesGetChecked.java

            @SuppressWarnings("rawtypes") // class literals
            Class<? extends Enum> theClass =
                Class.forName(CLASS_VALUE_VALIDATOR_NAME).asSubclass(Enum.class);
            return (GetCheckedTypeValidator) theClass.getEnumConstants()[0];
          } catch (ClassNotFoundException
              | RuntimeException
              | Error t) { // ensure we really catch *everything*
            return weakSetValidator();
          }
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 17:40:56 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

       */
      @VisibleForTesting
      static <E extends Enum<E>> Map<E, LockGraphNode> createNodes(Class<E> clazz) {
        EnumMap<E, LockGraphNode> map = Maps.newEnumMap(clazz);
        E[] keys = clazz.getEnumConstants();
        int numKeys = keys.length;
        ArrayList<LockGraphNode> nodes = Lists.newArrayListWithCapacity(numKeys);
        // Create a LockGraphNode for each enum value.
        for (E key : keys) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Dec 15 19:31:54 UTC 2023
    - 35.9K bytes
    - Viewed (0)
  6. android/guava-tests/benchmark/com/google/common/base/EnumsBenchmark.java

        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());
          hits.add(allConstants[allConstants.length / 2].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)
  7. 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)
  8. 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)
  9. guava-tests/benchmark/com/google/common/base/EnumsBenchmark.java

        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());
          hits.add(allConstants[allConstants.length / 2].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)
  10. 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