public ReachableTypes getCache(final GeneratorContext context) { final String moduleName = RebindUtils.getModuleName(context); if (isCacheValid(context, moduleName)) { return moduleToReachableTypes.get(moduleName); } else { return null; } }
public void putCache(final GeneratorContext context, final ReachableTypes reachableTypes) { if (_lastContext == null) { _lastContext = context; } else if (_lastContext != context) { _lastContext = context; moduleToReachableTypes.clear(); } moduleToReachableTypes.put(RebindUtils.getModuleName(context), reachableTypes); }
public boolean isCacheValid(final GeneratorContext context) { return isCacheValid(context, RebindUtils.getModuleName(context)); }