Example #1
0
 public ReachableTypes getCache(final GeneratorContext context) {
   final String moduleName = RebindUtils.getModuleName(context);
   if (isCacheValid(context, moduleName)) {
     return moduleToReachableTypes.get(moduleName);
   } else {
     return null;
   }
 }
Example #2
0
    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);
    }
Example #3
0
 public boolean isCacheValid(final GeneratorContext context) {
   return isCacheValid(context, RebindUtils.getModuleName(context));
 }