/** * Returns the {@link Class} which can serialize the given instance type, or * <code>null</code> if this class has no custom field serializer. * * Note that arrays never have custom field serializers. */ public static Class<?> hasCustomFieldSerializer(Class<?> instanceType) { assert (instanceType != null); if (instanceType.isArray()) { return null; } Class<?> result; result = classCustomSerializerCache.get(instanceType); if (result == null) { result = computeHasCustomFieldSerializer(instanceType, false); if (result == null) { /* * Use (result == instanceType) as a sentinel value when the class has * no custom field serializer. We avoid using null as the sentinel * value, because that would necessitate an additional containsKey() * check in the most common case. */ result = instanceType; } classCustomSerializerCache.put(instanceType, result); } return (result == instanceType) ? null : result; }
/** * Returns the server-side {@link Class} which can serialize the given * instance type, or <code>null</code> if this class has no type-checking * custom field serializer. * * Note that arrays never have custom field serializers. */ public static Class<?> hasServerCustomFieldSerializer(Class<?> instanceType) { assert (instanceType != null); if (instanceType.isArray()) { return null; } Class<?> result; result = classServerCustomSerializerCache.get(instanceType); if (result == null) { result = computeHasCustomFieldSerializer(instanceType, true); if (result == null) { /* * Use (result == instanceType) as a sentinel value when the class has * no custom field serializer. We avoid using null as the sentinel * value, because that would necessitate an additional containsKey() * check in the most common case. */ result = instanceType; } classServerCustomSerializerCache.put(instanceType, result); } return (result == instanceType) ? null : result; }
/** * Returns the server-side {@link Class} which can serialize the given * instance type, or <code>null</code> if this class has no type-checking * custom field serializer. * * Note that arrays never have custom field serializers. */ public static Class<?> hasServerCustomFieldSerializer(Class<?> instanceType) { assert (instanceType != null); if (instanceType.isArray()) { return null; } Class<?> result; result = classServerCustomSerializerCache.get(instanceType); if (result == null) { result = computeHasCustomFieldSerializer(instanceType, true); if (result == null) { /* * Use (result == instanceType) as a sentinel value when the class has * no custom field serializer. We avoid using null as the sentinel * value, because that would necessitate an additional containsKey() * check in the most common case. */ result = instanceType; } classServerCustomSerializerCache.put(instanceType, result); } return (result == instanceType) ? null : result; }
/** * Returns the {@link Class} which can serialize the given instance type, or * <code>null</code> if this class has no custom field serializer. * * Note that arrays never have custom field serializers. */ public static Class<?> hasCustomFieldSerializer(Class<?> instanceType) { assert (instanceType != null); if (instanceType.isArray()) { return null; } Class<?> result; result = classCustomSerializerCache.get(instanceType); if (result == null) { result = computeHasCustomFieldSerializer(instanceType, false); if (result == null) { /* * Use (result == instanceType) as a sentinel value when the class has * no custom field serializer. We avoid using null as the sentinel * value, because that would necessitate an additional containsKey() * check in the most common case. */ result = instanceType; } classCustomSerializerCache.put(instanceType, result); } return (result == instanceType) ? null : result; }
/** * Returns the {@link Class} which can serialize the given instance type, or * <code>null</code> if this class has no custom field serializer. * * Note that arrays never have custom field serializers. */ public static Class<?> hasCustomFieldSerializer(Class<?> instanceType) { assert (instanceType != null); if (instanceType.isArray()) { return null; } Class<?> result; result = classCustomSerializerCache.get(instanceType); if (result == null) { result = computeHasCustomFieldSerializer(instanceType, false); if (result == null) { /* * Use (result == instanceType) as a sentinel value when the class has * no custom field serializer. We avoid using null as the sentinel * value, because that would necessitate an additional containsKey() * check in the most common case. */ result = instanceType; } classCustomSerializerCache.put(instanceType, result); } return (result == instanceType) ? null : result; }
/** * Returns the server-side {@link Class} which can serialize the given * instance type, or <code>null</code> if this class has no type-checking * custom field serializer. * * Note that arrays never have custom field serializers. */ public static Class<?> hasServerCustomFieldSerializer(Class<?> instanceType) { assert (instanceType != null); if (instanceType.isArray()) { return null; } Class<?> result; result = classServerCustomSerializerCache.get(instanceType); if (result == null) { result = computeHasCustomFieldSerializer(instanceType, true); if (result == null) { /* * Use (result == instanceType) as a sentinel value when the class has * no custom field serializer. We avoid using null as the sentinel * value, because that would necessitate an additional containsKey() * check in the most common case. */ result = instanceType; } classServerCustomSerializerCache.put(instanceType, result); } return (result == instanceType) ? null : result; }