* return false.
*/
private boolean findReusableCachedFieldSerializerIfAvailable(TreeLogger logger,
GeneratorContext ctx, JType type, JType customFieldSerializer) {
CachedGeneratorResult lastResult = ctx.getCachedGeneratorResult();
if (lastResult == null || !ctx.isGeneratorResultCachingEnabled()) {
return false;
}
String fieldSerializerName = SerializationUtils.getStandardSerializerName((JClassType) type);
if (type instanceof JClassType) {
// check that it is available for reuse
if (!lastResult.isTypeCached(fieldSerializerName)) {
if (logger.isLoggable(TreeLogger.TRACE)) {
if (ctx.getTypeOracle().findType(fieldSerializerName) == null) {
logger.log(TreeLogger.TRACE, "No cached field serializer available for "
+ type.getQualifiedSourceName());
}
}
return false;
}
} else {
return false;
}
@SuppressWarnings("unchecked")
CachedRpcTypeInformation cachedTypeInfo =
(CachedRpcTypeInformation) lastResult.getClientData(ProxyCreator.CACHED_TYPE_INFO_KEY);
assert cachedTypeInfo != null;
boolean foundMatch = false;
if (cachedTypeInfo.checkLastModifiedTime(type)
&& ((customFieldSerializer != null && cachedTypeInfo