code: public LookupResult resolveName(String name, CompilationUnit compilationUnit) {
          ClassNode res = getFromClassCache(name);
          if (res==NO_CLASS) return null;
          if (res!=null) return new LookupResult(null,res);
          LookupResult lr = findClassNode(name, compilationUnit);
          if (lr != null) {
              if (lr.isClassNode()) cacheClass(name, lr.getClassNode());
              return lr;
          } else {
              cacheClass(name, NO_CLASS);
              return null;
          }
      }
docs: Resolves the name of a class to a SourceUnit or ClassNode. If no
  class or source is found this method returns null. A lookup is done
  by first asking the cache if there is an entry for the class already available
  to then call {@link #findClassNode(String, CompilationUnit)}. The result
  of that method call will be cached if a ClassNode is found. If a SourceUnit
  is found, this method will not be asked later on again for that class, because
  ResolveVisitor will first ask the CompilationUnit for classes in the
  compilation queue and it will find the class for that SourceUnit there then.
  method return a ClassNode instead of a SourceUnit, the res
  @param name - the name of the class
  @param compilationUnit - the current CompilationUnit
  @return the LookupResult