Home
last modified time | relevance | path

Searched refs:enumClass (Results 1 – 25 of 30) sorted by relevance

12

/external/guava/guava/src/com/google/common/base/
DEnums.java66 public static <T extends Enum<T>> Optional<T> getIfPresent(Class<T> enumClass, String value) { in getIfPresent() argument
67 checkNotNull(enumClass); in getIfPresent()
69 return Platform.getEnumIfPresent(enumClass, value); in getIfPresent()
78 Class<T> enumClass) { in populateCache() argument
80 for (T enumInstance : EnumSet.allOf(enumClass)) { in populateCache()
83 enumConstantCache.put(enumClass, result); in populateCache()
89 Class<T> enumClass) { in getEnumConstants() argument
91 Map<String, WeakReference<? extends Enum<?>>> constants = enumConstantCache.get(enumClass); in getEnumConstants()
93 constants = populateCache(enumClass); in getEnumConstants()
107 public static <T extends Enum<T>> Converter<String, T> stringConverter(final Class<T> enumClass) { in stringConverter() argument
[all …]
DPlatform.java48 static <T extends Enum<T>> Optional<T> getEnumIfPresent(Class<T> enumClass, String value) { in getEnumIfPresent() argument
49 WeakReference<? extends Enum<?>> ref = Enums.getEnumConstants(enumClass).get(value); in getEnumIfPresent()
50 return ref == null ? Optional.<T>absent() : Optional.of(enumClass.cast(ref.get())); in getEnumIfPresent()
/external/guava/android/guava/src/com/google/common/base/
DEnums.java66 public static <T extends Enum<T>> Optional<T> getIfPresent(Class<T> enumClass, String value) { in getIfPresent() argument
67 checkNotNull(enumClass); in getIfPresent()
69 return Platform.getEnumIfPresent(enumClass, value); in getIfPresent()
78 Class<T> enumClass) { in populateCache() argument
80 for (T enumInstance : EnumSet.allOf(enumClass)) { in populateCache()
83 enumConstantCache.put(enumClass, result); in populateCache()
89 Class<T> enumClass) { in getEnumConstants() argument
91 Map<String, WeakReference<? extends Enum<?>>> constants = enumConstantCache.get(enumClass); in getEnumConstants()
93 constants = populateCache(enumClass); in getEnumConstants()
107 public static <T extends Enum<T>> Converter<String, T> stringConverter(final Class<T> enumClass) { in stringConverter() argument
[all …]
DPlatform.java48 static <T extends Enum<T>> Optional<T> getEnumIfPresent(Class<T> enumClass, String value) { in getEnumIfPresent() argument
49 WeakReference<? extends Enum<?>> ref = Enums.getEnumConstants(enumClass).get(value); in getEnumIfPresent()
50 return ref == null ? Optional.<T>absent() : Optional.of(enumClass.cast(ref.get())); in getEnumIfPresent()
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/util/
DEnumValues.java25 private EnumValues(Class<Enum<?>> enumClass, SerializableString[] textual) in EnumValues() argument
27 _enumClass = enumClass; in EnumValues()
28 _values = enumClass.getEnumConstants(); in EnumValues()
36 public static EnumValues construct(SerializationConfig config, Class<Enum<?>> enumClass) { in construct() argument
38 return constructFromToString(config, enumClass); in construct()
40 return constructFromName(config, enumClass); in construct()
43 public static EnumValues constructFromName(MapperConfig<?> config, Class<Enum<?>> enumClass) in constructFromName() argument
46 Class<? extends Enum<?>> enumCls = ClassUtil.findEnumType(enumClass); in constructFromName()
49 …row new IllegalArgumentException("Cannot determine enum constants for Class "+enumClass.getName()); in constructFromName()
61 return construct(enumClass, textual); in constructFromName()
[all …]
DEnumResolver.java24 protected EnumResolver(Class<Enum<?>> enumClass, Enum<?>[] enums, in EnumResolver() argument
27 _enumClass = enumClass; in EnumResolver()
/external/fonttools/Lib/fontTools/colorLib/
Dtable_builder.py101 enumClass = getattr(converter, "enumClass", None)
106 elif enumClass:
107 if isinstance(value, enumClass):
111 value = getattr(enumClass, value.upper())
115 value = enumClass(value)
214 enumClass = getattr(converter, "enumClass", None)
217 elif enumClass:
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/util/
DEnumValuesTest.java31 Class<Enum<?>> enumClass = (Class<Enum<?>>)(Class<?>) ABC.class; in testConstructFromName() local
32 EnumValues values = EnumValues.construct(cfg, enumClass); in testConstructFromName()
44 Class<Enum<?>> enumClass = (Class<Enum<?>>)(Class<?>) ABC.class; in testConstructWithToString() local
45 EnumValues values = EnumValues.construct(cfg, enumClass); in testConstructWithToString()
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/ser/std/
DEnumSerializer.java70 public static EnumSerializer construct(Class<?> enumClass, SerializationConfig config, in construct() argument
77 EnumValues v = EnumValues.constructFromName(config, (Class<Enum<?>>) enumClass); in construct()
78 Boolean serializeAsIndex = _isShapeWrittenUsingIndex(enumClass, format, true, null); in construct()
206 protected static Boolean _isShapeWrittenUsingIndex(Class<?> enumClass, in _isShapeWrittenUsingIndex() argument
229 shape, enumClass.getName(), (fromClass? "class" : "property"))); in _isShapeWrittenUsingIndex()
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/deser/std/
DEnumDeserializer.java90 Class<?> enumClass, AnnotatedMethod factory) { in deserializerForCreator() argument
91 return deserializerForCreator(config, enumClass, factory, null, null); in deserializerForCreator()
103 Class<?> enumClass, AnnotatedMethod factory, in deserializerForCreator() argument
110 return new FactoryBasedEnumDeserializer(enumClass, factory, in deserializerForCreator()
124 Class<?> enumClass, AnnotatedMethod factory) in deserializerForNoArgsCreator() argument
130 return new FactoryBasedEnumDeserializer(enumClass, factory); in deserializerForNoArgsCreator()
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/
DClassNameIdResolver.java111 Class<?> enumClass = ClassUtil.findEnumType((EnumSet<?>) value); in _idFrom() local
113 str = typeFactory.constructCollectionType(EnumSet.class, enumClass).toCanonical(); in _idFrom()
115 Class<?> enumClass = ClassUtil.findEnumType((EnumMap<?,?>) value); in _idFrom() local
118 … str = typeFactory.constructMapType(EnumMap.class, enumClass, valueClass).toCanonical(); in _idFrom()
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/reflectionmodel/
DReflectionEnumConstantDeclaration.java31 Class<?> enumClass = enumConstant.getDeclaringClass(); in getType() local
32 …ResolvedReferenceTypeDeclaration typeDeclaration = new ReflectionEnumDeclaration(enumClass, typeSo… in getType()
/external/guava/guava-gwt/src-super/com/google/common/base/super/com/google/common/base/
DPlatform.java43 static <T extends Enum<T>> Optional<T> getEnumIfPresent(Class<T> enumClass, String value) { in getEnumIfPresent() argument
45 return Optional.of(Enum.valueOf(enumClass, value)); in getEnumIfPresent()
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javasymbolsolver_0_6_0/src/java-symbol-solver-core/com/github/javaparser/symbolsolver/javaparsermodel/declarations/
DJavaParserEnumDeclaration.java220 …ReferenceType enumClass = ReflectionFactory.typeUsageFor(Enum.class, typeSolver).asReferenceType(); in getAncestors() local
221 …TypeParameterDeclaration eTypeParameter = enumClass.getTypeDeclaration().getTypeParameters().get(0… in getAncestors()
222enumClass = enumClass.deriveTypeParameters(new TypeParametersMap.Builder().setValue(eTypeParameter… in getAncestors()
223 ancestors.add(enumClass); in getAncestors()
/external/javaparser/javaparser-symbol-solver-core/src/main/java/com/github/javaparser/symbolsolver/javaparsermodel/declarations/
DJavaParserEnumDeclaration.java224 …ResolvedReferenceType enumClass = ReflectionFactory.typeUsageFor(Enum.class, typeSolver).asReferen… in getAncestors() local
225 …ResolvedTypeParameterDeclaration eTypeParameter = enumClass.getTypeDeclaration().getTypeParameters… in getAncestors()
226enumClass = enumClass.deriveTypeParameters(new ResolvedTypeParametersMap.Builder().setValue(eTypeP… in getAncestors()
227 ancestors.add(enumClass); in getAncestors()
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javasymbolsolver_0_6_0/expected_output/java-symbol-solver-core/
Dcom_github_javaparser_symbolsolver_javaparsermodel_declarations_JavaParserEnumDeclaration.txt45 Line 221) enumClass.getTypeDeclaration().getTypeParameters().get(0) ==> java.util.List.get(int)
46 …Line 221) enumClass.getTypeDeclaration().getTypeParameters() ==> com.github.javaparser.symbolsolve…
47 …Line 221) enumClass.getTypeDeclaration() ==> com.github.javaparser.symbolsolver.model.typesystem.R…
48 …Line 222) enumClass.deriveTypeParameters(new TypeParametersMap.Builder().setValue(eTypeParameter, …
51 Line 223) ancestors.add(enumClass) ==> java.util.List.add(E)
/external/jackson-core/src/test/java/perf/
DEnumByBytesLookup.java23 public static <EIN extends Enum<EIN>> EnumByBytesLookup<EIN> buildFor(Class<EIN> enumClass) in buildFor() argument
27 for (EIN en : enumClass.getEnumConstants()) { in buildFor()
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/deser/
DBasicDeserializerFactory.java1470 final Class<?> enumClass = type.getRawClass(); in createEnumDeserializer() local
1472 JsonDeserializer<?> deser = _findCustomEnumDeserializer(enumClass, config, beanDesc); in createEnumDeserializer()
1480 if (enumClass == Enum.class) { in createEnumDeserializer()
1491 … deser = EnumDeserializer.deserializerForNoArgsCreator(config, enumClass, factory); in createEnumDeserializer()
1496 if (!returnType.isAssignableFrom(enumClass)) { in createEnumDeserializer()
1501 …deser = EnumDeserializer.deserializerForCreator(config, enumClass, factory, valueInstantiator, cre… in createEnumDeserializer()
1508 deser = new EnumDeserializer(constructEnumResolver(enumClass, in createEnumDeserializer()
1698 Class<?> enumClass = type.getRawClass(); in _createEnumKeyDeserializer() local
1707 JsonDeserializer<?> custom = _findCustomEnumDeserializer(enumClass, config, beanDesc); in _createEnumKeyDeserializer()
1716 … EnumResolver enumRes = constructEnumResolver(enumClass, config, beanDesc.findJsonValueAccessor()); in _createEnumKeyDeserializer()
[all …]
/external/libchrome/mojo/public/js/lib/
Dvalidator.js183 Validator.prototype.validateEnum = function(offset, enumClass) { argument
187 return enumClass.validate(value);
660 function(offset, numElements, enumClass) { argument
664 var err = this.validateEnum(elementOffset, enumClass);
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/cfg/
DMapperConfig.java99 public static <F extends Enum<F> & ConfigFeature> int collectFeatureDefaults(Class<F> enumClass) in collectFeatureDefaults() argument
102 for (F value : enumClass.getEnumConstants()) { in collectFeatureDefaults()
/external/guava/android/guava/src/com/google/common/util/concurrent/
DCycleDetectingLockFactory.java276 Class<E> enumClass, Policy policy) { in newInstanceWithExplicitOrdering() argument
279 checkNotNull(enumClass); in newInstanceWithExplicitOrdering()
282 Map<E, LockGraphNode> lockGraphNodes = (Map<E, LockGraphNode>) getOrCreateNodes(enumClass); in newInstanceWithExplicitOrdering()
/external/icu/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/ant/
DConvertIcuDataTask.java379 private static <T extends Enum<T>> T resolve(Class<T> enumClass, String name) { in resolve() argument
396 return Enum.valueOf(enumClass, format.to(CaseFormat.UPPER_UNDERSCORE, name)); in resolve()
399 Arrays.stream(enumClass.getEnumConstants()) in resolve()
/external/guava/guava/src/com/google/common/util/concurrent/
DCycleDetectingLockFactory.java276 Class<E> enumClass, Policy policy) { in newInstanceWithExplicitOrdering() argument
279 checkNotNull(enumClass); in newInstanceWithExplicitOrdering()
282 Map<E, LockGraphNode> lockGraphNodes = (Map<E, LockGraphNode>) getOrCreateNodes(enumClass); in newInstanceWithExplicitOrdering()
/external/guava/guava-tests/test/com/google/common/util/concurrent/
DCycleDetectingLockFactoryTest.java90 Class<E> enumClass, Policy policy) { in newInstanceWithExplicitOrdering() argument
92 policy, CycleDetectingLockFactory.createNodes(enumClass)); in newInstanceWithExplicitOrdering()
/external/guava/android/guava-tests/test/com/google/common/util/concurrent/
DCycleDetectingLockFactoryTest.java90 Class<E> enumClass, Policy policy) { in newInstanceWithExplicitOrdering() argument
92 policy, CycleDetectingLockFactory.createNodes(enumClass)); in newInstanceWithExplicitOrdering()

12