- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for getEnumConstants (0.07 sec)
-
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 11.8K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 21.4K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 32.5K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 20.9K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 28.1K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 28.7K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 32.5K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 29.4K bytes - Viewed (0) -
android/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 Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Jul 18 15:05:43 UTC 2025 - 35.9K bytes - Viewed (0)