List of usage examples for com.google.gwt.core.ext CachedGeneratorResult isTypeCached
boolean isTypeCached(String typeName);
From source file:org.cruxframework.crux.core.rebind.AbstractProxyCreator.java
License:Apache License
protected boolean findCacheableImplementationAndMarkForReuseIfAvailable(JClassType baseIntf) { CachedGeneratorResult lastResult = context.getCachedGeneratorResult(); if (lastResult == null || !context.isGeneratorResultCachingEnabled()) { return false; }/*w w w. j av a 2s. co m*/ String proxyName = getProxyQualifiedName(); // check that it is available for reuse if (!lastResult.isTypeCached(proxyName)) { return false; } try { long lastModified = 0L; if (baseIntf instanceof JRealClassType) { lastModified = ((JRealClassType) baseIntf).getLastModifiedTime(); } if (lastModified != 0L && lastModified < lastResult.getTimeGenerated()) { return context.tryReuseTypeFromCache(proxyName); } } catch (RuntimeException ex) { // could get an exception checking modified time return false; } return false; }